dib.reset(dob.getData(), dob.getLength());
Assert.assertEquals("\nLogType:", dib.readUTF());
String fileType = dib.readUTF();
Assert.assertEquals("\nLogLength:", dib.readUTF());
String fileLengthStr = dib.readUTF();
long fileLength = Long.parseLong(fileLengthStr);
Assert.assertEquals("\nLog Contents:\n", dib.readUTF());
byte[] buf = new byte[(int) fileLength]; // cast is okay in this