Interface HttpDecoderInput
- All Superinterfaces:
AutoCloseable
,SafeCloseable
An input of
HttpDecoder
which is used to read a stream of HttpData
.-
Method Summary
Modifier and TypeMethodDescriptionbyte
getByte(int index)
Returns a byte at the specified absoluteindex
in thisHttpDecoderInput
.int
Returns the number of readable bytes.byte
readByte()
Reads a byte from the readable bytes.readBytes(int length)
Reads a newly retained slice of thisByteBuf
from the readable bytes.int
readInt()
Reads a 32-bit integer from the readable bytes.default short
Reads an unsigned byte from the readable bytes.void
skipBytes(int length)
Skips bytes of the specifiedlength
in thisHttpDecoderInput
.Methods inherited from interface com.linecorp.armeria.common.util.SafeCloseable
close
-
Method Details
-
readableBytes
int readableBytes()Returns the number of readable bytes. -
readByte
byte readByte()Reads a byte from the readable bytes. -
readUnsignedByte
default short readUnsignedByte()Reads an unsigned byte from the readable bytes. -
readInt
int readInt()Reads a 32-bit integer from the readable bytes. -
readBytes
Reads a newly retained slice of thisByteBuf
from the readable bytes.- Throws:
IllegalStateException
- if the specifiedlength
is greater thanreadableBytes()
-
getByte
byte getByte(int index)Returns a byte at the specified absoluteindex
in thisHttpDecoderInput
.- Throws:
IllegalStateException
- if the specifiedindex
is greater thanreadableBytes()
-
skipBytes
void skipBytes(int length)Skips bytes of the specifiedlength
in thisHttpDecoderInput
.- Throws:
IllegalStateException
- if the specifiedlength
is greater thanreadableBytes()
-