jdk/src/java.base/share/classes/sun/text/normalizer/ICUBinary.java
changeset 30655 d83f50188ca9
parent 25859 3317bb8137f4
child 31680 88c53c2293b4
equal deleted inserted replaced
30654:3c2e826aa5ea 30655:d83f50188ca9
    63     // public methods --------------------------------------------------------
    63     // public methods --------------------------------------------------------
    64 
    64 
    65     /**
    65     /**
    66     * <p>ICU data header reader method.
    66     * <p>ICU data header reader method.
    67     * Takes a ICU generated big-endian input stream, parse the ICU standard
    67     * Takes a ICU generated big-endian input stream, parse the ICU standard
    68     * file header and authenticates them.</p>
    68     * file header and authenticates them.
    69     * <p>Header format:
    69     * <p>Header format:
    70     * <ul>
    70     * <ul>
    71     *     <li> Header size (char)
    71     *     <li> Header size (char)
    72     *     <li> Magic number 1 (byte)
    72     *     <li> Magic number 1 (byte)
    73     *     <li> Magic number 2 (byte)
    73     *     <li> Magic number 2 (byte)
    82     *                                          [2] milli [3] micro
    82     *                                          [2] milli [3] micro
    83     *     <li> Data version (4 bytes), the change version of the ICU data
    83     *     <li> Data version (4 bytes), the change version of the ICU data
    84     *                             [0] major [1] minor [2] milli [3] micro
    84     *                             [0] major [1] minor [2] milli [3] micro
    85     *     <li> Unicode version (4 bytes) this ICU is based on.
    85     *     <li> Unicode version (4 bytes) this ICU is based on.
    86     * </ul>
    86     * </ul>
    87     * </p>
    87     *
    88     * <p>
    88     * <p>
    89     * Example of use:<br>
    89     * Example of use:<br>
    90     * <pre>
    90     * <pre>
    91     * try {
    91     * try {
    92     *    FileInputStream input = new FileInputStream(filename);
    92     *    FileInputStream input = new FileInputStream(filename);
    96     *    }
    96     *    }
    97     * } catch (IOException e) {
    97     * } catch (IOException e) {
    98     *    System.out.println("This is not a ICU data file");
    98     *    System.out.println("This is not a ICU data file");
    99     * }
    99     * }
   100     * </pre>
   100     * </pre>
   101     * </p>
   101     *
   102     * @param inputStream input stream that contains the ICU data header
   102     * @param inputStream input stream that contains the ICU data header
   103     * @param dataFormatIDExpected Data format expected. An array of 4 bytes
   103     * @param dataFormatIDExpected Data format expected. An array of 4 bytes
   104     *                     information about the data format.
   104     *                     information about the data format.
   105     *                     E.g. data format ID 1.2.3.4. will became an array of
   105     *                     E.g. data format ID 1.2.3.4. will became an array of
   106     *                     {1, 2, 3, 4}
   106     *                     {1, 2, 3, 4}