FIXME (3): Reading and writing should be made more uniform than it is now. The following items should be resolved:
| Modifier and Type | Field and Description |
|---|---|
| private static final Logger | |
| private static boolean | |
| private static final byte[] | |
| public static final int[] | SUPPORTED_TYPES
HPSF is able to read these |
| private static List | unsupportedMessage
Keeps a list of the variant types an "unsupported" message has already been issued for. |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public static boolean | Returns: true if logging is turned on, else
false.Checks whether logging of unsupported variant types warning is turned on or off. |
| public boolean | Returns: true if HPFS supports this type, else
falsethe variant type to check variantType)Checks whether HPSF supports the specified variant type. |
| public static Object | read(final byte[]
The byte array src, final int The offset in the byte array where the variant starts offset, final int The length of the variant including the variant type field length, final long The variant type to read type, final int The codepage to use for non-wide strings codepage)Reads a variant type from a byte array. |
| public static Object | |
| public static void | setLogUnsupportedTypes(final boolean
If logUnsupportedTypes)true warnings will be written,
if false they won't.Specifies whether warnings about unsupported variant types are to be
written to |
| public static int | Returns: The number of entities that have been written. In many cases an "entity" is a byte but this is not always the case.The stream to write the value to. out, final long The variant's type. type, final Object The variant's value. value, final int The codepage to use to write non-wide strings codepage)Writes a variant value to an output stream. |
| protected static void | writeUnsupportedTypeMessage(final UnsupportedVariantTypeException
The exception to log ex)Writes a warning to |
| LOG | back to summary |
|---|---|
| private static final Logger LOG | |
| logUnsupportedTypes | back to summary |
|---|---|
| private static boolean logUnsupportedTypes | |
| paddingBytes | back to summary |
|---|---|
| private static final byte[] paddingBytes | |
| SUPPORTED_TYPES | back to summary |
|---|---|
| public static final int[] SUPPORTED_TYPES HPSF is able to read these | |
| unsupportedMessage | back to summary |
|---|---|
| private static List<Long> unsupportedMessage Keeps a list of the variant types an "unsupported" message has already been issued for. | |
| VariantSupport | back to summary |
|---|---|
| public VariantSupport() | |
| isLogUnsupportedTypes | back to summary |
|---|---|
| public static boolean isLogUnsupportedTypes() Checks whether logging of unsupported variant types warning is turned on or off.
| |
| isSupportedType | back to summary |
|---|---|
| public boolean isSupportedType(final int variantType) Checks whether HPSF supports the specified variant type. Unsupported
types should be implemented included in the
| |
| read | back to summary |
|---|---|
| public static Object read(final byte[] src, final int offset, final int length, final long type, final int codepage) throws ReadingNotSupportedException, UnsupportedEncodingException Reads a variant type from a byte array.
| |
| read | back to summary |
|---|---|
| public static Object read(LittleEndianByteArrayInputStream lei, final int length, final long type, final int codepage) throws ReadingNotSupportedException, UnsupportedEncodingException | |
| setLogUnsupportedTypes | back to summary |
|---|---|
| public static void setLogUnsupportedTypes(final boolean logUnsupportedTypes) Specifies whether warnings about unsupported variant types are to be
written to
| |
| write | back to summary |
|---|---|
| public static int write(final OutputStream out, final long type, final Object value, final int codepage) throws IOException, WritingNotSupportedException Writes a variant value to an output stream. This method ensures that always a multiple of 4 bytes is written.
| |
| writeUnsupportedTypeMessage | back to summary |
|---|---|
| protected static void writeUnsupportedTypeMessage(final UnsupportedVariantTypeException ex) Writes a warning to
| |