|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.poi.hpsf.ClassID
Represents a class ID (16 bytes). Unlike other little-endian
type the ClassID
is not just 16 bytes stored in the wrong
order. Instead, it is a double word (4 bytes) followed by two
words (2 bytes each) followed by 8 bytes.
Field Summary | |
protected byte[] |
bytes
The bytes making out the class ID in correct order, i.e. |
static int |
LENGTH
|
Constructor Summary | |
ClassID()
Creates a ClassID and initializes its value with
0x00 bytes. |
|
ClassID(byte[] src,
int offset)
Creates a ClassID and reads its value from a byte
array. |
Method Summary | |
byte[] |
getBytes()
Gets the bytes making out the class ID. |
int |
length()
|
byte[] |
read(byte[] src,
int offset)
Reads the class ID's value from a byte array by turning little-endian into big-endian. |
void |
write(byte[] dst,
int offset)
Writes the class ID to a byte array in the little-endian. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected byte[] bytes
The bytes making out the class ID in correct order, i.e. big-endian.
public static final int LENGTH
Constructor Detail |
public ClassID(byte[] src, int offset)
Creates a ClassID
and reads its value from a byte
array.
src
- The byte array to read from.offset
- The offset of the first byte to read.public ClassID()
Creates a ClassID
and initializes its value with
0x00 bytes.
Method Detail |
public int length()
public byte[] getBytes()
Gets the bytes making out the class ID. They are returned in correct order, i.e. big-endian.
public byte[] read(byte[] src, int offset)
Reads the class ID's value from a byte array by turning little-endian into big-endian.
src
- The byte array to read fromoffset
- The offset within the src byte array
public void write(byte[] dst, int offset)
Writes the class ID to a byte array in the little-endian.
dst
- The byte array to write to.offset
- The offset within the dst byte array.
java.lang.ArrayIndexOutOfBoundsException
- if there is not enough
room for the class ID in the byte array. There must be at least
16 bytes in the byte array after the offset
position.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |