Top Fields Constructors Methods
com.ibm.icu.impl

public final Class StringPrepDataReader

extends Object
implements Authenticate
Class Inheritance
All Implemented Interfaces
com.ibm.icu.impl.ICUBinary.Authenticate
Imports
java.io.IOException, java.nio.ByteBuffer

Author
ram To change the template for this generated type comment go to Window>Preferences>Java>Code Generation>Code and Comments

Field Summary

Modifier and TypeField and Description
private ByteBuffer
byteBuffer

ICU data file input stream

private static final int
DATA_FORMAT_ID

File format version that this class understands.

private static final byte[]
private static final boolean
private int

Constructor Summary

AccessConstructor and Description
public
StringPrepDataReader(ByteBuffer
ICU StringPrep data file buffer
bytes
)

private constructor.

Method Summary

Modifier and TypeMethod and Description
public byte[]
public boolean
isDataVersionAcceptable(byte[]
version of the current data
version
)

Implements com.ibm.icu.impl.ICUBinary.Authenticate.isDataVersionAcceptable.

Method used in ICUBinary.readHeader() to provide data format authentication.
public char[]
read(int length)

public int[]
readIndexes(int length)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

byteBufferback to summary
private ByteBuffer byteBuffer

ICU data file input stream

DATA_FORMAT_IDback to summary
private static final int DATA_FORMAT_ID

File format version that this class understands. No guarantees are made if a older version is used see store.c of gennorm for more information and values

DATA_FORMAT_VERSIONback to summary
private static final byte[] DATA_FORMAT_VERSION
debugback to summary
private static final boolean debug
unicodeVersionback to summary
private int unicodeVersion

Constructor Detail

StringPrepDataReaderback to summary
public StringPrepDataReader(ByteBuffer bytes) throws IOException

private constructor.

Parameters
bytes:ByteBuffer

ICU StringPrep data file buffer

Exceptions
IOException:
throw if data file fails authentication

Method Detail

getUnicodeVersionback to summary
public byte[] getUnicodeVersion()
isDataVersionAcceptableback to summary
public boolean isDataVersionAcceptable(byte[] version)

Implements com.ibm.icu.impl.ICUBinary.Authenticate.isDataVersionAcceptable.

Doc from com.ibm.icu.impl.ICUBinary.Authenticate.isDataVersionAcceptable.

Method used in ICUBinary.readHeader() to provide data format authentication.

Parameters
version:byte[]

version of the current data

Returns:boolean

true if dataformat is an acceptable version, false otherwise

Annotations
@Override
readback to summary
public char[] read(int length) throws IOException
readIndexesback to summary
public int[] readIndexes(int length) throws IOException