public void testPutPrefixedStringWithPrefixLength() throws Exception {
CharsetEncoder encoder = Charset.forName("ISO-8859-1").newEncoder();
IoBuffer buf = IoBuffer.allocate(16).sweep().setAutoExpand(true);
buf.putPrefixedString("A", 1, encoder);
assertEquals(2, buf.position());
assertEquals(1, buf.get(0));
assertEquals('A', buf.get(1));
buf.sweep();
buf.putPrefixedString("A", 2, encoder);