static void testOut(String x)
{
try {
byte[] bytes = stringAsBytes(x) ;
ByteArrayOutputStream bout = new ByteArrayOutputStream() ;
Writer out = new OutStreamUTF8(bout) ;
out.write(x) ;
out.close() ;
byte[] bytes2 = bout.toByteArray() ;
assertArrayEquals(bytes, bytes2) ;
} catch (IOException ex) { throw new RuntimeException(ex) ; }
}