org.apache.ignite.internal.visor.file

## Class VisorFileBlock

- java.lang.Object
- - org.apache.ignite.internal.visor.VisorDataTransferObject
  - - org.apache.ignite.internal.visor.file.VisorFileBlock

All Implemented Interfaces:
  Externalizable, Serializable

    public class VisorFileBlock
    extends VisorDataTransferObject

Represents block of bytes from a file, could be optionally zipped.

See Also:
  Serialized Form

### Field Summary

### Fields inherited from class org.apache.ignite.internal.visor.VisorDataTransferObject

`V1, V2, V3, V4, V5`

### Constructor Summary

Constructors
Constructor and Description
`VisorFileBlock()` Default constructor.
`VisorFileBlock(String path, long off, long size, long lastModified, boolean zipped, byte[] data)` Create file block with given parameters.

### Method Summary

All Methods Instance Methods Concrete Methods
`byte[]` `getData()`
`long` `getLastModified()`
`long` `getOffset()`
`String` `getPath()`
`long` `getSize()`
`boolean` `isZipped()`
`protected void` `readExternalData(byte protoVer, ObjectInput in)` Load object's specific data content.
`String` `toString()`
`protected void` `writeExternalData(ObjectOutput out)` Save object's specific data content.

### Methods inherited from class org.apache.ignite.internal.visor.VisorDataTransferObject

`getProtocolVersion, readExternal, toList, toSet, writeExternal`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

### Constructor Detail

#### VisorFileBlock

    public VisorFileBlock()

Default constructor.

#### VisorFileBlock

    public VisorFileBlock(String path,
                          long off,
                          long size,
                          long lastModified,
                          boolean zipped,
                          byte[] data)

Create file block with given parameters.

Parameters:
  `path` - File path.
  `off` - Marker position.
  `size` - File size.
  `lastModified` - Timestamp of last modification of the file.
  `zipped` - Whether data was zipped.
  `data` - Data bytes.

### Method Detail

#### getPath

    public String getPath()

Returns:
  File path.

#### getOffset

    public long getOffset()

Returns:
  Marker position.

#### getSize

    public long getSize()

Returns:
  File size.

#### getLastModified

    public long getLastModified()

Returns:
  Timestamp of last modification of the file.

#### isZipped

    public boolean isZipped()

Returns:
  Whether data was zipped.

#### getData

    public byte[] getData()

Returns:
  Data bytes.

#### writeExternalData

    protected void writeExternalData(ObjectOutput out)
                              throws IOException

Save object's specific data content.

Specified by:
  `writeExternalData` in class `VisorDataTransferObject`
Parameters:
  `out` - Output object to write data content.
Throws:
  `IOException` - If I/O errors occur.

#### readExternalData

    protected void readExternalData(byte protoVer,
                                    ObjectInput in)
                             throws IOException,
                                    ClassNotFoundException

Load object's specific data content.

Specified by:
  `readExternalData` in class `VisorDataTransferObject`
Parameters:
  `protoVer` - Input object version.
  `in` - Input object to load data content.
Throws:
  `IOException` - If I/O errors occur.
  `ClassNotFoundException` - If the class for an object being restored cannot be found.

#### toString

    public String toString()

Overrides:
  `toString` in class `Object`

${current.year} Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Database and Caching Platform | : ver. 2.13.0
Release Date | : April 20 2022