java/proto/src/main/java/com/pravala/protocol/SerializableBase.java
public int deserializeWithLength ( byte[] buffer, int offset ) throws CodecException
    {
        if ( buffer == null || offset < 0 || offset > buffer.length )
        {
            throw new CodecException ( ErrorCode.InvalidParameter );
        }

        return deserializeWithLength ( buffer, offset, buffer.length - offset );
    }
/**
     * Deserializes the entire message from the buffer
     *
     * It calls deserializeData from inheriting classes and also decodes the total message's length.
     * @param buffer The buffer to deserialize the data from
     * @param offset The offset in the buffer to start deserializing from
     * @return Negative value means that more bytes are needed. The number of missing bytes is the absolute
     *         value of the number returned. Positive value means that the entire message was deserialized,
     *         and that the returned number of bytes were consumed
     * @throws CodecException
     */
Deserializes the entire message from the buffer
It calls deserializeData from inheriting classes and also decodes the total message's length.
@param buffer The buffer to deserialize the data from
@param offset The offset in the buffer to start deserializing from
@return Negative value means that more bytes are needed. The number of missing bytes is the absolute
value of the number returned. Positive value means that the entire message was deserialized,
and that the returned number of bytes were consumed
@throws CodecException
Deserializes the entire message from the buffer It calls deserializeData from inheriting classes and also decodes the total message ' s length . @param buffer The buffer to deserialize the data from @param offset The offset in the buffer to start deserializing from @return Negative value means that more bytes are needed . The number of missing bytes is the absolute value of the number returned . Positive value means that the entire message was deserialized and that the returned number of bytes were consumed @throws CodecException
public int deserializeWithLength ( byte[] buffer, int offset ) throws CodecException
    {
        if ( buffer == null || offset < 0 || offset > buffer.length )
        {
            throw new CodecException ( ErrorCode.InvalidParameter );
        }
        return deserializeWithLength ( buffer, offset, buffer.length - offset );
    }
public int deserializeWithLength ( byte [ ] buffer , int offset ) throws CodecException { if ( buffer == null || offset < 0 || offset > buffer . length ) { throw new CodecException ( ErrorCode . InvalidParameter ) ; } return deserializeWithLength ( buffer , offset , buffer . length - offset ) ; }
Deserializes the entire message from the buffer
 It calls deserializeData from inheriting classes and also decodes the total message's length.
Deserializes the entire message from the buffer It calls deserializeData from inheriting classes and also decodes the total message ' s length .