protected String readEncodingAndString(int max) throws IOException {
        byte encoding = readByte();
        return readEncodedString(encoding, max - 1);
    }
@Test
    public void testReadString() throws IOException {
        byte[] data = {
            ID3Reader.ENCODING_ISO,
            'T', 'e', 's', 't',
            0 // Null-terminated
        };
        CountingInputStream inputStream = new CountingInputStream(new ByteArrayInputStream(data));
        String string = new ID3Reader(inputStream).readEncodingAndString(1000);
        assertEquals("Test", string);
    }