Class AbstractUnsafeSwappedByteBuf

    • Field Detail

      • nativeByteOrder

        private final boolean nativeByteOrder
    • Constructor Detail

      • AbstractUnsafeSwappedByteBuf

        AbstractUnsafeSwappedByteBuf​(AbstractByteBuf buf)
    • Method Detail

      • getLong

        public final long getLong​(int index)
        Description copied from class: ByteBuf
        Gets a 64-bit long integer at the specified absolute index in this buffer. This method does not modify readerIndex or writerIndex of this buffer.
        Overrides:
        getLong in class SwappedByteBuf
      • getFloat

        public final float getFloat​(int index)
        Description copied from class: ByteBuf
        Gets a 32-bit floating point number at the specified absolute index in this buffer. This method does not modify readerIndex or writerIndex of this buffer.
        Overrides:
        getFloat in class SwappedByteBuf
      • getDouble

        public final double getDouble​(int index)
        Description copied from class: ByteBuf
        Gets a 64-bit floating point number at the specified absolute index in this buffer. This method does not modify readerIndex or writerIndex of this buffer.
        Overrides:
        getDouble in class SwappedByteBuf
      • getChar

        public final char getChar​(int index)
        Description copied from class: ByteBuf
        Gets a 2-byte UTF-16 character at the specified absolute index in this buffer. This method does not modify readerIndex or writerIndex of this buffer.
        Overrides:
        getChar in class SwappedByteBuf
      • getUnsignedInt

        public final long getUnsignedInt​(int index)
        Description copied from class: ByteBuf
        Gets an unsigned 32-bit integer at the specified absolute index in this buffer. This method does not modify readerIndex or writerIndex of this buffer.
        Overrides:
        getUnsignedInt in class SwappedByteBuf
      • getInt

        public final int getInt​(int index)
        Description copied from class: ByteBuf
        Gets a 32-bit integer at the specified absolute index in this buffer. This method does not modify readerIndex or writerIndex of this buffer.
        Overrides:
        getInt in class SwappedByteBuf
      • getUnsignedShort

        public final int getUnsignedShort​(int index)
        Description copied from class: ByteBuf
        Gets an unsigned 16-bit short integer at the specified absolute index in this buffer. This method does not modify readerIndex or writerIndex of this buffer.
        Overrides:
        getUnsignedShort in class SwappedByteBuf
      • getShort

        public final short getShort​(int index)
        Description copied from class: ByteBuf
        Gets a 16-bit short integer at the specified absolute index in this buffer. This method does not modify readerIndex or writerIndex of this buffer.
        Overrides:
        getShort in class SwappedByteBuf
      • setShort

        public final ByteBuf setShort​(int index,
                                      int value)
        Description copied from class: ByteBuf
        Sets the specified 16-bit short integer at the specified absolute index in this buffer. The 16 high-order bits of the specified value are ignored. This method does not modify readerIndex or writerIndex of this buffer.
        Overrides:
        setShort in class SwappedByteBuf
      • setInt

        public final ByteBuf setInt​(int index,
                                    int value)
        Description copied from class: ByteBuf
        Sets the specified 32-bit integer at the specified absolute index in this buffer. This method does not modify readerIndex or writerIndex of this buffer.
        Overrides:
        setInt in class SwappedByteBuf
      • setLong

        public final ByteBuf setLong​(int index,
                                     long value)
        Description copied from class: ByteBuf
        Sets the specified 64-bit long integer at the specified absolute index in this buffer. This method does not modify readerIndex or writerIndex of this buffer.
        Overrides:
        setLong in class SwappedByteBuf
      • setChar

        public final ByteBuf setChar​(int index,
                                     int value)
        Description copied from class: ByteBuf
        Sets the specified 2-byte UTF-16 character at the specified absolute index in this buffer. The 16 high-order bits of the specified value are ignored. This method does not modify readerIndex or writerIndex of this buffer.
        Overrides:
        setChar in class SwappedByteBuf
      • setFloat

        public final ByteBuf setFloat​(int index,
                                      float value)
        Description copied from class: ByteBuf
        Sets the specified 32-bit floating-point number at the specified absolute index in this buffer. This method does not modify readerIndex or writerIndex of this buffer.
        Overrides:
        setFloat in class SwappedByteBuf
      • setDouble

        public final ByteBuf setDouble​(int index,
                                       double value)
        Description copied from class: ByteBuf
        Sets the specified 64-bit floating-point number at the specified absolute index in this buffer. This method does not modify readerIndex or writerIndex of this buffer.
        Overrides:
        setDouble in class SwappedByteBuf
      • writeShort

        public final ByteBuf writeShort​(int value)
        Description copied from class: ByteBuf
        Sets the specified 16-bit short integer at the current writerIndex and increases the writerIndex by 2 in this buffer. The 16 high-order bits of the specified value are ignored. If this.writableBytes is less than 2, ByteBuf.ensureWritable(int) will be called in an attempt to expand capacity to accommodate.
        Overrides:
        writeShort in class SwappedByteBuf
      • writeInt

        public final ByteBuf writeInt​(int value)
        Description copied from class: ByteBuf
        Sets the specified 32-bit integer at the current writerIndex and increases the writerIndex by 4 in this buffer. If this.writableBytes is less than 4, ByteBuf.ensureWritable(int) will be called in an attempt to expand capacity to accommodate.
        Overrides:
        writeInt in class SwappedByteBuf
      • writeLong

        public final ByteBuf writeLong​(long value)
        Description copied from class: ByteBuf
        Sets the specified 64-bit long integer at the current writerIndex and increases the writerIndex by 8 in this buffer. If this.writableBytes is less than 8, ByteBuf.ensureWritable(int) will be called in an attempt to expand capacity to accommodate.
        Overrides:
        writeLong in class SwappedByteBuf
      • writeChar

        public final ByteBuf writeChar​(int value)
        Description copied from class: ByteBuf
        Sets the specified 2-byte UTF-16 character at the current writerIndex and increases the writerIndex by 2 in this buffer. The 16 high-order bits of the specified value are ignored. If this.writableBytes is less than 2, ByteBuf.ensureWritable(int) will be called in an attempt to expand capacity to accommodate.
        Overrides:
        writeChar in class SwappedByteBuf
      • writeFloat

        public final ByteBuf writeFloat​(float value)
        Description copied from class: ByteBuf
        Sets the specified 32-bit floating point number at the current writerIndex and increases the writerIndex by 4 in this buffer. If this.writableBytes is less than 4, ByteBuf.ensureWritable(int) will be called in an attempt to expand capacity to accommodate.
        Overrides:
        writeFloat in class SwappedByteBuf
      • writeDouble

        public final ByteBuf writeDouble​(double value)
        Description copied from class: ByteBuf
        Sets the specified 64-bit floating point number at the current writerIndex and increases the writerIndex by 8 in this buffer. If this.writableBytes is less than 8, ByteBuf.ensureWritable(int) will be called in an attempt to expand capacity to accommodate.
        Overrides:
        writeDouble in class SwappedByteBuf
      • _getShort

        protected abstract short _getShort​(AbstractByteBuf wrapped,
                                           int index)
      • _getInt

        protected abstract int _getInt​(AbstractByteBuf wrapped,
                                       int index)
      • _getLong

        protected abstract long _getLong​(AbstractByteBuf wrapped,
                                         int index)
      • _setShort

        protected abstract void _setShort​(AbstractByteBuf wrapped,
                                          int index,
                                          short value)
      • _setInt

        protected abstract void _setInt​(AbstractByteBuf wrapped,
                                        int index,
                                        int value)
      • _setLong

        protected abstract void _setLong​(AbstractByteBuf wrapped,
                                         int index,
                                         long value)