org.apache.poi.hpsf
Class ClassID

java.lang.Object
  extended byorg.apache.poi.hpsf.ClassID

public class ClassID
extends java.lang.Object

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.

Since:
2002-02-09
Version:
$Id: ClassID.java,v 1.4 2002/07/17 16:23:22 klute Exp $
Author:
Rainer Klute (klute@rainer-klute.de)

Field Summary
protected  byte[] bytes
          The bytes making out the class ID in correct order, i.e. big-endian.
static int LENGTH
           
 
Constructor Summary
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 a class ID from a byte array by turning little-endian into big-endian.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

bytes

protected byte[] bytes

The bytes making out the class ID in correct order, i.e. big-endian.


LENGTH

public static final int LENGTH
See Also:
Constant Field Values
Constructor Detail

ClassID

public ClassID(byte[] src,
               int offset)

Creates a ClassID and reads its value from a byte array.

Parameters:
src - The byte array to read from.
offset - The offset of the first byte to read.
Method Detail

length

public int length()

getBytes

public byte[] getBytes()

Gets the bytes making out the class ID. They are returned in correct order, i.e. big-endian.


read

public byte[] read(byte[] src,
                   int offset)

Reads a class ID from a byte array by turning little-endian into big-endian.

Parameters:
src - The byte array to read from
offset - The offset within the src byte array
Returns:
A byte array containing the class ID.

jakarta-poi 1.10.0-dev

Copyright © 2004 Apache jakarta-poi project. All Rights Reserved.