@Test
    public void testCharArrays() throws java.io.IOException {
        stream.reset();
        char[] c = new char[] { 'a', 'b', 'c', '\u00F8' };
        ByteWriter bw = new ByteWriter(stream, encoder);
        bw.write(c);
        bw.close();
        byte[] res = stream.toByteArray();
        assertTrue(Arrays.equals(new byte[] { 97, 98, 99, (byte) 0xc3, (byte) 0xb8 }, res));
    }
A stream which does nothing, but complains if it is called and asked to
do nothing.
vespajlib/src/test/java/com/yahoo/io/ByteWriterTestCase.java