Top Description Methods
io.netty.buffer

public Interface ByteBufHolder

extends ReferenceCounted
Known Direct Implementers
io.netty.buffer.DefaultByteBufHolder
Imports
io.netty.util.ReferenceCounted

A packet which is send or receive.

Method Summary

Modifier and TypeMethod and Description
public ByteBuf
content()

Return the data which is held by this ByteBufHolder.

public ByteBufHolder
copy()

Creates a deep copy of this ByteBufHolder.

public ByteBufHolder
duplicate()

Duplicates this ByteBufHolder.

public ByteBufHolder
replace(ByteBuf content)

Returns a new ByteBufHolder which contains the specified content.

public ByteBufHolder
retain()

Redeclares io.netty.util.ReferenceCounted.retain.

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

Redeclares io.netty.util.ReferenceCounted.retain.

Increases the reference count by the specified increment.
public ByteBufHolder
retainedDuplicate()

Duplicates this ByteBufHolder.

public ByteBufHolder
touch()

Redeclares io.netty.util.ReferenceCounted.touch.

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

Redeclares io.netty.util.ReferenceCounted.touch.

Records the current access location of this object with an additional arbitrary information for debugging purposes.
Inherited from io.netty.util.ReferenceCounted:
refCntreleaserelease

Method Detail

contentback to summary
public ByteBuf content()

Return the data which is held by this ByteBufHolder.

copyback to summary
public ByteBufHolder copy()

Creates a deep copy of this ByteBufHolder.

duplicateback to summary
public ByteBufHolder duplicate()

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

replaceback to summary
public ByteBufHolder replace(ByteBuf content)

Returns a new ByteBufHolder which contains the specified content.

retainback to summary
public ByteBufHolder retain()

Redeclares io.netty.util.ReferenceCounted.retain.

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

Increases the reference count by 1.

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

Redeclares io.netty.util.ReferenceCounted.retain.

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

Increases the reference count by the specified increment.

Annotations
@Override
retainedDuplicateback to summary
public ByteBufHolder retainedDuplicate()

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

See Also
ByteBuf#retainedDuplicate()
touchback to summary
public ByteBufHolder touch()

Redeclares io.netty.util.ReferenceCounted.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 ByteBufHolder touch(Object hint)

Redeclares io.netty.util.ReferenceCounted.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