Package com.ibm.icu.impl

Examples of com.ibm.icu.impl.StringPrepDataReader


     */
    public StringPrep(InputStream inputStream) throws IOException{

        BufferedInputStream b = new BufferedInputStream(inputStream,DATA_BUFFER_SIZE);
 
        StringPrepDataReader reader = new StringPrepDataReader(b);
       
        // read the indexes           
        indexes = reader.readIndexes(INDEX_TOP);
  
        byte[] sprepBytes = new byte[indexes[INDEX_TRIE_SIZE]];
  

        //indexes[INDEX_MAPPING_DATA_SIZE] store the size of mappingData in bytes          
        mappingData = new char[indexes[INDEX_MAPPING_DATA_SIZE]/2];
        // load the rest of the data data and initialize the data members
        reader.read(sprepBytes,mappingData);
                                  
        sprepTrie = new CharTrie(new ByteArrayInputStream(sprepBytes), null);
             
        // get the data format version                          
        /*formatVersion = */reader.getDataFormatVersion();
        // get the options
        doNFKC            = ((indexes[OPTIONS] & NORMALIZATION_ON) > 0);
        checkBiDi         = ((indexes[OPTIONS] & CHECK_BIDI_ON) > 0);
        sprepUniVer   = getVersionInfo(reader.getUnicodeVersion());
        normCorrVer   = getVersionInfo(indexes[NORM_CORRECTNS_LAST_UNI_VERSION]);
        VersionInfo normUniVer = Normalizer.getUnicodeVersion();
        if(normUniVer.compareTo(sprepUniVer) < 0 && /* the Unicode version of SPREP file must be less than the Unicode Vesion of the normalization data */
           normUniVer.compareTo(normCorrVer) < 0 && /* the Unicode version of the NormalizationCorrections.txt file should be less than the Unicode Vesion of the normalization data */
           ((indexes[OPTIONS] & NORMALIZATION_ON) > 0) /* normalization turned on*/
 
View Full Code Here


     */
    public StringPrep(InputStream inputStream) throws IOException{

        BufferedInputStream b = new BufferedInputStream(inputStream,DATA_BUFFER_SIZE);
 
        StringPrepDataReader reader = new StringPrepDataReader(b);
       
        // read the indexes           
        indexes = reader.readIndexes(INDEX_TOP);
  
        byte[] sprepBytes = new byte[indexes[INDEX_TRIE_SIZE]];
  

        //indexes[INDEX_MAPPING_DATA_SIZE] store the size of mappingData in bytes          
        mappingData = new char[indexes[INDEX_MAPPING_DATA_SIZE]/2];
        // load the rest of the data data and initialize the data members
        reader.read(sprepBytes,mappingData);
                                  
        sprepTrie = new CharTrie(new ByteArrayInputStream(sprepBytes), null);
             
        // get the data format version                          
        /*formatVersion = */reader.getDataFormatVersion();
        // get the options
        doNFKC            = ((indexes[OPTIONS] & NORMALIZATION_ON) > 0);
        checkBiDi         = ((indexes[OPTIONS] & CHECK_BIDI_ON) > 0);
        sprepUniVer   = getVersionInfo(reader.getUnicodeVersion());
        normCorrVer   = getVersionInfo(indexes[NORM_CORRECTNS_LAST_UNI_VERSION]);
        VersionInfo normUniVer = UCharacter.getUnicodeVersion();
        if(normUniVer.compareTo(sprepUniVer) < 0 && /* the Unicode version of SPREP file must be less than the Unicode Vesion of the normalization data */
           normUniVer.compareTo(normCorrVer) < 0 && /* the Unicode version of the NormalizationCorrections.txt file should be less than the Unicode Vesion of the normalization data */
           ((indexes[OPTIONS] & NORMALIZATION_ON) > 0) /* normalization turned on*/
 
View Full Code Here

     */
    public StringPrep(InputStream inputStream) throws IOException{

        BufferedInputStream b = new BufferedInputStream(inputStream,DATA_BUFFER_SIZE);
 
        StringPrepDataReader reader = new StringPrepDataReader(b);
       
        // read the indexes           
        indexes = reader.readIndexes(INDEX_TOP);
  
        byte[] sprepBytes = new byte[indexes[INDEX_TRIE_SIZE]];
  

        //indexes[INDEX_MAPPING_DATA_SIZE] store the size of mappingData in bytes          
        mappingData = new char[indexes[INDEX_MAPPING_DATA_SIZE]/2];
        // load the rest of the data data and initialize the data members
        reader.read(sprepBytes,mappingData);
                                  
        sprepTrie = new CharTrie(new ByteArrayInputStream(sprepBytes), null);
             
        // get the data format version                          
        /*formatVersion = */reader.getDataFormatVersion();
        // get the options
        doNFKC            = ((indexes[OPTIONS] & NORMALIZATION_ON) > 0);
        checkBiDi         = ((indexes[OPTIONS] & CHECK_BIDI_ON) > 0);
        sprepUniVer   = getVersionInfo(reader.getUnicodeVersion());
        normCorrVer   = getVersionInfo(indexes[NORM_CORRECTNS_LAST_UNI_VERSION]);
        VersionInfo normUniVer = UCharacter.getUnicodeVersion();
        if(normUniVer.compareTo(sprepUniVer) < 0 && /* the Unicode version of SPREP file must be less than the Unicode Vesion of the normalization data */
           normUniVer.compareTo(normCorrVer) < 0 && /* the Unicode version of the NormalizationCorrections.txt file should be less than the Unicode Vesion of the normalization data */
           ((indexes[OPTIONS] & NORMALIZATION_ON) > 0) /* normalization turned on*/
 
View Full Code Here

     */
    public StringPrep(InputStream inputStream) throws IOException{

        BufferedInputStream b = new BufferedInputStream(inputStream,DATA_BUFFER_SIZE);
 
        StringPrepDataReader reader = new StringPrepDataReader(b);
       
        // read the indexes           
        indexes = reader.readIndexes(INDEX_TOP);
  
        byte[] sprepBytes = new byte[indexes[INDEX_TRIE_SIZE]];
  

        //indexes[INDEX_MAPPING_DATA_SIZE] store the size of mappingData in bytes          
        mappingData = new char[indexes[INDEX_MAPPING_DATA_SIZE]/2];
        // load the rest of the data data and initialize the data members
        reader.read(sprepBytes,mappingData);
                                  
        sprepTrie = new CharTrie(new ByteArrayInputStream(sprepBytes), null);
             
        // get the data format version                          
        /*formatVersion = */reader.getDataFormatVersion();
        // get the options
        doNFKC            = ((indexes[OPTIONS] & NORMALIZATION_ON) > 0);
        checkBiDi         = ((indexes[OPTIONS] & CHECK_BIDI_ON) > 0);
        sprepUniVer   = getVersionInfo(reader.getUnicodeVersion());
        normCorrVer   = getVersionInfo(indexes[NORM_CORRECTNS_LAST_UNI_VERSION]);
        VersionInfo normUniVer = Normalizer.getUnicodeVersion();
        if(normUniVer.compareTo(sprepUniVer) < 0 && /* the Unicode version of SPREP file must be less than the Unicode Vesion of the normalization data */
           normUniVer.compareTo(normCorrVer) < 0 && /* the Unicode version of the NormalizationCorrections.txt file should be less than the Unicode Vesion of the normalization data */
           ((indexes[OPTIONS] & NORMALIZATION_ON) > 0) /* normalization turned on*/
 
View Full Code Here

     */
    public StringPrep(InputStream inputStream) throws IOException{

        BufferedInputStream b = new BufferedInputStream(inputStream,DATA_BUFFER_SIZE);
 
        StringPrepDataReader reader = new StringPrepDataReader(b);
       
        // read the indexes           
        indexes = reader.readIndexes(INDEX_TOP);
  
        byte[] sprepBytes = new byte[indexes[INDEX_TRIE_SIZE]];
  

        //indexes[INDEX_MAPPING_DATA_SIZE] store the size of mappingData in bytes          
        mappingData = new char[indexes[INDEX_MAPPING_DATA_SIZE]/2];
        // load the rest of the data data and initialize the data members
        reader.read(sprepBytes,mappingData);
                                  
        sprepTrie = new CharTrie(new ByteArrayInputStream(sprepBytes), null);
             
        // get the data format version                          
        formatVersion = reader.getDataFormatVersion();
        // get the options
        doNFKC            = ((indexes[OPTIONS] & NORMALIZATION_ON) > 0);
        checkBiDi         = ((indexes[OPTIONS] & CHECK_BIDI_ON) > 0);
        sprepUniVer   = getVersionInfo(reader.getUnicodeVersion());
        normCorrVer   = getVersionInfo(indexes[NORM_CORRECTNS_LAST_UNI_VERSION]);
        VersionInfo normUniVer = Normalizer.getUnicodeVersion();
        if(normUniVer.compareTo(sprepUniVer) < 0 && /* the Unicode version of SPREP file must be less than the Unicode Vesion of the normalization data */
           normUniVer.compareTo(normCorrVer) < 0 && /* the Unicode version of the NormalizationCorrections.txt file should be less than the Unicode Vesion of the normalization data */
           ((indexes[OPTIONS] & NORMALIZATION_ON) > 0) /* normalization turned on*/
 
View Full Code Here

TOP

Related Classes of com.ibm.icu.impl.StringPrepDataReader

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.