public final String readTTFString ( int len ) throws IOException { if ( ( len + current ) > fsize ) { throw new java . io . EOFException ( "Reached EOF, file size=" + fsize ) ; } byte [ ] tmp = new byte [ len ] ; System . arraycopy ( file , current , tmp , 0 , len ) ; current += len ; final String encoding ; if ( ( tmp . length > 0 ) && ( tmp [ 0 ] == 0 ) ) { encoding = "UTF-16BE" ; } else { encoding = "ISO-8859-1" ; } return new String ( tmp , encoding ) ; }
Read an ISO - 8859 - 1 string of len bytes .