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 class
Exception that will get thrown if theObject
is to big to unmarshall -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final LimitingByteInput.TooBigObjectException
private final org.jboss.marshalling.ByteInput
private final long
private 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:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Throws:
IOException
-
available
- Specified by:
available
in interfaceorg.jboss.marshalling.ByteInput
- Throws:
IOException
-
read
- Specified by:
read
in interfaceorg.jboss.marshalling.ByteInput
- Throws:
IOException
-
read
- Specified by:
read
in interfaceorg.jboss.marshalling.ByteInput
- Throws:
IOException
-
read
- Specified by:
read
in interfaceorg.jboss.marshalling.ByteInput
- Throws:
IOException
-
skip
- Specified by:
skip
in interfaceorg.jboss.marshalling.ByteInput
- Throws:
IOException
-
readable
private int readable(int length)
-