Modifier and Type | Class and Description |
---|---|
public static interface | ICUBinary.
Special interface for data authentication |
private static class |
Modifier and Type | Field and Description |
---|---|
private static final byte | |
private static final byte | CHAR_SET_
File format authentication values |
private static final byte | |
private static final String | |
private static final byte | MAGIC1
Magic numbers to authenticate the data file |
private static final byte | |
private static final String | MAGIC_NUMBER_AUTHENTICATION_FAILED_
Error messages |
Access | Constructor and Description |
---|---|
public |
Modifier and Type | Method and Description |
---|---|
public static byte[] | |
public static char[] | |
public static int[] | |
public static ByteBuffer | Returns: The data as a read-only ByteBuffer.Relative ICU data item path, for example "root.res" or "coll/ucadata.icu". itemPath)Loads an ICU binary data file and returns it as a ByteBuffer. |
public static String | |
public static VersionInfo | getVersionInfoFromCompactInt(int version)
Returns a VersionInfo for the bytes in the compact version integer. |
public static final byte[] | readHeader(InputStream inputStream, byte[] dataFormatIDExpected, ICUBinary.
|
public static int | Returns: dataVersionReads an ICU data header, checks the data format, and returns the data version. |
public static VersionInfo | readHeaderAndDataVersion(ByteBuffer bytes, int dataFormat, ICUBinary.
Same as readHeader(), but returns a VersionInfo rather than a compact int. |
public static void |
BIG_ENDIAN_ | back to summary |
---|---|
private static final byte BIG_ENDIAN_ |
CHAR_SET_ | back to summary |
---|---|
private static final byte CHAR_SET_ File format authentication values |
CHAR_SIZE_ | back to summary |
---|---|
private static final byte CHAR_SIZE_ |
HEADER_AUTHENTICATION_FAILED_ | back to summary |
---|---|
private static final String HEADER_AUTHENTICATION_FAILED_ |
MAGIC1 | back to summary |
---|---|
private static final byte MAGIC1 Magic numbers to authenticate the data file |
MAGIC2 | back to summary |
---|---|
private static final byte MAGIC2 |
MAGIC_NUMBER_AUTHENTICATION_FAILED_ | back to summary |
---|---|
private static final String MAGIC_NUMBER_AUTHENTICATION_FAILED_ Error messages |
ICUBinary | back to summary |
---|---|
public ICUBinary() |
getBytes | back to summary |
---|---|
public static byte[] getBytes(ByteBuffer bytes, int length, int additionalSkipLength) |
getChars | back to summary |
---|---|
public static char[] getChars(ByteBuffer bytes, int length, int additionalSkipLength) |
getInts | back to summary |
---|---|
public static int[] getInts(ByteBuffer bytes, int length, int additionalSkipLength) |
getRequiredData | back to summary |
---|---|
public static ByteBuffer getRequiredData(String itemPath) Loads an ICU binary data file and returns it as a ByteBuffer. The buffer contents is normally read-only, but its position etc. can be modified.
|
getString | back to summary |
---|---|
public static String getString(ByteBuffer bytes, int length, int additionalSkipLength) |
getVersionInfoFromCompactInt | back to summary |
---|---|
public static VersionInfo getVersionInfoFromCompactInt(int version) Returns a VersionInfo for the bytes in the compact version integer. |
readHeader | back to summary |
---|---|
public static final byte[] readHeader(InputStream inputStream, byte[] dataFormatIDExpected, ICUBinary. |
readHeader | back to summary |
---|---|
public static int readHeader(ByteBuffer bytes, int dataFormat, ICUBinary. Reads an ICU data header, checks the data format, and returns the data version. Assumes that the ByteBuffer position is 0 on input. The buffer byte order is set according to the data. The buffer position is advanced past the header (including UDataInfo and comment). See C++ ucmndata.h and unicode/udata.h.
|
readHeaderAndDataVersion | back to summary |
---|---|
public static VersionInfo readHeaderAndDataVersion(ByteBuffer bytes, int dataFormat, ICUBinary. Same as readHeader(), but returns a VersionInfo rather than a compact int. |
skipBytes | back to summary |
---|---|
public static void skipBytes(ByteBuffer bytes, int skipLength) |
Modifier and Type | Method and Description |
---|---|
public boolean | Returns: true if dataformat is an acceptable version, false otherwiseversion of the current data version)Method used in ICUBinary.readHeader() to provide data format authentication. |
isDataVersionAcceptable | back to summary |
---|---|
public boolean isDataVersionAcceptable(byte[] version) Method used in ICUBinary.readHeader() to provide data format authentication.
|
Access | Constructor and Description |
---|---|
private |
Modifier and Type | Method and Description |
---|---|
public boolean | isDataVersionAcceptable(byte[]
version of the current data version)Implements jdk. Method used in ICUBinary.readHeader() to provide data format authentication. |
IsAcceptable | back to summary |
---|---|
private IsAcceptable() |
isDataVersionAcceptable | back to summary |
---|---|
public boolean isDataVersionAcceptable(byte[] version) Implements jdk. Doc from jdk. Method used in ICUBinary.readHeader() to provide data format authentication.
|