@ SuppressWarnings ( "unchecked" ) private < T > T readById ( int id , BufferInput < ? > buffer ) { Class < T > type = ( Class < T > ) registry . type ( id ) ; if ( type == null ) throw new SerializationException ( "cannot deserialize: unknown type" ) ; TypeSerializer < T > serializer = getSerializer ( type ) ; if ( serializer == null ) throw new SerializationException ( "cannot deserialize: unknown type" ) ; return serializer . read ( type , buffer , this ) ; }
Reads a serializable object .