Added method to read the header of Thrift messages