public class FileNodeHeader extends Object implements IBinarySerializable, com.aspose.ms.System.IEquatable<FileNodeHeader>
The FileNodeHeader class specify what type of FileNode structure it is, and what format of data is in.
Modifier and Type | Field and Description |
---|---|
static byte |
HeaderSize
Header size in bytes.
|
Constructor and Description |
---|
FileNodeHeader(long fileNodeId,
long size,
byte stpFormat,
byte cbFormat,
byte baseType)
Initializes a new instance of the
FileNodeHeader class. |
FileNodeHeader(long fileNodePosition,
long fileNodeId,
long size,
byte stpFormat,
byte cbFormat,
byte baseType,
boolean reserved)
Initializes a new instance of the
FileNodeHeader class. |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(FileNodeHeader other)
The equals.
|
byte |
getBaseType()
It specified by fnd contains a FileNodeChunkReference structure
0 -> does not reference other data; 1 -> contains a reference to data; 2 -> contains a reference to a file node
list;
|
byte |
getCbFormat()
Gets the size and format of the FileNodeChunkReference.cb field specified by the fnd field if this FileNode
structure has a BaseType field value equal to 1 or 2.
|
long |
getFileNodeId()
Gets the type of this FileNode
|
long |
getFileNodePosition()
Gets the file node's offset from the begin of file.
|
boolean |
getReserved()
MUST be true, and MUST be ignored.
|
long |
getSize()
Gets the size, in bytes, of this FileNode
|
byte |
getStpFormat()
Gets the size and format of the FileNodeChunkReference.stp field
|
long |
getStructSize()
Gets the struct size.
|
byte[] |
toByteArray()
The to byte array.
|
String |
toString()
The to string.
|
public static final byte HeaderSize
Header size in bytes. FileNodeID(10bits) + Size(13 bits) + StpFormat(2 bits) + CbFormat(2 bits) + BaseType(4 bits) + Reserved(1 bit) = 4 bytes.
public FileNodeHeader(long fileNodePosition, long fileNodeId, long size, byte stpFormat, byte cbFormat, byte baseType, boolean reserved)
Initializes a new instance of the FileNodeHeader
class.
fileNodePosition
- The file node position.fileNodeId
- The file node id.size
- The size.stpFormat
- The stp format.cbFormat
- The cb format.baseType
- The base type.reserved
- The reserved.public FileNodeHeader(long fileNodeId, long size, byte stpFormat, byte cbFormat, byte baseType)
Initializes a new instance of the FileNodeHeader
class.
fileNodeId
- The file node id.size
- The size.stpFormat
- The stp format.cbFormat
- The cb format.baseType
- The base type.public byte getBaseType()
It specified by fnd contains a FileNodeChunkReference structure 0 -> does not reference other data; 1 -> contains a reference to data; 2 -> contains a reference to a file node list;
public byte getCbFormat()
Gets the size and format of the FileNodeChunkReference.cb field specified by the fnd field if this FileNode structure has a BaseType field value equal to 1 or 2. MUST be 0 and MUST be ignored if BaseType of this FileNode structure is equal to 0 0 -> 4 bytes, uncompressed; 1 -> 8 bytes, uncompressed; 2 -> 1 byte, compressed; 3 -> 2 bytes, compressed;
public long getFileNodeId()
Gets the type of this FileNode
public long getFileNodePosition()
Gets the file node's offset from the begin of file.
public boolean getReserved()
MUST be true, and MUST be ignored.
public long getSize()
Gets the size, in bytes, of this FileNode
public byte getStpFormat()
Gets the size and format of the FileNodeChunkReference.stp field
public long getStructSize()
Gets the struct size.
getStructSize
in interface IBinarySerializable
public boolean equals(FileNodeHeader other)
The equals.
other
- The other.bool
.public String toString()
The to string.
public byte[] toByteArray()
The to byte array.
toByteArray
in interface IBinarySerializable
T:byte[]
.com.aspose.ms.System.InvalidOperationException
Copyright (c) 2017 Aspose. All Rights Reserved.