Class UConverterAliasDataReader

    • Field Summary

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

      Constructors 
      Modifier Constructor Description
      protected UConverterAliasDataReader​(java.nio.ByteBuffer bytes)
      Protected constructor.
    • Method Summary

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

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

      • byteBuffer

        private java.nio.ByteBuffer byteBuffer
        ICU data file buffer
      • 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

      • UConverterAliasDataReader

        protected UConverterAliasDataReader​(java.nio.ByteBuffer bytes)
                                     throws java.io.IOException

        Protected constructor.

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

      • readToc

        protected int[] readToc​(int n)
                         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