private SnapshotCodec getCodec ( InputStream in ) { BinaryDecoder decoder = new BinaryDecoder ( in ) ; int persistedVersion ; try { persistedVersion = decoder . readInt ( ) ; } catch ( IOException e ) { LOG . error ( "Unable to read transaction state version: " , e ) ; throw Throwables . propagate ( e ) ; } return getCodecForVersion ( persistedVersion ) ; }
Return the appropriate codec for the version in InputStream