public void testReadBeyondLimit() {
byte[] buf=new byte[100];
buf[10]='B'; buf[11]='e'; buf[12]='l'; buf[13]='a';
ByteArrayDataInputStream in=new ByteArrayDataInputStream(buf, 10, 4);
assert in.position() == 10;
assert in.limit() == 14;
assert in.capacity() == buf.length;
byte tmp[]=new byte[5];
try {
in.readFully(tmp, 0, tmp.length);
assert false : " should have gotten an exception";