question: private void readHeader ( ) throws IOException { byte [ ] signatureBytes = new byte [ 8 ] ; for ( int i = 0 ; i < 8 ; i ++ ) signatureBytes [ i ] = plogStream . readByte ( ) ; String stringifiedHeader = new String ( signatureBytes , "US-ASCII" ) ; if ( ! stringifiedHeader . equals ( "PLOG\n \r " ) ) { throw new IOException ( "File header does not denote a PLOG file." ) ; } int major_file_version = readSwappedInteger ( plogStream ) ; int minor_file_version = readSwappedInteger ( plogStream ) ; if ( major_file_version != 1 || minor_file_version != 1 ) { throw new IOException ( "File header indicates version " + major_file_version + "." + minor_file_version + "; but it should be 1.1" ) ; } logger . info ( "Header and file version OK" ) ; return ; }
target:  Read the plog file header, checking it's really a plog file and the version is supported.