public void testWriteBytes() {
String name="Bela";
ByteArrayDataOutputStream out=new ByteArrayDataOutputStream(2);
out.writeBytes(name);
assert out.position() == name.length();
ByteArrayDataInputStream in=new ByteArrayDataInputStream(out.buffer());
byte[] tmp=new byte[name.length()];
int read=in.read(tmp, 0, tmp.length);
assert read == name.length();