private MessageFormatRecord.MessageHeader_Format getHeader(MessageFormatInputStream putStream) throws Exception {
    DataInputStream dStream = new DataInputStream(putStream);
    short headerVersion = dStream.readShort();
    ByteBuffer headerBuf = ByteBuffer.allocate(MessageFormatRecord.getHeaderSizeForVersion(headerVersion));
    headerBuf.putShort(headerVersion);
    Assert.assertEquals("Did not read header correctly", headerBuf.capacity() - Short.BYTES,
        dStream.read(headerBuf.array(), Short.BYTES, headerBuf.capacity() - Short.BYTES));
    headerBuf.rewind();
    return MessageFormatRecord.getMessageHeader(headerVersion, headerBuf);
  }
Get blob header info from input stream.
ambry-messageformat/src/test/java/com/github/ambry/messageformat/MessageFormatSendTest.java