question: private void writeHeader ( tsfile_header hdr , ByteBuffer useBuffer ) throws OncRpcException , IOException { try ( XdrEncodingFileWriter writer = new XdrEncodingFileWriter ( new Crc32AppendingFileWriter ( new SizeVerifyingWriter ( new FileChannelWriter ( file . get ( ) , 0 ) , ALL_HDR_CRC_LEN ) , 4 ) , useBuffer ) ) { Const . writeMimeHeader ( writer ) ; hdr . xdrEncode ( writer ) ; } }
target:  Write current header to file.