Interface ByteBufConvertible

All Known Implementing Classes:
AbstractByteBuf, AbstractDerivedByteBuf, AbstractPooledDerivedByteBuf, AbstractPooledDerivedByteBuf.PooledNonRetainedDuplicateByteBuf, AbstractPooledDerivedByteBuf.PooledNonRetainedSlicedByteBuf, AbstractReferenceCountedByteBuf, AbstractUnpooledSlicedByteBuf, AbstractUnsafeSwappedByteBuf, AdaptivePoolingAllocator.AdaptiveByteBuf, AdvancedLeakAwareByteBuf, AdvancedLeakAwareCompositeByteBuf, ByteBuf, ByteBufUtil.ThreadLocalDirectByteBuf, ByteBufUtil.ThreadLocalUnsafeDirectByteBuf, CompositeByteBuf, DuplicatedByteBuf, EmptyByteBuf, FixedCompositeByteBuf, FixedCompositeByteBuf.Component, PooledByteBuf, PooledDirectByteBuf, PooledDuplicatedByteBuf, PooledHeapByteBuf, PooledSlicedByteBuf, PooledUnsafeDirectByteBuf, PooledUnsafeHeapByteBuf, ReadOnlyByteBuf, ReadOnlyByteBufferBuf, ReadOnlyByteBufferBuf.ReadOnlyDuplicatedByteBuf, ReadOnlyByteBufferBuf.ReadOnlySlicedByteBuf, ReadOnlyUnsafeDirectByteBuf, ReplayingDecoderByteBuf, SimpleLeakAwareByteBuf, SimpleLeakAwareCompositeByteBuf, SlicedByteBuf, SwappedByteBuf, UnpooledByteBufAllocator.InstrumentedUnpooledDirectByteBuf, UnpooledByteBufAllocator.InstrumentedUnpooledHeapByteBuf, UnpooledByteBufAllocator.InstrumentedUnpooledUnsafeDirectByteBuf, UnpooledByteBufAllocator.InstrumentedUnpooledUnsafeHeapByteBuf, UnpooledByteBufAllocator.InstrumentedUnpooledUnsafeNoCleanerDirectByteBuf, UnpooledDirectByteBuf, UnpooledDuplicatedByteBuf, UnpooledHeapByteBuf, UnpooledSlicedByteBuf, UnpooledUnsafeDirectByteBuf, UnpooledUnsafeHeapByteBuf, UnpooledUnsafeNoCleanerDirectByteBuf, UnreleasableByteBuf, UnsafeDirectSwappedByteBuf, UnsafeHeapSwappedByteBuf, WrappedByteBuf, WrappedCompositeByteBuf, WrappedUnpooledUnsafeDirectByteBuf

public interface ByteBufConvertible
An interface that can be implemented by any object that know how to turn itself into a ByteBuf. All ByteBuf classes implement this interface, and return themselves.
  • Method Summary

    Modifier and Type
    Method
    Description
    Turn this object into a ByteBuf.
  • Method Details

    • asByteBuf

      ByteBuf asByteBuf()
      Turn this object into a ByteBuf. This does not increment the reference count of the ByteBuf instance. The conversion or exposure of the ByteBuf must be idempotent, so that this method can be called either once, or multiple times, without causing any change in program behaviour.
      Returns:
      A ByteBuf instance from this object.