private int findImageVersion ( DataInputStream in ) throws IOException { in . mark ( 42 ) ; // arbitrary amount, resetting immediately int version = in . readInt ( ) ; in . reset ( ) ; return version ; }
Check an fsimage datainputstream s version number .