public void testWriteChars() throws IOException {
String name="Bela";
ByteArrayDataOutputStream out=new ByteArrayDataOutputStream(2);
out.writeChars(name);
assert out.position() == name.length() * 2;
ByteArrayDataInputStream in=new ByteArrayDataInputStream(out.buffer());
char[] tmp=new char[name.length()];
for(int i=0; i < name.length(); i++)
tmp[i]=in.readChar();
assert name.equals(new String(tmp));