Class StringPrepDataReader

    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.nio.ByteBuffer byteBuffer
      ICU data file input stream
      private static int DATA_FORMAT_ID
      File format version that this class understands.
      private static byte[] DATA_FORMAT_VERSION  
      private static boolean debug  
      private int unicodeVersion  
    • Constructor Summary

      Constructors 
      Constructor Description
      StringPrepDataReader​(java.nio.ByteBuffer bytes)
      private constructor.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      byte[] getUnicodeVersion()  
      boolean isDataVersionAcceptable​(byte[] version)
      Method used in ICUBinary.readHeader() to provide data format authentication.
      char[] read​(int length)  
      int[] readIndexes​(int length)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • debug

        private static final boolean debug
      • byteBuffer

        private java.nio.ByteBuffer byteBuffer
        ICU data file input stream
      • unicodeVersion

        private int unicodeVersion
      • DATA_FORMAT_ID

        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
        See Also:
        Constant Field Values
      • DATA_FORMAT_VERSION

        private static final byte[] DATA_FORMAT_VERSION
    • Constructor Detail

      • StringPrepDataReader

        public StringPrepDataReader​(java.nio.ByteBuffer bytes)
                             throws java.io.IOException

        private constructor.

        Parameters:
        bytes - ICU StringPrep data file buffer
        Throws:
        java.io.IOException - throw if data file fails authentication
    • Method Detail

      • read

        public char[] read​(int length)
                    throws java.io.IOException
        Throws:
        java.io.IOException
      • isDataVersionAcceptable

        public boolean isDataVersionAcceptable​(byte[] version)
        Description copied from interface: ICUBinary.Authenticate
        Method used in ICUBinary.readHeader() to provide data format authentication.
        Specified by:
        isDataVersionAcceptable in interface ICUBinary.Authenticate
        Parameters:
        version - version of the current data
        Returns:
        true if dataformat is an acceptable version, false otherwise
      • readIndexes

        public int[] readIndexes​(int length)
                          throws java.io.IOException
        Throws:
        java.io.IOException
      • getUnicodeVersion

        public byte[] getUnicodeVersion()