java/proto/src/main/java/com/pravala/protocol/Codec.java
public static boolean readBool ( FieldHeader hdr, ReadBuffer readBuffer )
    throws CodecException
    {
        final byte tmpVal = readByte ( hdr, readBuffer );

        if ( tmpVal == 0 )
            return false;

        if ( tmpVal == 1 )
            return true;

        throw new DataSizeException ( 1, hdr.fieldSize );
    }
/**
     * Reads a single Boolean from the buffer.
     *
     *        If the length of the data is correct for this type (and there is
     *        enough bytes in the buffer), this function reads the data
     *        and moves the 'offset' to the end of that field.
     *
     * @param hdr This field's header description.
     * @param readBuffer The description of the buffer to read the field from.
     *        The offset field should be pointing to the beginning of the field's actual payload
     *        when this function is called. This function modifies this offset
     *        to point at the first byte of the next field's header (or to the index = size
     *        of the buffer when this is the last field).
     *
     * @return The value read
     * @throws CodecException
     */
Reads a single Boolean from the buffer.
If the length of the data is correct for this type (and there is
enough bytes in the buffer), this function reads the data
and moves the 'offset' to the end of that field.

@param hdr This field's header description.
@param readBuffer The description of the buffer to read the field from.
The offset field should be pointing to the beginning of the field's actual payload
when this function is called. This function modifies this offset
to point at the first byte of the next field's header (or to the index = size
of the buffer when this is the last field).

@return The value read
@throws CodecException
Reads a single Boolean from the buffer . If the length of the data is correct for this type ( and there is enough bytes in the buffer ) this function reads the data and moves the ' offset ' to the end of that field . @param hdr This field ' s header description . @param readBuffer The description of the buffer to read the field from . The offset field should be pointing to the beginning of the field ' s actual payload when this function is called . This function modifies this offset to point at the first byte of the next field ' s header ( or to the index = size of the buffer when this is the last field ) . @return The value read @throws CodecException
public static boolean readBool ( FieldHeader hdr, ReadBuffer readBuffer )
    throws CodecException
    {
        final byte tmpVal = readByte ( hdr, readBuffer );
        if ( tmpVal == 0 )
            return false;
        if ( tmpVal == 1 )
            return true;
        throw new DataSizeException ( 1, hdr.fieldSize );
    }
public static boolean readBool ( FieldHeader hdr , ReadBuffer readBuffer ) throws CodecException { final byte tmpVal = readByte ( hdr , readBuffer ) ; if ( tmpVal == 0 ) return false ; if ( tmpVal == 1 ) return true ; throw new DataSizeException ( 1 , hdr . fieldSize ) ; }
Reads a single Boolean from the buffer.
Reads a single Boolean from the buffer .