Variant types as defined by Microsoft's COM.
In the variant types descriptions the following shortcuts are used:
| Modifier and Type | Field and Description |
|---|---|
| public static final Integer | LENGTH_0
Denotes a variant type with a length of 0 bytes. |
| public static final Integer | LENGTH_2
Denotes a variant type with a length of 2 bytes. |
| public static final Integer | LENGTH_4
Denotes a variant type with a length of 4 bytes. |
| public static final Integer | LENGTH_8
Denotes a variant type with a length of 8 bytes. |
| public static final Integer | LENGTH_UNKNOWN
Denotes a variant type with a length that is unknown to HPSF yet. |
| public static final Integer | LENGTH_VARIABLE
Denotes a variant type with a variable length. |
| private static final Object[][] | |
| private static final Map | |
| private static final Map | numberToName
Maps the numbers denoting the variant types to their corresponding variant type names. |
| public static final int | VT_ARRAY
[V] SAFEARRAY*. |
| public static final int | VT_BLOB
[P] Length prefixed bytes. |
| public static final int | VT_BLOB_OBJECT
[P] Blob contains an object. |
| public static final int | VT_BOOL
[V][T][P][S] True=-1, False=0. |
| public static final int | VT_BSTR
[V][T][P][S] OLE Automation string. |
| public static final int | VT_BYREF
[V] void* for local use. |
| public static final int | VT_CARRAY
[T] C style array. |
| public static final int | VT_CF
[P] Clipboard format. |
| public static final int | VT_CLSID
[P] A Class ID. It consists of a 32 bit unsigned integer indicating the size of the structure, a 32 bit signed integer indicating (Clipboard Format Tag) indicating the type of data that it contains, and then a byte array containing the data. |
| public static final int | VT_CY
[V][T][P][S] currency. |
| public static final int | VT_DATE
[V][T][P][S] date. |
| public static final int | VT_DECIMAL
[V][T][S] 16 byte fixed point. |
| public static final int | VT_DISPATCH
[V][T][P][S] IDispatch |
| public static final int | VT_EMPTY
[V][P] Nothing, i.e. not a single byte of data. |
| public static final int | VT_ERROR
[V][T][S] SCODE |
| public static final int | VT_FILETIME
[P] FILETIME. |
| public static final int | VT_HRESULT
[T] Standard return type. |
| public static final int | VT_I1
[T] signed char. |
| public static final int | VT_I2
[V][T][P][S] 2 byte signed int. |
| public static final int | VT_I4
[V][T][P][S] 4 byte signed int. |
| public static final int | VT_I8
[T][P] signed 64-bit int. |
| public static final int | |
| public static final int | |
| public static final int | VT_INT
[T] signed machine int. |
| public static final int | VT_LPSTR
[T][P] null terminated string. |
| public static final int | VT_LPWSTR
[T][P] wide (Unicode) null terminated string. |
| public static final int | VT_NULL
[V][P] SQL style Null. |
| public static final int | VT_PTR
[T] pointer type. |
| public static final int | VT_R4
[V][T][P][S] 4 byte real. |
| public static final int | VT_R8
[V][T][P][S] 8 byte real. |
| public static final int | |
| public static final int | VT_SAFEARRAY
[T] (use VT_ARRAY in VARIANT). |
| public static final int | VT_STORAGE
[P] Name of the storage follows. |
| public static final int | VT_STORED_OBJECT
[P] Storage contains an object. |
| public static final int | VT_STREAM
[P] Name of the stream follows. |
| public static final int | VT_STREAMED_OBJECT
[P] Stream contains an object. |
| public static final int | |
| public static final int | VT_UI1
[V][T][P][S] unsigned char. |
| public static final int | VT_UI2
[T][P] unsigned short. |
| public static final int | VT_UI4
[T][P] unsigned int. |
| public static final int | VT_UI8
[T][P] unsigned 64-bit int. |
| public static final int | VT_UINT
[T] unsigned machine int. |
| public static final int | VT_UNKNOWN
[V][T][S] IUnknown |
| public static final int | VT_USERDEFINED
[T] user defined type. |
| public static final int | VT_VARIANT
[V][T][P][S] VARIANT |
| public static final int | VT_VECTOR
[P] simple counted array. |
| public static final int | VT_VERSIONED_STREAM
"MUST be a VersionedStream. |
| public static final int | VT_VOID
[T] C style void. |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public static int | Returns: The length of the variant type's data in bytes. If the length is variable, i.e. the length of a string, -1 is returned. If HPSF does not know the length, -2 is returned. The latter usually indicates an unsupported variant type.The variant type number variantType)Returns a variant type's length. |
| public static String | Returns: The variant type name or the string "unknown variant type"The variant type number variantType)Returns the variant type name associated with a variant type number. |
| LENGTH_0 | back to summary |
|---|---|
| public static final Integer LENGTH_0 Denotes a variant type with a length of 0 bytes. | |
| LENGTH_2 | back to summary |
|---|---|
| public static final Integer LENGTH_2 Denotes a variant type with a length of 2 bytes. | |
| LENGTH_4 | back to summary |
|---|---|
| public static final Integer LENGTH_4 Denotes a variant type with a length of 4 bytes. | |
| LENGTH_8 | back to summary |
|---|---|
| public static final Integer LENGTH_8 Denotes a variant type with a length of 8 bytes. | |
| LENGTH_UNKNOWN | back to summary |
|---|---|
| public static final Integer LENGTH_UNKNOWN Denotes a variant type with a length that is unknown to HPSF yet. | |
| LENGTH_VARIABLE | back to summary |
|---|---|
| public static final Integer LENGTH_VARIABLE Denotes a variant type with a variable length. | |
| NUMBER_TO_NAME_LIST | back to summary |
|---|---|
| private static final Object[][] NUMBER_TO_NAME_LIST | |
| numberToLength | back to summary |
|---|---|
| private static final Map<Long, Integer> numberToLength | |
| numberToName | back to summary |
|---|---|
| private static final Map<Long, String> numberToName Maps the numbers denoting the variant types to their corresponding variant type names. | |
| VT_ARRAY | back to summary |
|---|---|
| public static final int VT_ARRAY [V] SAFEARRAY*. How long is this? How is it to be interpreted? | |
| VT_BLOB | back to summary |
|---|---|
| public static final int VT_BLOB [P] Length prefixed bytes. | |
| VT_BLOB_OBJECT | back to summary |
|---|---|
| public static final int VT_BLOB_OBJECT [P] Blob contains an object. | |
| VT_BOOL | back to summary |
|---|---|
| public static final int VT_BOOL [V][T][P][S] True=-1, False=0. | |
| VT_BSTR | back to summary |
|---|---|
| public static final int VT_BSTR [V][T][P][S] OLE Automation string. | |
| VT_BYREF | back to summary |
|---|---|
| public static final int VT_BYREF [V] void* for local use. How long is this? How is it to be interpreted? | |
| VT_CARRAY | back to summary |
|---|---|
| public static final int VT_CARRAY [T] C style array. How long is this? How is it to be interpreted? | |
| VT_CF | back to summary |
|---|---|
| public static final int VT_CF [P] Clipboard format. | |
| VT_CLSID | back to summary |
|---|---|
| public static final int VT_CLSID [P] A Class ID. It consists of a 32 bit unsigned integer indicating the size of the structure, a 32 bit signed integer indicating (Clipboard Format Tag) indicating the type of data that it contains, and then a byte array containing the data. The valid Clipboard Format Tags are:
| |
| VT_CY | back to summary |
|---|---|
| public static final int VT_CY [V][T][P][S] currency. | |
| VT_DATE | back to summary |
|---|---|
| public static final int VT_DATE [V][T][P][S] date. | |
| VT_DECIMAL | back to summary |
|---|---|
| public static final int VT_DECIMAL [V][T][S] 16 byte fixed point. | |
| VT_DISPATCH | back to summary |
|---|---|
| public static final int VT_DISPATCH [V][T][P][S] IDispatch | |
| VT_EMPTY | back to summary |
|---|---|
| public static final int VT_EMPTY [V][P] Nothing, i.e. not a single byte of data. | |
| VT_ERROR | back to summary |
|---|---|
| public static final int VT_ERROR [V][T][S] SCODE | |
| VT_FILETIME | back to summary |
|---|---|
| public static final int VT_FILETIME [P] FILETIME. The FILETIME structure holds a date and time associated with a file. The structure identifies a 64-bit integer specifying the number of 100-nanosecond intervals which have passed since January 1, 1601. This 64-bit value is split into the two dwords stored in the structure. | |
| VT_HRESULT | back to summary |
|---|---|
| public static final int VT_HRESULT [T] Standard return type. | |
| VT_I1 | back to summary |
|---|---|
| public static final int VT_I1 [T] signed char. | |
| VT_I2 | back to summary |
|---|---|
| public static final int VT_I2 [V][T][P][S] 2 byte signed int. | |
| VT_I4 | back to summary |
|---|---|
| public static final int VT_I4 [V][T][P][S] 4 byte signed int. | |
| VT_I8 | back to summary |
|---|---|
| public static final int VT_I8 [T][P] signed 64-bit int. | |
| VT_ILLEGAL | back to summary |
|---|---|
| public static final int VT_ILLEGAL | |
| VT_ILLEGALMASKED | back to summary |
|---|---|
| public static final int VT_ILLEGALMASKED | |
| VT_INT | back to summary |
|---|---|
| public static final int VT_INT [T] signed machine int. | |
| VT_LPSTR | back to summary |
|---|---|
| public static final int VT_LPSTR [T][P] null terminated string. | |
| VT_LPWSTR | back to summary |
|---|---|
| public static final int VT_LPWSTR [T][P] wide (Unicode) null terminated string. | |
| VT_NULL | back to summary |
|---|---|
| public static final int VT_NULL [V][P] SQL style Null. | |
| VT_PTR | back to summary |
|---|---|
| public static final int VT_PTR [T] pointer type. | |
| VT_R4 | back to summary |
|---|---|
| public static final int VT_R4 [V][T][P][S] 4 byte real. | |
| VT_R8 | back to summary |
|---|---|
| public static final int VT_R8 [V][T][P][S] 8 byte real. | |
| VT_RESERVED | back to summary |
|---|---|
| public static final int VT_RESERVED | |
| VT_SAFEARRAY | back to summary |
|---|---|
| public static final int VT_SAFEARRAY [T] (use VT_ARRAY in VARIANT). | |
| VT_STORAGE | back to summary |
|---|---|
| public static final int VT_STORAGE [P] Name of the storage follows. | |
| VT_STORED_OBJECT | back to summary |
|---|---|
| public static final int VT_STORED_OBJECT [P] Storage contains an object. | |
| VT_STREAM | back to summary |
|---|---|
| public static final int VT_STREAM [P] Name of the stream follows. | |
| VT_STREAMED_OBJECT | back to summary |
|---|---|
| public static final int VT_STREAMED_OBJECT [P] Stream contains an object. | |
| VT_TYPEMASK | back to summary |
|---|---|
| public static final int VT_TYPEMASK | |
| VT_UI1 | back to summary |
|---|---|
| public static final int VT_UI1 [V][T][P][S] unsigned char. | |
| VT_UI2 | back to summary |
|---|---|
| public static final int VT_UI2 [T][P] unsigned short. | |
| VT_UI4 | back to summary |
|---|---|
| public static final int VT_UI4 [T][P] unsigned int. | |
| VT_UI8 | back to summary |
|---|---|
| public static final int VT_UI8 [T][P] unsigned 64-bit int. | |
| VT_UINT | back to summary |
|---|---|
| public static final int VT_UINT [T] unsigned machine int. | |
| VT_UNKNOWN | back to summary |
|---|---|
| public static final int VT_UNKNOWN [V][T][S] IUnknown | |
| VT_USERDEFINED | back to summary |
|---|---|
| public static final int VT_USERDEFINED [T] user defined type. | |
| VT_VARIANT | back to summary |
|---|---|
| public static final int VT_VARIANT [V][T][P][S] VARIANT | |
| VT_VECTOR | back to summary |
|---|---|
| public static final int VT_VECTOR [P] simple counted array. How long is this? How is it to be interpreted? | |
| VT_VERSIONED_STREAM | back to summary |
|---|---|
| public static final int VT_VERSIONED_STREAM "MUST be a VersionedStream. The storage representing the (non-simple) property set MUST have a stream element with the name in the StreamName field." -- [MS-OLEPS] -- v20110920; Object Linking and Embedding (OLE) Property Set Data Structures; page 24 / 63 | |
| VT_VOID | back to summary |
|---|---|
| public static final int VT_VOID [T] C style void. | |
| Variant | back to summary |
|---|---|
| public Variant() | |
| getVariantLength | back to summary |
|---|---|
| public static int getVariantLength(final long variantType) Returns a variant type's length.
| |
| getVariantName | back to summary |
|---|---|
| public static String getVariantName(final long variantType) Returns the variant type name associated with a variant type number.
| |