Top Description Fields Constructors Methods
io.netty.handler.codec.http

public Class DefaultHttpContent

extends DefaultHttpObject
implements HttpContent
Class Inheritance
All Implemented Interfaces
io.netty.handler.codec.http.HttpContent, io.netty.buffer.ByteBufHolder, io.netty.util.ReferenceCounted, io.netty.handler.codec.http.HttpObject, io.netty.handler.codec.DecoderResultProvider
Known Direct Subclasses
io.netty.handler.codec.http.DefaultLastHttpContent
Imports
io.netty.buffer.ByteBuf, io.netty.util.internal.ObjectUtil, .StringUtil

The default HttpContent implementation.

Field Summary

Modifier and TypeField and Description
private final ByteBuf

Constructor Summary

AccessConstructor and Description
public
DefaultHttpContent(ByteBuf content)

Creates a new instance with the specified chunk content.

Method Summary

Modifier and TypeMethod and Description
public ByteBuf
content()

Implements io.netty.buffer.ByteBufHolder.content.

Return the data which is held by this ByteBufHolder.
public HttpContent
copy()

Implements io.netty.handler.codec.http.HttpContent.copy.

Creates a deep copy of this ByteBufHolder.
public HttpContent
public int
refCnt()

Implements io.netty.util.ReferenceCounted.refCnt.

Returns the reference count of this object.
public boolean
release()

Implements io.netty.util.ReferenceCounted.release.

Decreases the reference count by 1 and deallocates this object if the reference count reaches at 0.
public boolean
release(int decrement)

Implements io.netty.util.ReferenceCounted.release.

Decreases the reference count by the specified decrement and deallocates this object if the reference count reaches at 0.
public HttpContent
replace(ByteBuf content)

Implements io.netty.handler.codec.http.HttpContent.replace.

Returns a new ByteBufHolder which contains the specified content.
public HttpContent
retain()

Implements io.netty.handler.codec.http.HttpContent.retain.

Increases the reference count by 1.
public HttpContent
retain(int increment)

Implements io.netty.handler.codec.http.HttpContent.retain.

Increases the reference count by the specified increment.
public HttpContent
public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.
public HttpContent
touch()

Implements io.netty.handler.codec.http.HttpContent.touch.

Records the current access location of this object for debugging purposes.
public HttpContent
touch(Object hint)

Implements io.netty.handler.codec.http.HttpContent.touch.

Records the current access location of this object with an additional arbitrary information for debugging purposes.
Inherited from io.netty.handler.codec.http.DefaultHttpObject:
decoderResultequalsgetDecoderResulthashCodesetDecoderResult

Field Detail

contentback to summary
private final ByteBuf content

Constructor Detail

DefaultHttpContentback to summary
public DefaultHttpContent(ByteBuf content)

Creates a new instance with the specified chunk content.

Method Detail

contentback to summary
public ByteBuf content()

Implements io.netty.buffer.ByteBufHolder.content.

Doc from io.netty.buffer.ByteBufHolder.content.

Return the data which is held by this ByteBufHolder.

Annotations
@Override
copyback to summary
public HttpContent copy()

Implements io.netty.handler.codec.http.HttpContent.copy.

Doc from io.netty.buffer.ByteBufHolder.copy.

Creates a deep copy of this ByteBufHolder.

Annotations
@Override
duplicateback to summary
public HttpContent duplicate()

Implements io.netty.handler.codec.http.HttpContent.duplicate.

Doc from io.netty.buffer.ByteBufHolder.duplicate.

Duplicates this ByteBufHolder. Be aware that this will not automatically call retain().

Annotations
@Override
refCntback to summary
public int refCnt()

Implements io.netty.util.ReferenceCounted.refCnt.

Doc from io.netty.util.ReferenceCounted.refCnt.

Returns the reference count of this object. If 0, it means this object has been deallocated.

Annotations
@Override
releaseback to summary
public boolean release()

Implements io.netty.util.ReferenceCounted.release.

Doc from io.netty.util.ReferenceCounted.release.

Decreases the reference count by 1 and deallocates this object if the reference count reaches at 0.

Returns:boolean

true if and only if the reference count became 0 and this object has been deallocated

Annotations
@Override
releaseback to summary
public boolean release(int decrement)

Implements io.netty.util.ReferenceCounted.release.

Doc from io.netty.util.ReferenceCounted.release.

Decreases the reference count by the specified decrement and deallocates this object if the reference count reaches at 0.

Returns:boolean

true if and only if the reference count became 0 and this object has been deallocated

Annotations
@Override
replaceback to summary
public HttpContent replace(ByteBuf content)

Implements io.netty.handler.codec.http.HttpContent.replace.

Doc from io.netty.buffer.ByteBufHolder.replace.

Returns a new ByteBufHolder which contains the specified content.

Annotations
@Override
retainback to summary
public HttpContent retain()

Implements io.netty.handler.codec.http.HttpContent.retain.

Doc from io.netty.util.ReferenceCounted.retain.

Increases the reference count by 1.

Annotations
@Override
retainback to summary
public HttpContent retain(int increment)

Implements io.netty.handler.codec.http.HttpContent.retain.

Doc from io.netty.util.ReferenceCounted.retain.

Increases the reference count by the specified increment.

Annotations
@Override
retainedDuplicateback to summary
public HttpContent retainedDuplicate()

Implements io.netty.handler.codec.http.HttpContent.retainedDuplicate.

Doc from io.netty.buffer.ByteBufHolder.retainedDuplicate.

Duplicates this ByteBufHolder. This method returns a retained duplicate unlike duplicate().

Annotations
@Override
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object.

Returns:String

a string representation of the object

Annotations
@Override
touchback to summary
public HttpContent touch()

Implements io.netty.handler.codec.http.HttpContent.touch.

Doc from io.netty.util.ReferenceCounted.touch.

Records 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 via ResourceLeakDetector. This method is a shortcut to touch(null).

Annotations
@Override
touchback to summary
public HttpContent touch(Object hint)

Implements io.netty.handler.codec.http.HttpContent.touch.

Doc from io.netty.util.ReferenceCounted.touch.

Records 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 via ResourceLeakDetector.

Annotations
@Override