private static FileHeader readHeader(File file) throws IOException {
        InputStream is =null;
        try {
            is = new BufferedInputStream(new FileInputStream(file));
            InputArchive ia=BinaryInputArchive.getArchive(is);
            FileHeader hdr = new FileHeader();
            hdr.deserialize(ia, "fileheader");
            return hdr;
         } finally {
             try {
                 if (is != null) is.close();
             } catch (IOException e) {
                 LOG.warn("Ignoring exception during close", e);
             }
         }
    }
private static FileHeader readHeader ( File file ) throws IOException { InputStream is = null ; try { is = new BufferedInputStream ( new FileInputStream ( file ) ) ; InputArchive ia = BinaryInputArchive . getArchive ( is ) ; FileHeader hdr = new FileHeader ( ) ; hdr . deserialize ( ia , "fileheader" ) ; return hdr ; } finally { try { if ( is != null ) is . close ( ) ; } catch ( IOException e ) { LOG . warn ( "Ignoring exception during close" , e ) ; } } }
read the header of the transaction file
@param file the transaction file to read
@return header that was read fomr the file
@throws IOException