Package io.netty.handler.codec.http
Class DefaultLastHttpContent
- java.lang.Object
-
- io.netty.handler.codec.http.DefaultHttpObject
-
- io.netty.handler.codec.http.DefaultHttpContent
-
- io.netty.handler.codec.http.DefaultLastHttpContent
-
- All Implemented Interfaces:
ByteBufHolder,DecoderResultProvider,HttpContent,HttpObject,LastHttpContent,ReferenceCounted
public class DefaultLastHttpContent extends DefaultHttpContent implements LastHttpContent
The defaultLastHttpContentimplementation.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static classDefaultLastHttpContent.TrailingHttpHeaders
-
Field Summary
Fields Modifier and Type Field Description private HttpHeaderstrailingHeadersprivate booleanvalidateHeaders-
Fields inherited from interface io.netty.handler.codec.http.LastHttpContent
EMPTY_LAST_CONTENT
-
-
Constructor Summary
Constructors Constructor Description DefaultLastHttpContent()DefaultLastHttpContent(ByteBuf content)DefaultLastHttpContent(ByteBuf content, boolean validateHeaders)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private voidappendHeaders(java.lang.StringBuilder buf)LastHttpContentcopy()Creates a deep copy of thisByteBufHolder.LastHttpContentduplicate()Duplicates thisByteBufHolder.LastHttpContentreplace(ByteBuf content)Returns a newByteBufHolderwhich contains the specifiedcontent.LastHttpContentretain()Increases the reference count by1.LastHttpContentretain(int increment)Increases the reference count by the specifiedincrement.LastHttpContentretainedDuplicate()Duplicates thisByteBufHolder.java.lang.StringtoString()LastHttpContenttouch()Records the current access location of this object for debugging purposes.LastHttpContenttouch(java.lang.Object hint)Records the current access location of this object with an additional arbitrary information for debugging purposes.HttpHeaderstrailingHeaders()-
Methods inherited from class io.netty.handler.codec.http.DefaultHttpContent
content, refCnt, release, release
-
Methods inherited from class io.netty.handler.codec.http.DefaultHttpObject
decoderResult, equals, getDecoderResult, hashCode, setDecoderResult
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface io.netty.buffer.ByteBufHolder
content
-
Methods inherited from interface io.netty.handler.codec.DecoderResultProvider
decoderResult, setDecoderResult
-
Methods inherited from interface io.netty.handler.codec.http.HttpObject
getDecoderResult
-
Methods inherited from interface io.netty.util.ReferenceCounted
refCnt, release, release
-
-
-
-
Field Detail
-
trailingHeaders
private final HttpHeaders trailingHeaders
-
validateHeaders
private final boolean validateHeaders
-
-
Method Detail
-
copy
public LastHttpContent copy()
Description copied from interface:ByteBufHolderCreates a deep copy of thisByteBufHolder.- Specified by:
copyin interfaceByteBufHolder- Specified by:
copyin interfaceHttpContent- Specified by:
copyin interfaceLastHttpContent- Overrides:
copyin classDefaultHttpContent
-
duplicate
public LastHttpContent duplicate()
Description copied from interface:ByteBufHolderDuplicates thisByteBufHolder. Be aware that this will not automatically callByteBufHolder.retain().- Specified by:
duplicatein interfaceByteBufHolder- Specified by:
duplicatein interfaceHttpContent- Specified by:
duplicatein interfaceLastHttpContent- Overrides:
duplicatein classDefaultHttpContent
-
retainedDuplicate
public LastHttpContent retainedDuplicate()
Description copied from interface:ByteBufHolderDuplicates thisByteBufHolder. This method returns a retained duplicate unlikeByteBufHolder.duplicate().- Specified by:
retainedDuplicatein interfaceByteBufHolder- Specified by:
retainedDuplicatein interfaceHttpContent- Specified by:
retainedDuplicatein interfaceLastHttpContent- Overrides:
retainedDuplicatein classDefaultHttpContent- See Also:
ByteBuf.retainedDuplicate()
-
replace
public LastHttpContent replace(ByteBuf content)
Description copied from interface:ByteBufHolderReturns a newByteBufHolderwhich contains the specifiedcontent.- Specified by:
replacein interfaceByteBufHolder- Specified by:
replacein interfaceHttpContent- Specified by:
replacein interfaceLastHttpContent- Overrides:
replacein classDefaultHttpContent
-
retain
public LastHttpContent retain(int increment)
Description copied from interface:ReferenceCountedIncreases the reference count by the specifiedincrement.- Specified by:
retainin interfaceByteBufHolder- Specified by:
retainin interfaceHttpContent- Specified by:
retainin interfaceLastHttpContent- Specified by:
retainin interfaceReferenceCounted- Overrides:
retainin classDefaultHttpContent
-
retain
public LastHttpContent retain()
Description copied from interface:ReferenceCountedIncreases the reference count by1.- Specified by:
retainin interfaceByteBufHolder- Specified by:
retainin interfaceHttpContent- Specified by:
retainin interfaceLastHttpContent- Specified by:
retainin interfaceReferenceCounted- Overrides:
retainin classDefaultHttpContent
-
touch
public LastHttpContent touch()
Description copied from interface:ReferenceCountedRecords the current access location of this object for debugging purposes. If this object is determined to be leaked, the information recorded by this operation will be provided to you viaResourceLeakDetector. This method is a shortcut totouch(null).- Specified by:
touchin interfaceByteBufHolder- Specified by:
touchin interfaceHttpContent- Specified by:
touchin interfaceLastHttpContent- Specified by:
touchin interfaceReferenceCounted- Overrides:
touchin classDefaultHttpContent
-
touch
public LastHttpContent touch(java.lang.Object hint)
Description copied from interface:ReferenceCountedRecords the current access location of this object with an additional arbitrary information for debugging purposes. If this object is determined to be leaked, the information recorded by this operation will be provided to you viaResourceLeakDetector.- Specified by:
touchin interfaceByteBufHolder- Specified by:
touchin interfaceHttpContent- Specified by:
touchin interfaceLastHttpContent- Specified by:
touchin interfaceReferenceCounted- Overrides:
touchin classDefaultHttpContent
-
trailingHeaders
public HttpHeaders trailingHeaders()
- Specified by:
trailingHeadersin interfaceLastHttpContent
-
toString
public java.lang.String toString()
- Overrides:
toStringin classDefaultHttpContent
-
appendHeaders
private void appendHeaders(java.lang.StringBuilder buf)
-
-