public static < T > T readVersionAndDeSerialize ( SimpleVersionedSerializer < T > serializer , DataInputView in ) throws IOException { checkNotNull ( serializer , "serializer" ) ; checkNotNull ( in , "in" ) ; final int version = in . readInt ( ) ; final int length = in . readInt ( ) ; final byte [ ] data = new byte [ length ] ; in . readFully ( data ) ; return serializer . deserialize ( version , data ) ; }
Deserializes the version and datum from a stream .