Class DeframedMessage
java.lang.Object
com.linecorp.armeria.common.grpc.protocol.DeframedMessage
@UnstableApi public final class DeframedMessage extends Object
A deframed message. For uncompressed messages, we have the entire buffer available and return it
as is in
buf
to optimize parsing. For compressed messages, we will parse incrementally
and thus return an InputStream
in stream
.-
Constructor Summary
Constructors Constructor Description DeframedMessage(ByteBuf buf, int type)
Creates a new instance with the specifiedByteBuf
andtype
.DeframedMessage(InputStream stream, int type)
Creates a new instance with the specifiedInputStream
andtype
. -
Method Summary
Modifier and Type Method Description ByteBuf
buf()
Returns theByteBuf
.boolean
equals(Object o)
int
hashCode()
InputStream
stream()
Returns theInputStream
.int
type()
Returns the type.
-
Constructor Details
-
DeframedMessage
Creates a new instance with the specifiedByteBuf
andtype
. -
DeframedMessage
Creates a new instance with the specifiedInputStream
andtype
.
-
-
Method Details
-
buf
Returns theByteBuf
.- Returns:
- the
ByteBuf
, ornull
if not created withDeframedMessage(ByteBuf, int)
.
-
stream
Returns theInputStream
.- Returns:
- the
InputStream
, ornull
if not created withDeframedMessage(InputStream, int)
.
-
type
public int type()Returns the type. -
equals
-
hashCode
public int hashCode()
-