/** java.io.ObjectOutputStream#writeBytes(java.lang.String) */ public void test_writeBytesLjava_lang_String() throws Exception { // Test for method void // java.io.ObjectOutputStream.writeBytes(java.lang.String) byte[] buf = new byte[10]; oos.writeBytes("HelloWorld"); oos.close(); ois = new ObjectInputStream(new ByteArrayInputStream(bao.toByteArray())); ois.readFully(buf); ois.close(); assertEquals("Wrote incorrect bytes value", "HelloWorld", new String(buf, 0, 10, "UTF-8")); }
@Override public void writeBytes(String str) throws IOException { out.writeBytes(str); }