Ejemplo n.º 1
0
 private static byte[] readByteTable(DataInputStream in) throws IOException {
   if (in.read() != 't') throw new IOException("UnicodeNameMap file corrupt, byte table");
   int n = in.readUnsignedShort();
   byte[] table = new byte[n];
   in.readFully(table);
   return table;
 }
Ejemplo n.º 2
0
  private static char[] readCharTable(DataInputStream in) throws IOException {
    if (in.read() != 't') throw new IOException("UnicodeNameMap file corrupt, chartable");

    int n = in.readUnsignedShort() / 2;
    char[] table = new char[n];
    for (int i = 0; i < n; i++) {
      table[i] = in.readChar();
    }
    return table;
  }