Class LimitingByteInput
java.lang.Object
org.jboss.netty.handler.codec.marshalling.LimitingByteInput
- All Implemented Interfaces:
Closeable, AutoCloseable, org.jboss.marshalling.ByteInput
ByteInput implementation which wraps another ByteInput and throws a LimitingByteInput.TooBigObjectException
if the read limit was reached.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) static final classException that will get thrown if theObjectis to big to unmarshall -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final LimitingByteInput.TooBigObjectExceptionprivate final org.jboss.marshalling.ByteInputprivate final longprivate long -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
EXCEPTION
-
input
private final org.jboss.marshalling.ByteInput input -
limit
private final long limit -
read
private long read
-
-
Constructor Details
-
LimitingByteInput
public LimitingByteInput(org.jboss.marshalling.ByteInput input, long limit)
-
-
Method Details
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException
-
available
- Specified by:
availablein interfaceorg.jboss.marshalling.ByteInput- Throws:
IOException
-
read
- Specified by:
readin interfaceorg.jboss.marshalling.ByteInput- Throws:
IOException
-
read
- Specified by:
readin interfaceorg.jboss.marshalling.ByteInput- Throws:
IOException
-
read
- Specified by:
readin interfaceorg.jboss.marshalling.ByteInput- Throws:
IOException
-
skip
- Specified by:
skipin interfaceorg.jboss.marshalling.ByteInput- Throws:
IOException
-
readable
private int readable(int length)
-