Class ByteBufHttpData
java.lang.Object
com.linecorp.armeria.common.AbstractHttpData
com.linecorp.armeria.common.unsafe.ByteBufHttpData
- All Implemented Interfaces:
HttpData
,HttpObject
,PooledHttpData
,SafeCloseable
,ByteBufHolder
,ReferenceCounted
,AutoCloseable
@Deprecated public final class ByteBufHttpData extends AbstractHttpData implements PooledHttpData
Deprecated.
Use
PooledHttpData
.-
Constructor Summary
Constructors Constructor Description ByteBufHttpData(ByteBuf buf, boolean endOfStream)
Deprecated.Constructs a newByteBufHttpData
. -
Method Summary
Modifier and Type Method Description byte[]
array()
Deprecated.Returns the underlying byte array of this data.void
close()
Deprecated.ByteBuf
content()
Deprecated.PooledHttpData
copy()
Deprecated.PooledHttpData
duplicate()
Deprecated.protected byte
getByte(int index)
Deprecated.Gets thebyte
value at the givenindex
.boolean
isEmpty()
Deprecated.Returns whether theHttpData.length()
is 0.boolean
isEndOfStream()
Deprecated.Tells whether the stream should be ended when writing this object.int
length()
Deprecated.Returns the length of this data.int
refCnt()
Deprecated.boolean
release()
Deprecated.boolean
release(int decrement)
Deprecated.PooledHttpData
replace(ByteBuf content)
Deprecated.PooledHttpData
retain()
Deprecated.PooledHttpData
retain(int increment)
Deprecated.PooledHttpData
retainedDuplicate()
Deprecated.InputStream
toInputStream()
Deprecated.Returns a newInputStream
that is sourced from this data.String
toString()
Deprecated.String
toString(Charset charset)
Deprecated.Decodes this data into aString
.PooledHttpData
touch()
Deprecated.PooledHttpData
touch(Object hint)
Deprecated.PooledHttpData
withEndOfStream(boolean endOfStream)
Deprecated.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.linecorp.armeria.common.HttpData
toReader, toReaderAscii, toReaderUtf8, toStringAscii, toStringUtf8
-
Constructor Details
-
ByteBufHttpData
Deprecated.Constructs a newByteBufHttpData
. Ownership ofbuf
is taken by thisByteBufHttpData
, which must not be mutated anymore.
-
-
Method Details
-
isEndOfStream
public boolean isEndOfStream()Deprecated.Description copied from interface:HttpObject
Tells whether the stream should be ended when writing this object. This can be useful forHttpHeaders
-only responses or to more efficiently close the stream along with the last piece ofHttpData
. This only has meaning forHttpObject
writers, not readers.- Specified by:
isEndOfStream
in interfaceHttpObject
-
array
public byte[] array()Deprecated.Description copied from interface:HttpData
Returns the underlying byte array of this data. -
length
public int length()Deprecated.Description copied from interface:HttpData
Returns the length of this data. -
isEmpty
public boolean isEmpty()Deprecated.Description copied from interface:HttpData
Returns whether theHttpData.length()
is 0. -
refCnt
public int refCnt()Deprecated.- Specified by:
refCnt
in interfaceReferenceCounted
-
retain
Deprecated.- Specified by:
retain
in interfaceByteBufHolder
- Specified by:
retain
in interfacePooledHttpData
- Specified by:
retain
in interfaceReferenceCounted
-
retain
Deprecated.- Specified by:
retain
in interfaceByteBufHolder
- Specified by:
retain
in interfacePooledHttpData
- Specified by:
retain
in interfaceReferenceCounted
-
touch
Deprecated.- Specified by:
touch
in interfaceByteBufHolder
- Specified by:
touch
in interfacePooledHttpData
- Specified by:
touch
in interfaceReferenceCounted
-
touch
Deprecated.- Specified by:
touch
in interfaceByteBufHolder
- Specified by:
touch
in interfacePooledHttpData
- Specified by:
touch
in interfaceReferenceCounted
-
release
public boolean release()Deprecated.- Specified by:
release
in interfaceReferenceCounted
-
release
public boolean release(int decrement)Deprecated.- Specified by:
release
in interfaceReferenceCounted
-
content
Deprecated.- Specified by:
content
in interfaceByteBufHolder
-
copy
Deprecated.- Specified by:
copy
in interfaceByteBufHolder
- Specified by:
copy
in interfacePooledHttpData
-
duplicate
Deprecated.- Specified by:
duplicate
in interfaceByteBufHolder
- Specified by:
duplicate
in interfacePooledHttpData
-
retainedDuplicate
Deprecated.- Specified by:
retainedDuplicate
in interfaceByteBufHolder
- Specified by:
retainedDuplicate
in interfacePooledHttpData
-
replace
Deprecated.- Specified by:
replace
in interfaceByteBufHolder
- Specified by:
replace
in interfacePooledHttpData
-
getByte
protected byte getByte(int index)Deprecated.Description copied from class:AbstractHttpData
Gets thebyte
value at the givenindex
.- Specified by:
getByte
in classAbstractHttpData
-
toString
Deprecated.Description copied from interface:HttpData
Decodes this data into aString
. -
toString
Deprecated. -
toInputStream
Deprecated.Description copied from interface:HttpData
Returns a newInputStream
that is sourced from this data.- Specified by:
toInputStream
in interfaceHttpData
-
withEndOfStream
Deprecated.Description copied from interface:PooledHttpData
Returns a newHttpData
whose HTTP/2endOfStream
flag is set toendOfStream
. Ownership of the pooled buffer is transferred to the returnedPooledHttpData
andthis
is effectively invalidated. In general, you should only use this method in a fluent invocation, e.g.,return PooledHttpData.wrap(buf).withEndOfStream(endOfStream)
.- Specified by:
withEndOfStream
in interfaceHttpData
- Specified by:
withEndOfStream
in interfacePooledHttpData
-
close
public void close()Deprecated.- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceSafeCloseable
-