
com.ibm.icu.impl.StringPrepDataReader Maven / Gradle / Ivy
/*
******************************************************************************
* Copyright (C) 2003-2014, International Business Machines Corporation and
* others. All Rights Reserved.
******************************************************************************
*
* Created on May 2, 2003
*
* To change the template for this generated file go to
* Window>Preferences>Java>Code Generation>Code and Comments
*/
package com.ibm.icu.impl;
import java.io.IOException;
import java.nio.ByteBuffer;
/**
* @author ram
*
* To change the template for this generated type comment go to
* Window>Preferences>Java>Code Generation>Code and Comments
*/
public final class StringPrepDataReader implements ICUBinary.Authenticate {
private final static boolean debug = ICUDebug.enabled("NormalizerDataReader");
/**
* private constructor.
* @param bytes ICU StringPrep data file buffer
* @exception IOException throw if data file fails authentication
*/
public StringPrepDataReader(ByteBuffer bytes)
throws IOException{
if(debug) System.out.println("Bytes in buffer " + bytes.remaining());
byteBuffer = bytes;
unicodeVersion = ICUBinary.readHeader(byteBuffer, DATA_FORMAT_ID, this);
if(debug) System.out.println("Bytes left in byteBuffer " + byteBuffer.remaining());
}
public void read(char[] mappingTable) throws IOException{
//Read the extra data
for(int i=0;i
© 2015 - 2025 Weber Informatics LLC | Privacy Policy