### Question:
ByteCountingDataInput implements DataInput { @Override public void readFully(byte[] b) throws IOException { dataInput.readFully(b); count+=b.length; } ByteCountingDataInput(DataInput dataInput); @Override void readFully(byte[] b); @Override void readFully(byte[] b, int off, int len); @Override int skipBytes(int n); @Override boolean readBoolean(); @Override byte readByte(); @Override int readUnsignedByte(); @Override short readShort(); @Override int readUnsignedShort(); @Override char readChar(); @Override int readInt(); @Override long readLong(); @Override float readFloat(); @Override double readDouble(); @Override @Deprecated String readLine(); @Override String readUTF(); long getCount();  }### Answer:
@Test public void testReadFully() throws Exception { ByteCountingDataInput bcdi = new ByteCountingDataInput(new DataInputStream(new ByteArrayInputStream(alphabet.getBytes()))); byte[] bytes = new byte[26]; bcdi.readFully(bytes); assertEquals(26, bcdi.getCount()); assertArrayEquals(alphabet.getBytes(), bytes); }