@Override
    public Message toMessage( ByteBuffer bytes ) {
        try {
            return (Message)Serializer.readClassAndObject(bytes);
        } catch( IOException e ) {
            throw new RuntimeException("Error deserializing object, class ID:" + bytes.getShort(0), e);   
        }         
    }
Creates and returns a message from the properly sized byte buffer
 using com.jme3.network.serializing.Serializer.
jme3-networking/src/main/java/com/jme3/network/base/protocol/SerializerMessageProtocol.java