Class ProtonBufferToNetty5Adapter

java.lang.Object
org.apache.qpid.protonj2.buffer.netty.ProtonBufferToNetty5Adapter
All Implemented Interfaces:
io.netty5.buffer.Buffer, io.netty5.buffer.BufferAccessor, io.netty5.util.Resource<io.netty5.buffer.Buffer>, AutoCloseable

public class ProtonBufferToNetty5Adapter extends Object implements io.netty5.buffer.Buffer
Adapts a ProtonBuffer instance to a Netty 5 Buffer
  • Constructor Details

    • ProtonBufferToNetty5Adapter

      public ProtonBufferToNetty5Adapter(ProtonBuffer resource)
  • Method Details

    • close

      public void close()
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface io.netty5.util.Resource<io.netty5.buffer.Buffer>
    • send

      public io.netty5.util.Send<io.netty5.buffer.Buffer> send()
      Specified by:
      send in interface io.netty5.util.Resource<io.netty5.buffer.Buffer>
    • isAccessible

      public boolean isAccessible()
      Specified by:
      isAccessible in interface io.netty5.util.Resource<io.netty5.buffer.Buffer>
    • compact

      public io.netty5.buffer.Buffer compact()
      Specified by:
      compact in interface io.netty5.buffer.Buffer
    • makeReadOnly

      public io.netty5.buffer.Buffer makeReadOnly()
      Specified by:
      makeReadOnly in interface io.netty5.buffer.Buffer
    • readOnly

      public boolean readOnly()
      Specified by:
      readOnly in interface io.netty5.buffer.Buffer
    • fill

      public io.netty5.buffer.Buffer fill(byte value)
      Specified by:
      fill in interface io.netty5.buffer.Buffer
    • isDirect

      public boolean isDirect()
      Specified by:
      isDirect in interface io.netty5.buffer.Buffer
    • capacity

      public int capacity()
      Specified by:
      capacity in interface io.netty5.buffer.Buffer
    • implicitCapacityLimit

      public io.netty5.buffer.Buffer implicitCapacityLimit(int limit)
      Specified by:
      implicitCapacityLimit in interface io.netty5.buffer.Buffer
    • implicitCapacityLimit

      public int implicitCapacityLimit()
      Specified by:
      implicitCapacityLimit in interface io.netty5.buffer.Buffer
    • readerOffset

      public int readerOffset()
      Specified by:
      readerOffset in interface io.netty5.buffer.Buffer
    • readerOffset

      public io.netty5.buffer.Buffer readerOffset(int offset)
      Specified by:
      readerOffset in interface io.netty5.buffer.Buffer
    • writerOffset

      public int writerOffset()
      Specified by:
      writerOffset in interface io.netty5.buffer.Buffer
    • writerOffset

      public io.netty5.buffer.Buffer writerOffset(int offset)
      Specified by:
      writerOffset in interface io.netty5.buffer.Buffer
    • ensureWritable

      public io.netty5.buffer.Buffer ensureWritable(int size, int minimumGrowth, boolean allowCompaction)
      Specified by:
      ensureWritable in interface io.netty5.buffer.Buffer
    • copyInto

      public void copyInto(int srcPos, byte[] dest, int destPos, int length)
      Specified by:
      copyInto in interface io.netty5.buffer.Buffer
    • copyInto

      public void copyInto(int srcPos, ByteBuffer dest, int destPos, int length)
      Specified by:
      copyInto in interface io.netty5.buffer.Buffer
    • copyInto

      public void copyInto(int srcPos, io.netty5.buffer.Buffer destination, int destPos, int length)
      Specified by:
      copyInto in interface io.netty5.buffer.Buffer
    • copy

      public io.netty5.buffer.Buffer copy(int offset, int length, boolean readOnly)
      Specified by:
      copy in interface io.netty5.buffer.Buffer
    • split

      public io.netty5.buffer.Buffer split(int splitOffset)
      Specified by:
      split in interface io.netty5.buffer.Buffer
    • bytesBefore

      public int bytesBefore(byte needle)
      Specified by:
      bytesBefore in interface io.netty5.buffer.Buffer
    • bytesBefore

      public int bytesBefore(io.netty5.buffer.Buffer needle)
      Specified by:
      bytesBefore in interface io.netty5.buffer.Buffer
    • transferTo

      public int transferTo(WritableByteChannel channel, int length) throws IOException
      Specified by:
      transferTo in interface io.netty5.buffer.Buffer
      Throws:
      IOException
    • transferFrom

      public int transferFrom(FileChannel channel, long position, int length) throws IOException
      Specified by:
      transferFrom in interface io.netty5.buffer.Buffer
      Throws:
      IOException
    • transferFrom

      public int transferFrom(ReadableByteChannel channel, int length) throws IOException
      Specified by:
      transferFrom in interface io.netty5.buffer.Buffer
      Throws:
      IOException
    • openCursor

      public io.netty5.buffer.ByteCursor openCursor()
      Specified by:
      openCursor in interface io.netty5.buffer.Buffer
    • openCursor

      public io.netty5.buffer.ByteCursor openCursor(int fromOffset, int length)
      Specified by:
      openCursor in interface io.netty5.buffer.Buffer
    • openReverseCursor

      public io.netty5.buffer.ByteCursor openReverseCursor(int fromOffset, int length)
      Specified by:
      openReverseCursor in interface io.netty5.buffer.Buffer
    • countComponents

      public int countComponents()
      Specified by:
      countComponents in interface io.netty5.buffer.Buffer
    • countReadableComponents

      public int countReadableComponents()
      Specified by:
      countReadableComponents in interface io.netty5.buffer.Buffer
    • countWritableComponents

      public int countWritableComponents()
      Specified by:
      countWritableComponents in interface io.netty5.buffer.Buffer
    • forEachComponent

      public <T extends io.netty5.buffer.BufferComponent & io.netty5.buffer.ComponentIterator.Next> io.netty5.buffer.ComponentIterator<T> forEachComponent()
      Specified by:
      forEachComponent in interface io.netty5.buffer.Buffer
    • setByte

      public io.netty5.buffer.Buffer setByte(int woff, byte value)
      Specified by:
      setByte in interface io.netty5.buffer.BufferAccessor
    • setUnsignedByte

      public io.netty5.buffer.Buffer setUnsignedByte(int woff, int value)
      Specified by:
      setUnsignedByte in interface io.netty5.buffer.BufferAccessor
    • setChar

      public io.netty5.buffer.Buffer setChar(int woff, char value)
      Specified by:
      setChar in interface io.netty5.buffer.BufferAccessor
    • setShort

      public io.netty5.buffer.Buffer setShort(int woff, short value)
      Specified by:
      setShort in interface io.netty5.buffer.BufferAccessor
    • setUnsignedShort

      public io.netty5.buffer.Buffer setUnsignedShort(int woff, int value)
      Specified by:
      setUnsignedShort in interface io.netty5.buffer.BufferAccessor
    • setMedium

      public io.netty5.buffer.Buffer setMedium(int woff, int value)
      Specified by:
      setMedium in interface io.netty5.buffer.BufferAccessor
    • setUnsignedMedium

      public io.netty5.buffer.Buffer setUnsignedMedium(int woff, int value)
      Specified by:
      setUnsignedMedium in interface io.netty5.buffer.BufferAccessor
    • setInt

      public io.netty5.buffer.Buffer setInt(int woff, int value)
      Specified by:
      setInt in interface io.netty5.buffer.BufferAccessor
    • setUnsignedInt

      public io.netty5.buffer.Buffer setUnsignedInt(int woff, long value)
      Specified by:
      setUnsignedInt in interface io.netty5.buffer.BufferAccessor
    • setLong

      public io.netty5.buffer.Buffer setLong(int woff, long value)
      Specified by:
      setLong in interface io.netty5.buffer.BufferAccessor
    • setFloat

      public io.netty5.buffer.Buffer setFloat(int woff, float value)
      Specified by:
      setFloat in interface io.netty5.buffer.BufferAccessor
    • setDouble

      public io.netty5.buffer.Buffer setDouble(int woff, double value)
      Specified by:
      setDouble in interface io.netty5.buffer.BufferAccessor
    • writeByte

      public io.netty5.buffer.Buffer writeByte(byte value)
      Specified by:
      writeByte in interface io.netty5.buffer.BufferAccessor
    • writeUnsignedByte

      public io.netty5.buffer.Buffer writeUnsignedByte(int value)
      Specified by:
      writeUnsignedByte in interface io.netty5.buffer.BufferAccessor
    • writeShort

      public io.netty5.buffer.Buffer writeShort(short value)
      Specified by:
      writeShort in interface io.netty5.buffer.BufferAccessor
    • writeUnsignedShort

      public io.netty5.buffer.Buffer writeUnsignedShort(int value)
      Specified by:
      writeUnsignedShort in interface io.netty5.buffer.BufferAccessor
    • writeChar

      public io.netty5.buffer.Buffer writeChar(char value)
      Specified by:
      writeChar in interface io.netty5.buffer.BufferAccessor
    • writeMedium

      public io.netty5.buffer.Buffer writeMedium(int value)
      Specified by:
      writeMedium in interface io.netty5.buffer.BufferAccessor
    • writeUnsignedMedium

      public io.netty5.buffer.Buffer writeUnsignedMedium(int value)
      Specified by:
      writeUnsignedMedium in interface io.netty5.buffer.BufferAccessor
    • writeInt

      public io.netty5.buffer.Buffer writeInt(int value)
      Specified by:
      writeInt in interface io.netty5.buffer.BufferAccessor
    • writeUnsignedInt

      public io.netty5.buffer.Buffer writeUnsignedInt(long value)
      Specified by:
      writeUnsignedInt in interface io.netty5.buffer.BufferAccessor
    • writeLong

      public io.netty5.buffer.Buffer writeLong(long value)
      Specified by:
      writeLong in interface io.netty5.buffer.BufferAccessor
    • writeFloat

      public io.netty5.buffer.Buffer writeFloat(float value)
      Specified by:
      writeFloat in interface io.netty5.buffer.BufferAccessor
    • writeDouble

      public io.netty5.buffer.Buffer writeDouble(double value)
      Specified by:
      writeDouble in interface io.netty5.buffer.BufferAccessor
    • writeCharSequence

      public io.netty5.buffer.Buffer writeCharSequence(CharSequence source, Charset charset)
      Specified by:
      writeCharSequence in interface io.netty5.buffer.Buffer
    • getByte

      public byte getByte(int index)
      Specified by:
      getByte in interface io.netty5.buffer.BufferAccessor
    • getChar

      public char getChar(int index)
      Specified by:
      getChar in interface io.netty5.buffer.BufferAccessor
    • getUnsignedByte

      public int getUnsignedByte(int index)
      Specified by:
      getUnsignedByte in interface io.netty5.buffer.BufferAccessor
    • getUnsignedShort

      public int getUnsignedShort(int index)
      Specified by:
      getUnsignedShort in interface io.netty5.buffer.BufferAccessor
    • getShort

      public short getShort(int index)
      Specified by:
      getShort in interface io.netty5.buffer.BufferAccessor
    • getMedium

      public int getMedium(int index)
      Specified by:
      getMedium in interface io.netty5.buffer.BufferAccessor
    • getUnsignedMedium

      public int getUnsignedMedium(int index)
      Specified by:
      getUnsignedMedium in interface io.netty5.buffer.BufferAccessor
    • getInt

      public int getInt(int index)
      Specified by:
      getInt in interface io.netty5.buffer.BufferAccessor
    • getUnsignedInt

      public long getUnsignedInt(int index)
      Specified by:
      getUnsignedInt in interface io.netty5.buffer.BufferAccessor
    • getLong

      public long getLong(int index)
      Specified by:
      getLong in interface io.netty5.buffer.BufferAccessor
    • getFloat

      public float getFloat(int index)
      Specified by:
      getFloat in interface io.netty5.buffer.BufferAccessor
    • getDouble

      public double getDouble(int index)
      Specified by:
      getDouble in interface io.netty5.buffer.BufferAccessor
    • readByte

      public byte readByte()
      Specified by:
      readByte in interface io.netty5.buffer.BufferAccessor
    • readUnsignedByte

      public int readUnsignedByte()
      Specified by:
      readUnsignedByte in interface io.netty5.buffer.BufferAccessor
    • readChar

      public char readChar()
      Specified by:
      readChar in interface io.netty5.buffer.BufferAccessor
    • readShort

      public short readShort()
      Specified by:
      readShort in interface io.netty5.buffer.BufferAccessor
    • readUnsignedShort

      public int readUnsignedShort()
      Specified by:
      readUnsignedShort in interface io.netty5.buffer.BufferAccessor
    • readMedium

      public int readMedium()
      Specified by:
      readMedium in interface io.netty5.buffer.BufferAccessor
    • readUnsignedMedium

      public int readUnsignedMedium()
      Specified by:
      readUnsignedMedium in interface io.netty5.buffer.BufferAccessor
    • readInt

      public int readInt()
      Specified by:
      readInt in interface io.netty5.buffer.BufferAccessor
    • readUnsignedInt

      public long readUnsignedInt()
      Specified by:
      readUnsignedInt in interface io.netty5.buffer.BufferAccessor
    • readLong

      public long readLong()
      Specified by:
      readLong in interface io.netty5.buffer.BufferAccessor
    • readFloat

      public float readFloat()
      Specified by:
      readFloat in interface io.netty5.buffer.BufferAccessor
    • readDouble

      public double readDouble()
      Specified by:
      readDouble in interface io.netty5.buffer.BufferAccessor
    • readCharSequence

      public CharSequence readCharSequence(int length, Charset charset)
      Specified by:
      readCharSequence in interface io.netty5.buffer.Buffer
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object