/** * Sets the maximum allowed value specified as data length in the decoded data * <p> * Useful for preventing an OutOfMemory attack by the peer. * The decoder will throw a {@link BufferDataException} when data length * specified in the incoming data is greater than maxDataLength * The default value is {@link PrefixedStringDecoder#DEFAULT_MAX_DATA_LENGTH}. * <p> * This method does the same job as {@link PrefixedStringDecoder#setMaxDataLength(int)}. * * @param maxDataLength maximum allowed value specified as data length in the incoming data */ public void setDecoderMaxDataLength(int maxDataLength) { decoder.setMaxDataLength(maxDataLength); }
/** * Sets the maximum allowed value specified as data length in the decoded data * <p> * Useful for preventing an OutOfMemory attack by the peer. * The decoder will throw a {@link BufferDataException} when data length * specified in the incoming data is greater than maxDataLength * The default value is {@link PrefixedStringDecoder#DEFAULT_MAX_DATA_LENGTH}. * <p> * This method does the same job as {@link PrefixedStringDecoder#setMaxDataLength(int)}. * * @param maxDataLength maximum allowed value specified as data length in the incoming data */ public void setDecoderMaxDataLength(int maxDataLength) { decoder.setMaxDataLength(maxDataLength); }
/** * Sets the maximum allowed value specified as data length in the decoded data * <p> * Useful for preventing an OutOfMemory attack by the peer. * The decoder will throw a {@link BufferDataException} when data length * specified in the incoming data is greater than maxDataLength * The default value is {@link PrefixedStringDecoder#DEFAULT_MAX_DATA_LENGTH}. * * This method does the same job as {@link PrefixedStringDecoder#setMaxDataLength(int)}. * </p> * * @param maxDataLength maximum allowed value specified as data length in the incoming data */ public void setDecoderMaxDataLength(int maxDataLength) { decoder.setMaxDataLength(maxDataLength); }