src/main/java/pityoulish/sockets/server/TLVRequestParserImpl.java
protected int parseLimit(MsgBoardTLV tlv)
    throws ProtocolException
  {
    if (tlv.getLength() != 1)
       throw Catalog.INVALID_TLV_LENGTH_2.asPX(tlv.getType(), tlv.getStart());

    int limit = tlv.getData()[tlv.getValueStart()] & 0xff;
    if ((limit < 1) || (limit > 127))
       throw Catalog.INVALID_TLV_VALUE_3.asPX
         (tlv.getType(), tlv.getStart(), limit);

    return limit;
  }
/**
   * Parses the value of a {@link MsgBoardType#LIMIT LIMIT} TLV.
   *
   * @param tlv   the TLV to parse
   *
   * @return the limit
   *
   * @throws ProtocolException if the value is invalid
   */
Parses the value of a  MsgBoardType#LIMIT LIMIT TLV.
@param tlv   the TLV to parse

@return the limit

@throws ProtocolException if the value is invalid
Parses the value of a MsgBoardType#LIMIT LIMIT TLV . @param tlv the TLV to parse @return the limit @throws ProtocolException if the value is invalid
protected int parseLimit(MsgBoardTLV tlv)
    throws ProtocolException
  {
    if (tlv.getLength() != 1)
       throw Catalog.INVALID_TLV_LENGTH_2.asPX(tlv.getType(), tlv.getStart());
    int limit = tlv.getData()[tlv.getValueStart()] & 0xff;
    if ((limit < 1) || (limit > 127))
       throw Catalog.INVALID_TLV_VALUE_3.asPX
         (tlv.getType(), tlv.getStart(), limit);
    return limit;
  }
protected int parseLimit ( MsgBoardTLV tlv ) throws ProtocolException { if ( tlv . getLength ( ) != 1 ) throw Catalog . INVALID_TLV_LENGTH_2 . asPX ( tlv . getType ( ) , tlv . getStart ( ) ) ; int limit = tlv . getData ( ) [ tlv . getValueStart ( ) ] & 0xff ; if ( ( limit < 1 ) || ( limit > 127 ) ) throw Catalog . INVALID_TLV_VALUE_3 . asPX ( tlv . getType ( ) , tlv . getStart ( ) , limit ) ; return limit ; }
Parses the value of a {@link MsgBoardType#LIMIT LIMIT} TLV.
Parses the value of a { @link MsgBoardType#LIMIT LIMIT } TLV .