public String readWPString(int length) throws IOException {
        char[] chars = new char[length];
        for (int i = 0; i < length; i++) {
            int c = in.read();
            if (c == -1) {
                throw new EOFException();
            }
            chars[i] = (char) c;
        }
        return new String(chars);
    }
Reads a WordPerfect string of specified length (1 byte per character).

@param length how many characters to read
@return a string
@throws IOException if not enough bytes remain
tika-parsers/tika-parsers-standard/tika-parsers-standard-modules/tika-parser-miscoffice-module/src/main/java/org/apache/tika/parser/wordperfect/WPInputStream.java