public class ClassID extends java.lang.Object implements Duplicatable
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.The ClassID (or CLSID) is a UUID - see RFC 4122
Modifier and Type | Field and Description |
---|---|
static ClassID |
EQUATION30
Deprecated.
use enum
ClassIDPredefined |
static ClassID |
EXCEL_V3
Deprecated.
use enum
ClassIDPredefined |
static ClassID |
EXCEL_V3_CHART
Deprecated.
use enum
ClassIDPredefined |
static ClassID |
EXCEL_V3_MACRO
Deprecated.
use enum
ClassIDPredefined |
static ClassID |
EXCEL2003
Deprecated.
use enum
ClassIDPredefined |
static ClassID |
EXCEL2007
Deprecated.
use enum
ClassIDPredefined |
static ClassID |
EXCEL2007_MACRO
Deprecated.
use enum
ClassIDPredefined |
static ClassID |
EXCEL2007_XLSB
Deprecated.
use enum
ClassIDPredefined |
static ClassID |
EXCEL2010
Deprecated.
use enum
ClassIDPredefined |
static ClassID |
EXCEL2010_CHART
Deprecated.
use enum
ClassIDPredefined |
static ClassID |
EXCEL2010_ODS
Deprecated.
use enum
ClassIDPredefined |
static ClassID |
EXCEL95
Deprecated.
use enum
ClassIDPredefined |
static ClassID |
EXCEL95_CHART
Deprecated.
use enum
ClassIDPredefined |
static ClassID |
EXCEL97
Deprecated.
use enum
ClassIDPredefined |
static ClassID |
EXCEL97_CHART
Deprecated.
use enum
ClassIDPredefined |
static int |
LENGTH
The number of bytes occupied by this object in the byte stream.
|
static ClassID |
OLE10_PACKAGE
Deprecated.
use enum
ClassIDPredefined |
static ClassID |
POWERPOINT2007
Deprecated.
use enum
ClassIDPredefined |
static ClassID |
POWERPOINT2007_MACRO
Deprecated.
use enum
ClassIDPredefined |
static ClassID |
POWERPOINT95
Deprecated.
use enum
ClassIDPredefined |
static ClassID |
POWERPOINT97
Deprecated.
use enum
ClassIDPredefined |
static ClassID |
PPT_SHOW
Deprecated.
use enum
ClassIDPredefined |
static ClassID |
TXT_ONLY
Deprecated.
use enum
ClassIDPredefined |
static ClassID |
WORD2007
Deprecated.
use enum
ClassIDPredefined |
static ClassID |
WORD2007_MACRO
Deprecated.
use enum
ClassIDPredefined |
static ClassID |
WORD95
Deprecated.
use enum
ClassIDPredefined |
static ClassID |
WORD97
Deprecated.
use enum
ClassIDPredefined |
static ClassID |
XLS_WORKBOOK
Deprecated.
use enum
ClassIDPredefined |
Constructor and Description |
---|
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. |
ClassID(ClassID other)
Clones the given ClassID
|
ClassID(LittleEndianInput lei)
Reads the ClassID from the input
|
ClassID(java.lang.String externalForm)
Creates a
ClassID from a human-readable representation of the Class ID in standard
format "{xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}" . |
Modifier and Type | Method and Description |
---|---|
ClassID |
copy() |
boolean |
equals(java.lang.Object o)
Checks whether this
ClassID is equal to another object. |
boolean |
equalsInverted(ClassID o)
Checks whether this
ClassID is equal to another ClassID with inverted endianess,
because there are apparently not only version 1 GUIDs (aka "network" with big-endian encoding),
but also version 2 GUIDs (aka "native" with little-endian encoding) out there. |
byte[] |
getBytes()
Gets the bytes making out the class ID.
|
int |
hashCode() |
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 |
setBytes(byte[] bytes)
Sets the bytes making out the class ID.
|
java.lang.String |
toString()
Returns a human-readable representation of the Class ID in standard
format
"{xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}" . |
void |
write(byte[] dst,
int offset)
Writes the class ID to a byte array in the little-endian format.
|
void |
write(LittleEndianOutput leo)
Write the class ID to a LittleEndianOutput (stream)
|
@Deprecated public static final ClassID OLE10_PACKAGE
ClassIDPredefined
@Deprecated public static final ClassID PPT_SHOW
ClassIDPredefined
@Deprecated public static final ClassID XLS_WORKBOOK
ClassIDPredefined
@Deprecated public static final ClassID TXT_ONLY
ClassIDPredefined
@Deprecated public static final ClassID EXCEL_V3
ClassIDPredefined
@Deprecated public static final ClassID EXCEL_V3_CHART
ClassIDPredefined
@Deprecated public static final ClassID EXCEL_V3_MACRO
ClassIDPredefined
@Deprecated public static final ClassID EXCEL95
ClassIDPredefined
@Deprecated public static final ClassID EXCEL95_CHART
ClassIDPredefined
@Deprecated public static final ClassID EXCEL97
ClassIDPredefined
@Deprecated public static final ClassID EXCEL97_CHART
ClassIDPredefined
@Deprecated public static final ClassID EXCEL2003
ClassIDPredefined
@Deprecated public static final ClassID EXCEL2007
ClassIDPredefined
@Deprecated public static final ClassID EXCEL2007_MACRO
ClassIDPredefined
@Deprecated public static final ClassID EXCEL2007_XLSB
ClassIDPredefined
@Deprecated public static final ClassID EXCEL2010
ClassIDPredefined
@Deprecated public static final ClassID EXCEL2010_CHART
ClassIDPredefined
@Deprecated public static final ClassID EXCEL2010_ODS
ClassIDPredefined
@Deprecated public static final ClassID WORD95
ClassIDPredefined
@Deprecated public static final ClassID WORD97
ClassIDPredefined
@Deprecated public static final ClassID WORD2007
ClassIDPredefined
@Deprecated public static final ClassID WORD2007_MACRO
ClassIDPredefined
@Deprecated public static final ClassID POWERPOINT97
ClassIDPredefined
@Deprecated public static final ClassID POWERPOINT95
ClassIDPredefined
@Deprecated public static final ClassID POWERPOINT2007
ClassIDPredefined
@Deprecated public static final ClassID POWERPOINT2007_MACRO
ClassIDPredefined
@Deprecated public static final ClassID EQUATION30
ClassIDPredefined
public static final int LENGTH
public ClassID(byte[] src, int offset)
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()
ClassID
and initializes its value with 0x00 bytes.public ClassID(ClassID other)
public ClassID(java.lang.String externalForm)
ClassID
from a human-readable representation of the Class ID in standard
format "{xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}"
.externalForm
- representation of the Class ID represented by this object.public ClassID(LittleEndianInput lei)
lei
- the input (stream)public int length()
public byte[] getBytes()
public void setBytes(byte[] bytes)
bytes
- The bytes making out the class ID in big-endian format. They
are copied without their order being changed.public byte[] read(byte[] src, int offset)
src
- The byte array to read fromoffset
- The offset within the src
byte arraypublic void write(byte[] dst, int offset) throws java.lang.ArrayStoreException
dst
- The byte array to write to.offset
- The offset within the dst
byte array.java.lang.ArrayStoreException
- if there is not enough room for the class
ID 16 bytes in the byte array after the offset
position.public void write(LittleEndianOutput leo)
leo
- the outputpublic boolean equals(java.lang.Object o)
ClassID
is equal to another object.equals
in class java.lang.Object
o
- the object to compare this ClassID
withtrue
if the objects are equal, else false
.public boolean equalsInverted(ClassID o)
ClassID
is equal to another ClassID with inverted endianess,
because there are apparently not only version 1 GUIDs (aka "network" with big-endian encoding),
but also version 2 GUIDs (aka "native" with little-endian encoding) out there.o
- the object to compare this ClassID
withtrue
if the objects are equal, else false
.public int hashCode()
hashCode
in class java.lang.Object
Object.hashCode()
public java.lang.String toString()
"{xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}"
.toString
in class java.lang.Object
public ClassID copy()
copy
in interface Duplicatable
Copyright 2020 The Apache Software Foundation or its licensors, as applicable.