Class DerivedReadOnlyByteBuf

  • All Implemented Interfaces:
    io.netty.util.ReferenceCounted, java.lang.Comparable<io.netty.buffer.ByteBuf>

    public final class DerivedReadOnlyByteBuf
    extends io.netty.buffer.AbstractByteBuf
    Immutable ByteBuf.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected byte _getByte​(int index)  
      protected int _getInt​(int index)  
      protected int _getIntLE​(int index)  
      protected long _getLong​(int index)  
      protected long _getLongLE​(int index)  
      protected short _getShort​(int index)  
      protected short _getShortLE​(int index)  
      protected int _getUnsignedMedium​(int index)  
      protected int _getUnsignedMediumLE​(int index)  
      protected void _setByte​(int index, int value)  
      protected void _setInt​(int index, int value)  
      protected void _setIntLE​(int index, int value)  
      protected void _setLong​(int index, long value)  
      protected void _setLongLE​(int index, long value)  
      protected void _setMedium​(int index, int value)  
      protected void _setMediumLE​(int index, int value)  
      protected void _setShort​(int index, int value)  
      protected void _setShortLE​(int index, int value)  
      io.netty.buffer.ByteBufAllocator alloc()  
      byte[] array()  
      int arrayOffset()  
      io.netty.buffer.ByteBuf asReadOnly()  
      int bytesBefore​(byte value)  
      int bytesBefore​(int length, byte value)  
      int bytesBefore​(int index, int length, byte value)  
      int capacity()  
      io.netty.buffer.ByteBuf capacity​(int newCapacity)  
      io.netty.buffer.ByteBuf copy​(int index, int length)  
      io.netty.buffer.ByteBuf discardReadBytes()  
      io.netty.buffer.ByteBuf discardSomeReadBytes()  
      io.netty.buffer.ByteBuf duplicate()  
      protected io.netty.buffer.ByteBuf duplicate0()  
      io.netty.buffer.ByteBuf ensureWritable​(int minWritableBytes)  
      int ensureWritable​(int minWritableBytes, boolean force)  
      int forEachByte​(int index, int length, io.netty.util.ByteProcessor processor)  
      int forEachByte​(io.netty.util.ByteProcessor processor)  
      int forEachByteDesc​(int index, int length, io.netty.util.ByteProcessor processor)  
      int forEachByteDesc​(io.netty.util.ByteProcessor processor)  
      io.netty.buffer.ByteBuf getBytes​(int index, byte[] dst, int dstIndex, int length)  
      io.netty.buffer.ByteBuf getBytes​(int index, io.netty.buffer.ByteBuf dst, int dstIndex, int length)  
      io.netty.buffer.ByteBuf getBytes​(int index, java.io.OutputStream out, int length)  
      io.netty.buffer.ByteBuf getBytes​(int index, java.nio.ByteBuffer dst)  
      int getBytes​(int index, java.nio.channels.FileChannel out, long position, int length)  
      int getBytes​(int index, java.nio.channels.GatheringByteChannel out, int length)  
      boolean hasArray()  
      boolean hasMemoryAddress()  
      int indexOf​(int fromIndex, int toIndex, byte value)  
      java.nio.ByteBuffer internalNioBuffer​(int index, int length)  
      boolean isDirect()  
      boolean isReadOnly()  
      boolean isWritable()  
      boolean isWritable​(int numBytes)  
      int maxWritableBytes()  
      long memoryAddress()  
      java.nio.ByteBuffer nioBuffer​(int index, int length)  
      int nioBufferCount()  
      java.nio.ByteBuffer[] nioBuffers​(int index, int length)  
      java.nio.ByteOrder order()  
      int refCnt()  
      boolean release()  
      boolean release​(int decrement)  
      io.netty.buffer.ByteBuf resetReaderIndex()  
      io.netty.buffer.ByteBuf resetWriterIndex()  
      io.netty.buffer.ByteBuf retain()  
      io.netty.buffer.ByteBuf retain​(int increment)  
      io.netty.buffer.ByteBuf setBytes​(int index, byte[] src, int srcIndex, int length)  
      io.netty.buffer.ByteBuf setBytes​(int index, io.netty.buffer.ByteBuf src, int srcIndex, int length)  
      int setBytes​(int index, java.io.InputStream in, int length)  
      io.netty.buffer.ByteBuf setBytes​(int index, java.nio.ByteBuffer src)  
      int setBytes​(int index, java.nio.channels.FileChannel in, long position, int length)  
      int setBytes​(int index, java.nio.channels.ScatteringByteChannel in, int length)  
      io.netty.buffer.ByteBuf slice​(int index, int length)  
      protected io.netty.buffer.ByteBuf slice0​(int index, int length)  
      protected int start​(int index, int length)  
      java.lang.String toString​(int index, int length, java.nio.charset.Charset charset)  
      io.netty.buffer.ByteBuf touch()  
      io.netty.buffer.ByteBuf touch​(java.lang.Object hint)  
      io.netty.buffer.ByteBuf unwrap()  
      protected io.netty.buffer.ByteBuf unwrap0()  
      int writableBytes()  
      • Methods inherited from class io.netty.buffer.AbstractByteBuf

        adjustMarkers, checkDstIndex, checkDstIndex, checkIndex, checkIndex, checkNewCapacity, checkReadableBytes, checkSrcIndex, clear, compareTo, copy, ensureAccessible, equals, getBoolean, getByte, getBytes, getBytes, getBytes, getChar, getCharSequence, getDouble, getFloat, getInt, getIntLE, getLong, getLongLE, getMedium, getMediumLE, getShort, getShortLE, getUnsignedByte, getUnsignedInt, getUnsignedIntLE, getUnsignedMedium, getUnsignedMediumLE, getUnsignedShort, getUnsignedShortLE, hashCode, isReadable, isReadable, markReaderIndex, markWriterIndex, maxCapacity, maxCapacity, newSwappedByteBuf, nioBuffer, nioBuffers, order, readableBytes, readBoolean, readByte, readBytes, readBytes, readBytes, readBytes, readBytes, readBytes, readBytes, readBytes, readBytes, readBytes, readChar, readCharSequence, readDouble, readerIndex, readerIndex, readFloat, readInt, readIntLE, readLong, readLongLE, readMedium, readMediumLE, readRetainedSlice, readShort, readShortLE, readSlice, readUnsignedByte, readUnsignedInt, readUnsignedIntLE, readUnsignedMedium, readUnsignedMediumLE, readUnsignedShort, readUnsignedShortLE, retainedDuplicate, retainedSlice, retainedSlice, setBoolean, setByte, setBytes, setBytes, setBytes, setChar, setCharSequence, setDouble, setFloat, setIndex, setInt, setIntLE, setLong, setLongLE, setMedium, setMediumLE, setShort, setShortLE, setZero, skipBytes, slice, toString, toString, trimIndicesToCapacity, writeBoolean, writeByte, writeBytes, writeBytes, writeBytes, writeBytes, writeBytes, writeBytes, writeBytes, writeBytes, writeBytes, writeChar, writeCharSequence, writeDouble, writeFloat, writeInt, writeIntLE, writeLong, writeLongLE, writeMedium, writeMediumLE, writerIndex, writerIndex, writeShort, writeShortLE, writeZero
      • Methods inherited from class io.netty.buffer.ByteBuf

        getDoubleLE, getFloatLE, isContiguous, maxFastWritableBytes, readDoubleLE, readFloatLE, setDoubleLE, setFloatLE, writeDoubleLE, writeFloatLE
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • DerivedReadOnlyByteBuf

        public DerivedReadOnlyByteBuf​(io.netty.buffer.ByteBuf buf)
      • DerivedReadOnlyByteBuf

        public DerivedReadOnlyByteBuf​(io.netty.buffer.ByteBuf buf,
                                      int offset,
                                      int length)
    • Method Detail

      • isReadOnly

        public boolean isReadOnly()
        Overrides:
        isReadOnly in class io.netty.buffer.AbstractByteBuf
      • asReadOnly

        public io.netty.buffer.ByteBuf asReadOnly()
        Overrides:
        asReadOnly in class io.netty.buffer.AbstractByteBuf
      • isWritable

        public boolean isWritable()
        Overrides:
        isWritable in class io.netty.buffer.AbstractByteBuf
      • isWritable

        public boolean isWritable​(int numBytes)
        Overrides:
        isWritable in class io.netty.buffer.AbstractByteBuf
      • writableBytes

        public int writableBytes()
        Overrides:
        writableBytes in class io.netty.buffer.AbstractByteBuf
      • maxWritableBytes

        public int maxWritableBytes()
        Overrides:
        maxWritableBytes in class io.netty.buffer.AbstractByteBuf
      • ensureWritable

        public io.netty.buffer.ByteBuf ensureWritable​(int minWritableBytes)
        Overrides:
        ensureWritable in class io.netty.buffer.AbstractByteBuf
      • ensureWritable

        public int ensureWritable​(int minWritableBytes,
                                  boolean force)
        Overrides:
        ensureWritable in class io.netty.buffer.AbstractByteBuf
      • duplicate0

        protected io.netty.buffer.ByteBuf duplicate0()
      • slice0

        protected io.netty.buffer.ByteBuf slice0​(int index,
                                                 int length)
      • hasMemoryAddress

        public boolean hasMemoryAddress()
      • memoryAddress

        public long memoryAddress()
      • start

        protected final int start​(int index,
                                  int length)
      • resetReaderIndex

        public io.netty.buffer.ByteBuf resetReaderIndex()
        Overrides:
        resetReaderIndex in class io.netty.buffer.AbstractByteBuf
      • resetWriterIndex

        public io.netty.buffer.ByteBuf resetWriterIndex()
        Overrides:
        resetWriterIndex in class io.netty.buffer.AbstractByteBuf
      • _getByte

        protected final byte _getByte​(int index)
        Specified by:
        _getByte in class io.netty.buffer.AbstractByteBuf
      • _getShort

        protected final short _getShort​(int index)
        Specified by:
        _getShort in class io.netty.buffer.AbstractByteBuf
      • _getShortLE

        protected final short _getShortLE​(int index)
        Specified by:
        _getShortLE in class io.netty.buffer.AbstractByteBuf
      • _getUnsignedMedium

        protected final int _getUnsignedMedium​(int index)
        Specified by:
        _getUnsignedMedium in class io.netty.buffer.AbstractByteBuf
      • _getUnsignedMediumLE

        protected final int _getUnsignedMediumLE​(int index)
        Specified by:
        _getUnsignedMediumLE in class io.netty.buffer.AbstractByteBuf
      • _getInt

        protected final int _getInt​(int index)
        Specified by:
        _getInt in class io.netty.buffer.AbstractByteBuf
      • _getIntLE

        protected final int _getIntLE​(int index)
        Specified by:
        _getIntLE in class io.netty.buffer.AbstractByteBuf
      • _getLong

        protected final long _getLong​(int index)
        Specified by:
        _getLong in class io.netty.buffer.AbstractByteBuf
      • _getLongLE

        protected final long _getLongLE​(int index)
        Specified by:
        _getLongLE in class io.netty.buffer.AbstractByteBuf
      • _setByte

        protected void _setByte​(int index,
                                int value)
        Specified by:
        _setByte in class io.netty.buffer.AbstractByteBuf
      • _setShort

        protected void _setShort​(int index,
                                 int value)
        Specified by:
        _setShort in class io.netty.buffer.AbstractByteBuf
      • _setShortLE

        protected void _setShortLE​(int index,
                                   int value)
        Specified by:
        _setShortLE in class io.netty.buffer.AbstractByteBuf
      • _setMedium

        protected void _setMedium​(int index,
                                  int value)
        Specified by:
        _setMedium in class io.netty.buffer.AbstractByteBuf
      • _setMediumLE

        protected void _setMediumLE​(int index,
                                    int value)
        Specified by:
        _setMediumLE in class io.netty.buffer.AbstractByteBuf
      • _setInt

        protected void _setInt​(int index,
                               int value)
        Specified by:
        _setInt in class io.netty.buffer.AbstractByteBuf
      • _setIntLE

        protected void _setIntLE​(int index,
                                 int value)
        Specified by:
        _setIntLE in class io.netty.buffer.AbstractByteBuf
      • _setLong

        protected void _setLong​(int index,
                                long value)
        Specified by:
        _setLong in class io.netty.buffer.AbstractByteBuf
      • _setLongLE

        protected void _setLongLE​(int index,
                                  long value)
        Specified by:
        _setLongLE in class io.netty.buffer.AbstractByteBuf
      • duplicate

        public final io.netty.buffer.ByteBuf duplicate()
        Overrides:
        duplicate in class io.netty.buffer.AbstractByteBuf
      • slice

        public final io.netty.buffer.ByteBuf slice​(int index,
                                                   int length)
        Overrides:
        slice in class io.netty.buffer.AbstractByteBuf
      • toString

        public final java.lang.String toString​(int index,
                                               int length,
                                               java.nio.charset.Charset charset)
        Overrides:
        toString in class io.netty.buffer.AbstractByteBuf
      • indexOf

        public final int indexOf​(int fromIndex,
                                 int toIndex,
                                 byte value)
        Overrides:
        indexOf in class io.netty.buffer.AbstractByteBuf
      • bytesBefore

        public int bytesBefore​(byte value)
        Overrides:
        bytesBefore in class io.netty.buffer.AbstractByteBuf
      • bytesBefore

        public int bytesBefore​(int length,
                               byte value)
        Overrides:
        bytesBefore in class io.netty.buffer.AbstractByteBuf
      • bytesBefore

        public int bytesBefore​(int index,
                               int length,
                               byte value)
        Overrides:
        bytesBefore in class io.netty.buffer.AbstractByteBuf
      • forEachByte

        public int forEachByte​(io.netty.util.ByteProcessor processor)
        Overrides:
        forEachByte in class io.netty.buffer.AbstractByteBuf
      • forEachByte

        public int forEachByte​(int index,
                               int length,
                               io.netty.util.ByteProcessor processor)
        Overrides:
        forEachByte in class io.netty.buffer.AbstractByteBuf
      • forEachByteDesc

        public int forEachByteDesc​(io.netty.util.ByteProcessor processor)
        Overrides:
        forEachByteDesc in class io.netty.buffer.AbstractByteBuf
      • forEachByteDesc

        public int forEachByteDesc​(int index,
                                   int length,
                                   io.netty.util.ByteProcessor processor)
        Overrides:
        forEachByteDesc in class io.netty.buffer.AbstractByteBuf
      • capacity

        public int capacity()
        Specified by:
        capacity in class io.netty.buffer.ByteBuf
      • capacity

        public io.netty.buffer.ByteBuf capacity​(int newCapacity)
        Specified by:
        capacity in class io.netty.buffer.ByteBuf
      • alloc

        public final io.netty.buffer.ByteBufAllocator alloc()
        Specified by:
        alloc in class io.netty.buffer.ByteBuf
      • order

        public final java.nio.ByteOrder order()
        Specified by:
        order in class io.netty.buffer.ByteBuf
      • unwrap

        public io.netty.buffer.ByteBuf unwrap()
        Specified by:
        unwrap in class io.netty.buffer.ByteBuf
      • unwrap0

        protected io.netty.buffer.ByteBuf unwrap0()
      • isDirect

        public final boolean isDirect()
        Specified by:
        isDirect in class io.netty.buffer.ByteBuf
      • getBytes

        public final io.netty.buffer.ByteBuf getBytes​(int index,
                                                      io.netty.buffer.ByteBuf dst,
                                                      int dstIndex,
                                                      int length)
        Specified by:
        getBytes in class io.netty.buffer.ByteBuf
      • getBytes

        public final io.netty.buffer.ByteBuf getBytes​(int index,
                                                      byte[] dst,
                                                      int dstIndex,
                                                      int length)
        Specified by:
        getBytes in class io.netty.buffer.ByteBuf
      • getBytes

        public final io.netty.buffer.ByteBuf getBytes​(int index,
                                                      java.nio.ByteBuffer dst)
        Specified by:
        getBytes in class io.netty.buffer.ByteBuf
      • getBytes

        public final io.netty.buffer.ByteBuf getBytes​(int index,
                                                      java.io.OutputStream out,
                                                      int length)
                                               throws java.io.IOException
        Specified by:
        getBytes in class io.netty.buffer.ByteBuf
        Throws:
        java.io.IOException
      • getBytes

        public final int getBytes​(int index,
                                  java.nio.channels.GatheringByteChannel out,
                                  int length)
                           throws java.io.IOException
        Specified by:
        getBytes in class io.netty.buffer.ByteBuf
        Throws:
        java.io.IOException
      • getBytes

        public final int getBytes​(int index,
                                  java.nio.channels.FileChannel out,
                                  long position,
                                  int length)
                           throws java.io.IOException
        Specified by:
        getBytes in class io.netty.buffer.ByteBuf
        Throws:
        java.io.IOException
      • setBytes

        public io.netty.buffer.ByteBuf setBytes​(int index,
                                                io.netty.buffer.ByteBuf src,
                                                int srcIndex,
                                                int length)
        Specified by:
        setBytes in class io.netty.buffer.ByteBuf
      • setBytes

        public io.netty.buffer.ByteBuf setBytes​(int index,
                                                byte[] src,
                                                int srcIndex,
                                                int length)
        Specified by:
        setBytes in class io.netty.buffer.ByteBuf
      • setBytes

        public io.netty.buffer.ByteBuf setBytes​(int index,
                                                java.nio.ByteBuffer src)
        Specified by:
        setBytes in class io.netty.buffer.ByteBuf
      • setBytes

        public int setBytes​(int index,
                            java.io.InputStream in,
                            int length)
                     throws java.io.IOException
        Specified by:
        setBytes in class io.netty.buffer.ByteBuf
        Throws:
        java.io.IOException
      • setBytes

        public int setBytes​(int index,
                            java.nio.channels.ScatteringByteChannel in,
                            int length)
                     throws java.io.IOException
        Specified by:
        setBytes in class io.netty.buffer.ByteBuf
        Throws:
        java.io.IOException
      • setBytes

        public int setBytes​(int index,
                            java.nio.channels.FileChannel in,
                            long position,
                            int length)
                     throws java.io.IOException
        Specified by:
        setBytes in class io.netty.buffer.ByteBuf
        Throws:
        java.io.IOException
      • copy

        public io.netty.buffer.ByteBuf copy​(int index,
                                            int length)
        Specified by:
        copy in class io.netty.buffer.ByteBuf
      • nioBufferCount

        public final int nioBufferCount()
        Specified by:
        nioBufferCount in class io.netty.buffer.ByteBuf
      • nioBuffer

        public final java.nio.ByteBuffer nioBuffer​(int index,
                                                   int length)
        Specified by:
        nioBuffer in class io.netty.buffer.ByteBuf
      • internalNioBuffer

        public final java.nio.ByteBuffer internalNioBuffer​(int index,
                                                           int length)
        Specified by:
        internalNioBuffer in class io.netty.buffer.ByteBuf
      • nioBuffers

        public final java.nio.ByteBuffer[] nioBuffers​(int index,
                                                      int length)
        Specified by:
        nioBuffers in class io.netty.buffer.ByteBuf
      • hasArray

        public final boolean hasArray()
        Specified by:
        hasArray in class io.netty.buffer.ByteBuf
      • array

        public final byte[] array()
        Specified by:
        array in class io.netty.buffer.ByteBuf
      • arrayOffset

        public final int arrayOffset()
        Specified by:
        arrayOffset in class io.netty.buffer.ByteBuf
      • retain

        public io.netty.buffer.ByteBuf retain​(int increment)
        Specified by:
        retain in interface io.netty.util.ReferenceCounted
        Specified by:
        retain in class io.netty.buffer.ByteBuf
      • refCnt

        public int refCnt()
      • retain

        public io.netty.buffer.ByteBuf retain()
        Specified by:
        retain in interface io.netty.util.ReferenceCounted
        Specified by:
        retain in class io.netty.buffer.ByteBuf
      • touch

        public io.netty.buffer.ByteBuf touch()
        Specified by:
        touch in interface io.netty.util.ReferenceCounted
        Specified by:
        touch in class io.netty.buffer.ByteBuf
      • touch

        public io.netty.buffer.ByteBuf touch​(java.lang.Object hint)
        Specified by:
        touch in interface io.netty.util.ReferenceCounted
        Specified by:
        touch in class io.netty.buffer.ByteBuf
      • release

        public boolean release()
      • release

        public boolean release​(int decrement)
      • discardReadBytes

        public io.netty.buffer.ByteBuf discardReadBytes()
        Overrides:
        discardReadBytes in class io.netty.buffer.AbstractByteBuf
      • discardSomeReadBytes

        public io.netty.buffer.ByteBuf discardSomeReadBytes()
        Overrides:
        discardSomeReadBytes in class io.netty.buffer.AbstractByteBuf