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);
    }
@Test
    public void testReadString() throws Exception {
        try (WPInputStream wpInputStream = emptyWPStream()) {
            wpInputStream.readWPString(10);
            fail("should have thrown EOF");
        } catch (EOFException e) {
            //swallow
        }
    }