Class PacketByteBuf

java.lang.Object
io.netty.buffer.ByteBuf
net.minecraft.network.PacketByteBuf
All Implemented Interfaces:
io.netty.util.ReferenceCounted, Comparable<io.netty.buffer.ByteBuf>

public class PacketByteBuf
extends io.netty.buffer.ByteBuf
  • Field Details

    • parent

      private final io.netty.buffer.ByteBuf parent
  • Constructor Details

    • PacketByteBuf

      public PacketByteBuf​(io.netty.buffer.ByteBuf byteBuf)
  • Method Details

    • getVarIntLength

      public static int getVarIntLength​(int value)
      Returns the number of bytes needed to encode value as a var int. Guaranteed to be between 1 and 5.
      Parameters:
      value - the value to encode
      Returns:
      the number of bytes a var int value uses
    • decode

      public <T> T decode​(com.mojang.serialization.Codec<T> codec)
      Reads an object from this buf as a compound NBT with the given codec.
      Type Parameters:
      T - the decoded object's type
      Parameters:
      codec - the codec to decode the object
      Returns:
      the read object
      Throws:
      io.netty.handler.codec.EncoderException - if the codec fails to decode the compound NBT
      See Also:
      encode(Codec, Object)
    • encode

      public <T> void encode​(com.mojang.serialization.Codec<T> codec, T object)
      Writes an object to this buf as a compound NBT with the given codec.
      Type Parameters:
      T - the encoded object's type
      Parameters:
      codec - the codec to encode the object
      object - the object to write to this buf
      Throws:
      io.netty.handler.codec.EncoderException - if the codec fails to encode the compound NBT
      See Also:
      decode(Codec)
    • writeByteArray

      public PacketByteBuf writeByteArray​(byte[] array)
      Writes an array of primitive bytes to this buf. The array first has a var int indicating its length, followed by the actual bytes.
      Parameters:
      array - the array to write
      Returns:
      this buf, for chaining
      See Also:
      readByteArray()
    • readByteArray

      public byte[] readByteArray()
      Reads an array of primitive bytes from this buf. The array first has a var int indicating its length, followed by the actual bytes. The array does not have a length limit.
      Returns:
      the read byte array
      See Also:
      readByteArray(int), writeByteArray(byte[])
    • readByteArray

      public byte[] readByteArray​(int maxSize)
      Reads an array of primitive bytes from this buf. The array first has a var int indicating its length, followed by the actual bytes. The array has a length limit given by maxSize.
      Parameters:
      maxSize - the max length of the read array
      Returns:
      the read byte array
      Throws:
      io.netty.handler.codec.DecoderException - if the read array has a length over maxSize
      See Also:
      readByteArray(), writeByteArray(byte[])
    • writeIntArray

      public PacketByteBuf writeIntArray​(int[] array)
      Writes an array of primitive ints to this buf. The array first has a var int indicating its length, followed by the var int entries.
      Parameters:
      array - the array to write
      Returns:
      this buf, for chaining
      See Also:
      readIntArray(int), writeIntArray(int[])
    • readIntArray

      public int[] readIntArray()
      Reads an array of primitive ints from this buf. The array first has a var int indicating its length, followed by the var int entries. The array does not have a length limit.
      Returns:
      the read byte array
      See Also:
      readIntArray(int), writeIntArray(int[])
    • readIntArray

      public int[] readIntArray​(int maxSize)
      Reads an array of primitive ints from this buf. The array first has a var int indicating its length, followed by the var int entries. The array has a length limit given by maxSize.
      Parameters:
      maxSize - the max length of the read array
      Returns:
      the read byte array
      Throws:
      io.netty.handler.codec.DecoderException - if the read array has a length over maxSize
      See Also:
      readIntArray(), writeIntArray(int[])
    • writeLongArray

      public PacketByteBuf writeLongArray​(long[] array)
      Writes an array of primitive longs to this buf. The array first has a var int indicating its length, followed by the regular long (not var long) values.
      Parameters:
      array - the array to write
      Returns:
      this buf, for chaining
      See Also:
      readLongArray(long[])
    • readLongArray

      @Environment(CLIENT) public long[] readLongArray​(@Nullable long[] toArray)
      Reads an array of primitive longs from this buf. The array first has a var int indicating its length, followed by the regular long (not var long) values. The array does not have a length limit.

      Only when toArray is not null and toArray.length equals to the length var int read will the toArray be reused and returned; otherwise, a new array of proper size is created.

      Parameters:
      toArray - the array to reuse
      Returns:
      the read long array
      See Also:
      writeLongArray(long[]), readLongArray(long[], int)
    • readLongArray

      @Environment(CLIENT) public long[] readLongArray​(@Nullable long[] toArray, int maxSize)
      Reads an array of primitive longs from this buf. The array first has a var int indicating its length, followed by the regular long (not var long) values. The array has a length limit of maxSize.

      Only when toArray is not null and toArray.length equals to the length var int read will the toArray be reused and returned; otherwise, a new array of proper size is created.

      Parameters:
      toArray - the array to reuse
      maxSize - the max length of the read array
      Returns:
      the read long array
      Throws:
      io.netty.handler.codec.DecoderException - if the read array has a length over maxSize
      See Also:
      writeLongArray(long[]), readLongArray(long[])
    • readBlockPos

      public BlockPos readBlockPos()
      Reads a block position from this buf. A block position is represented by a regular long.
      Returns:
      the read block pos
      See Also:
      writeBlockPos(BlockPos)
    • writeBlockPos

      public PacketByteBuf writeBlockPos​(BlockPos pos)
      Writes a block position to this buf. A block position is represented by a regular long.
      Parameters:
      pos - the pos to write
      Returns:
      this buf, for chaining
      See Also:
      readBlockPos()
    • readChunkSectionPos

      @Environment(CLIENT) public ChunkSectionPos readChunkSectionPos()
      Reads a chunk section position from this buf. A chunk section position is represented by a regular long.
      Returns:
      the read chunk section pos
    • readText

      public Text readText()
      Reads a text from this buf. A text is represented by a JSON string with max length 262144.
      Returns:
      the read text
      Throws:
      io.netty.handler.codec.DecoderException - if the JSON string read exceeds 262144 in length
      See Also:
      writeText(Text)
    • writeText

      public PacketByteBuf writeText​(Text text)
      Writes a text to this buf. A text is represented by a JSON string with max length 262144.
      Parameters:
      text - the text to write
      Returns:
      this buf, for chaining
      Throws:
      io.netty.handler.codec.EncoderException - if the JSON string written exceeds 262144 in length
      See Also:
      readText()
    • readEnumConstant

      public <T extends Enum<T>> T readEnumConstant​(Class<T> enumClass)
      Reads an enum constant from this buf. An enum constant is represented by a var int indicating its ordinal.
      Parameters:
      enumClass - the enum class, for constant lookup
      Returns:
      the read enum constant
      See Also:
      writeEnumConstant(Enum)
    • writeEnumConstant

      public PacketByteBuf writeEnumConstant​(Enum<?> instance)
      Writes an enum constant to this buf. An enum constant is represented by a var int indicating its ordinal.
      Parameters:
      instance - the enum constant to write
      Returns:
      this buf, for chaining
      See Also:
      readEnumConstant(Class)
    • readVarInt

      public int readVarInt()
      Reads a single var int from this buf.
      Returns:
      the value read
      See Also:
      writeVarInt(int)
    • readVarLong

      public long readVarLong()
      Reads a single var long from this buf.
      Returns:
      the value read
      See Also:
      writeVarLong(long)
    • writeUuid

      public PacketByteBuf writeUuid​(UUID uuid)
      Writes a UUID (universally unique identifier) to this buf. A UUID is represented by two regular longs.
      Parameters:
      uuid - the UUID to write
      Returns:
      this buf, for chaining
      See Also:
      readUuid()
    • readUuid

      public UUID readUuid()
      Reads a UUID (universally unique identifier) from this buf. A UUID is represented by two regular longs.
      Returns:
      the read UUID
      See Also:
      writeUuid(UUID)
    • writeVarInt

      public PacketByteBuf writeVarInt​(int value)
      Writes a single var int to this buf.

      Compared to regular ints, var ints may use less bytes (ranging from 1 to 5, where regular ints use 4) when representing smaller positive numbers.

      Parameters:
      value - the value to write
      Returns:
      this buf, for chaining
      See Also:
      readVarInt(), getVarIntLength(int)
    • writeVarLong

      public PacketByteBuf writeVarLong​(long value)
      Writes a single var long to this buf.

      Compared to regular longs, var longs may use less bytes when representing smaller positive numbers.

      Parameters:
      value - the value to write
      Returns:
      this buf, for chaining
      See Also:
      readVarLong()
    • writeNbt

      public PacketByteBuf writeNbt​(@Nullable NbtCompound compound)
      Writes an NBT compound to this buf. The binary representation of NBT is handled by NbtIo. If compound is null, it is treated as an NBT null.
      Parameters:
      compound - the compound to write
      Returns:
      this buf, for chaining
      Throws:
      io.netty.handler.codec.EncoderException - if the NBT cannot be written
      See Also:
      readNbt(), readUnlimitedNbt(), readNbt(NbtTagSizeTracker)
    • readNbt

      @Nullable public NbtCompound readNbt()
      Reads an NBT compound from this buf. The binary representation of NBT is handled by NbtIo. If an NBT null is encountered, this method returns null. The compound can have a maximum size of 2097152 bytes.
      Returns:
      the read compound, may be null
      Throws:
      io.netty.handler.codec.EncoderException - if the NBT cannot be read
      RuntimeException - if the compound exceeds the allowed maximum size
      See Also:
      writeNbt(NbtCompound), readUnlimitedNbt(), readNbt(NbtTagSizeTracker)
    • readUnlimitedNbt

      @Nullable public NbtCompound readUnlimitedNbt()
      Reads an NBT compound from this buf. The binary representation of NBT is handled by NbtIo. If an NBT null is encountered, this method returns null. The compound does not have a size limit.
      Returns:
      the read compound, may be null
      Throws:
      io.netty.handler.codec.EncoderException - if the NBT cannot be read
      See Also:
      writeNbt(NbtCompound), readNbt(), readNbt(NbtTagSizeTracker)
    • readNbt

      @Nullable public NbtCompound readNbt​(NbtTagSizeTracker sizeTracker)
      Reads an NBT compound from this buf. The binary representation of NBT is handled by NbtIo. If an NBT null is encountered, this method returns null. The compound can have a maximum size controlled by the sizeTracker.
      Returns:
      the read compound, may be null
      Throws:
      io.netty.handler.codec.EncoderException - if the NBT cannot be read
      RuntimeException - if the compound exceeds the allowed maximum size
      See Also:
      writeNbt(NbtCompound), readNbt(), readUnlimitedNbt()
    • writeItemStack

      public PacketByteBuf writeItemStack​(ItemStack stack)
      Writes an item stack to this buf. An item stack is represented by a boolean indicating whether it exists; if it exists, it is followed by a var int for its raw id, a byte for its count, and an NBT compound for its tag.
      Parameters:
      stack - the stack to write
      Returns:
      this buf, for chaining
      See Also:
      readItemStack()
    • readItemStack

      public ItemStack readItemStack()
      Reads an item stack from this buf. An item stack is represented by a boolean indicating whether it exists; if it exists, it is followed by a var int for its raw id, a byte for its count, and an NBT compound for its tag.
      Returns:
      the read item stack
      See Also:
      writeItemStack(ItemStack)
    • readString

      @Environment(CLIENT) public String readString()
      Reads a string from this buf. A string is represented by a byte array of its UTF-8 data. The string can have a maximum length of 32767.
      Returns:
      the string read
      Throws:
      io.netty.handler.codec.DecoderException - if the string read exceeds the maximum length
      See Also:
      readString(int), writeString(String), writeString(String, int)
    • readString

      public String readString​(int maxLength)
      Reads a string from this buf. A string is represented by a byte array of its UTF-8 data. The string can have a maximum length of maxLength.
      Parameters:
      maxLength - the maximum length of the string read
      Returns:
      the string read
      Throws:
      io.netty.handler.codec.DecoderException - if the string read is longer than maxLength
      See Also:
      readString(), writeString(String), writeString(String, int)
    • writeString

      public PacketByteBuf writeString​(String string)
      Writes a string to this buf. A string is represented by a byte array of its UTF-8 data. That byte array can have a maximum length of 32767.
      Parameters:
      string - the string to write
      Returns:
      this buf, for chaining
      Throws:
      io.netty.handler.codec.EncoderException - if the byte array of the string to write is longer than 32767
      See Also:
      readString(), readString(int), writeString(String, int)
    • writeString

      public PacketByteBuf writeString​(String string, int maxLength)
      Writes a string to this buf. A string is represented by a byte array of its UTF-8 data. That byte array can have a maximum length of maxLength.
      Parameters:
      string - the string to write
      maxLength - the max length of the byte array
      Returns:
      this buf, for chaining
      Throws:
      io.netty.handler.codec.EncoderException - if the byte array of the string to write is longer than maxLength
      See Also:
      readString(), readString(int), writeString(String)
    • readIdentifier

      public Identifier readIdentifier()
      Reads an identifier from this buf. An identifier is represented by its string form. The read identifier's string form can have a max length of 32767.
      Returns:
      the read identifier
      Throws:
      io.netty.handler.codec.DecoderException - if the identifier's string form is longer than 32767
      See Also:
      writeIdentifier(Identifier)
    • writeIdentifier

      public PacketByteBuf writeIdentifier​(Identifier id)
      Writes an identifier to this buf. An identifier is represented by its string form. The written identifier's byte array can have a max length of 32767.
      Parameters:
      id - the identifier to write
      Returns:
      the read identifier
      Throws:
      io.netty.handler.codec.EncoderException - if the id's byte array is longer than 32767
      See Also:
      readIdentifier()
    • readDate

      public Date readDate()
      Reads a date from this buf. A date is represented by its time, a regular long.
      Returns:
      the read date
      See Also:
      writeDate(Date)
    • writeDate

      public PacketByteBuf writeDate​(Date date)
      Writes a date to this buf. A date is represented by its time, a regular long.
      Parameters:
      date - the date to write
      Returns:
      this buf, for chaining
      See Also:
      readDate()
    • readBlockHitResult

      public BlockHitResult readBlockHitResult()
      Reads a block hit result from this buf. A block hit result is represented by a block position, a direction enum constant, 3 floats for the hit offset position, and a boolean for whether the hit was inside a block.
      Returns:
      the read block hit result
      See Also:
      writeBlockHitResult(BlockHitResult)
    • writeBlockHitResult

      public void writeBlockHitResult​(BlockHitResult hitResult)
      Writes a block hit result to this buf. A block hit result is represented by a block position, a direction enum constant, 3 floats for the hit offset position, and a boolean for whether the hit was inside a block.
      Parameters:
      hitResult - the block hit result to write
      See Also:
      readBlockHitResult()
    • capacity

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

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

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

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

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

      public io.netty.buffer.ByteBuf order​(ByteOrder byteOrder)
      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
    • isDirect

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

      public boolean isReadOnly()
      Specified by:
      isReadOnly in class io.netty.buffer.ByteBuf
    • asReadOnly

      public io.netty.buffer.ByteBuf asReadOnly()
      Specified by:
      asReadOnly in class io.netty.buffer.ByteBuf
    • readerIndex

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

      public io.netty.buffer.ByteBuf readerIndex​(int int2)
      Specified by:
      readerIndex in class io.netty.buffer.ByteBuf
    • writerIndex

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

      public io.netty.buffer.ByteBuf writerIndex​(int int2)
      Specified by:
      writerIndex in class io.netty.buffer.ByteBuf
    • setIndex

      public io.netty.buffer.ByteBuf setIndex​(int int2, int int3)
      Specified by:
      setIndex in class io.netty.buffer.ByteBuf
    • readableBytes

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

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

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

      public boolean isReadable()
      Specified by:
      isReadable in class io.netty.buffer.ByteBuf
    • isReadable

      public boolean isReadable​(int int2)
      Specified by:
      isReadable in class io.netty.buffer.ByteBuf
    • isWritable

      public boolean isWritable()
      Specified by:
      isWritable in class io.netty.buffer.ByteBuf
    • isWritable

      public boolean isWritable​(int int2)
      Specified by:
      isWritable in class io.netty.buffer.ByteBuf
    • clear

      public io.netty.buffer.ByteBuf clear()
      Specified by:
      clear in class io.netty.buffer.ByteBuf
    • markReaderIndex

      public io.netty.buffer.ByteBuf markReaderIndex()
      Specified by:
      markReaderIndex in class io.netty.buffer.ByteBuf
    • resetReaderIndex

      public io.netty.buffer.ByteBuf resetReaderIndex()
      Specified by:
      resetReaderIndex in class io.netty.buffer.ByteBuf
    • markWriterIndex

      public io.netty.buffer.ByteBuf markWriterIndex()
      Specified by:
      markWriterIndex in class io.netty.buffer.ByteBuf
    • resetWriterIndex

      public io.netty.buffer.ByteBuf resetWriterIndex()
      Specified by:
      resetWriterIndex in class io.netty.buffer.ByteBuf
    • discardReadBytes

      public io.netty.buffer.ByteBuf discardReadBytes()
      Specified by:
      discardReadBytes in class io.netty.buffer.ByteBuf
    • discardSomeReadBytes

      public io.netty.buffer.ByteBuf discardSomeReadBytes()
      Specified by:
      discardSomeReadBytes in class io.netty.buffer.ByteBuf
    • ensureWritable

      public io.netty.buffer.ByteBuf ensureWritable​(int int2)
      Specified by:
      ensureWritable in class io.netty.buffer.ByteBuf
    • ensureWritable

      public int ensureWritable​(int int2, boolean bool)
      Specified by:
      ensureWritable in class io.netty.buffer.ByteBuf
    • getBoolean

      public boolean getBoolean​(int int2)
      Specified by:
      getBoolean in class io.netty.buffer.ByteBuf
    • getByte

      public byte getByte​(int int2)
      Specified by:
      getByte in class io.netty.buffer.ByteBuf
    • getUnsignedByte

      public short getUnsignedByte​(int int2)
      Specified by:
      getUnsignedByte in class io.netty.buffer.ByteBuf
    • getShort

      public short getShort​(int int2)
      Specified by:
      getShort in class io.netty.buffer.ByteBuf
    • getShortLE

      public short getShortLE​(int int2)
      Specified by:
      getShortLE in class io.netty.buffer.ByteBuf
    • getUnsignedShort

      public int getUnsignedShort​(int int2)
      Specified by:
      getUnsignedShort in class io.netty.buffer.ByteBuf
    • getUnsignedShortLE

      public int getUnsignedShortLE​(int int2)
      Specified by:
      getUnsignedShortLE in class io.netty.buffer.ByteBuf
    • getMedium

      public int getMedium​(int int2)
      Specified by:
      getMedium in class io.netty.buffer.ByteBuf
    • getMediumLE

      public int getMediumLE​(int int2)
      Specified by:
      getMediumLE in class io.netty.buffer.ByteBuf
    • getUnsignedMedium

      public int getUnsignedMedium​(int int2)
      Specified by:
      getUnsignedMedium in class io.netty.buffer.ByteBuf
    • getUnsignedMediumLE

      public int getUnsignedMediumLE​(int int2)
      Specified by:
      getUnsignedMediumLE in class io.netty.buffer.ByteBuf
    • getInt

      public int getInt​(int int2)
      Specified by:
      getInt in class io.netty.buffer.ByteBuf
    • getIntLE

      public int getIntLE​(int int2)
      Specified by:
      getIntLE in class io.netty.buffer.ByteBuf
    • getUnsignedInt

      public long getUnsignedInt​(int int2)
      Specified by:
      getUnsignedInt in class io.netty.buffer.ByteBuf
    • getUnsignedIntLE

      public long getUnsignedIntLE​(int int2)
      Specified by:
      getUnsignedIntLE in class io.netty.buffer.ByteBuf
    • getLong

      public long getLong​(int int2)
      Specified by:
      getLong in class io.netty.buffer.ByteBuf
    • getLongLE

      public long getLongLE​(int int2)
      Specified by:
      getLongLE in class io.netty.buffer.ByteBuf
    • getChar

      public char getChar​(int int2)
      Specified by:
      getChar in class io.netty.buffer.ByteBuf
    • getFloat

      public float getFloat​(int int2)
      Specified by:
      getFloat in class io.netty.buffer.ByteBuf
    • getDouble

      public double getDouble​(int int2)
      Specified by:
      getDouble in class io.netty.buffer.ByteBuf
    • getBytes

      public io.netty.buffer.ByteBuf getBytes​(int int2, io.netty.buffer.ByteBuf byteBuf)
      Specified by:
      getBytes in class io.netty.buffer.ByteBuf
    • getBytes

      public io.netty.buffer.ByteBuf getBytes​(int int2, io.netty.buffer.ByteBuf byteBuf, int int3)
      Specified by:
      getBytes in class io.netty.buffer.ByteBuf
    • getBytes

      public io.netty.buffer.ByteBuf getBytes​(int int2, io.netty.buffer.ByteBuf byteBuf, int int3, int int4)
      Specified by:
      getBytes in class io.netty.buffer.ByteBuf
    • getBytes

      public io.netty.buffer.ByteBuf getBytes​(int int2, byte[] byte2)
      Specified by:
      getBytes in class io.netty.buffer.ByteBuf
    • getBytes

      public io.netty.buffer.ByteBuf getBytes​(int int2, byte[] byte2, int int3, int int4)
      Specified by:
      getBytes in class io.netty.buffer.ByteBuf
    • getBytes

      public io.netty.buffer.ByteBuf getBytes​(int int2, ByteBuffer byteBuffer)
      Specified by:
      getBytes in class io.netty.buffer.ByteBuf
    • getBytes

      public io.netty.buffer.ByteBuf getBytes​(int int2, OutputStream outputStream, int int3) throws IOException
      Specified by:
      getBytes in class io.netty.buffer.ByteBuf
      Throws:
      IOException
    • getBytes

      public int getBytes​(int int2, GatheringByteChannel gatheringByteChannel, int int3) throws IOException
      Specified by:
      getBytes in class io.netty.buffer.ByteBuf
      Throws:
      IOException
    • getBytes

      public int getBytes​(int int2, FileChannel fileChannel, long long2, int int3) throws IOException
      Specified by:
      getBytes in class io.netty.buffer.ByteBuf
      Throws:
      IOException
    • getCharSequence

      public CharSequence getCharSequence​(int int2, int int3, Charset charset)
      Specified by:
      getCharSequence in class io.netty.buffer.ByteBuf
    • setBoolean

      public io.netty.buffer.ByteBuf setBoolean​(int int2, boolean bool)
      Specified by:
      setBoolean in class io.netty.buffer.ByteBuf
    • setByte

      public io.netty.buffer.ByteBuf setByte​(int int2, int int3)
      Specified by:
      setByte in class io.netty.buffer.ByteBuf
    • setShort

      public io.netty.buffer.ByteBuf setShort​(int int2, int int3)
      Specified by:
      setShort in class io.netty.buffer.ByteBuf
    • setShortLE

      public io.netty.buffer.ByteBuf setShortLE​(int int2, int int3)
      Specified by:
      setShortLE in class io.netty.buffer.ByteBuf
    • setMedium

      public io.netty.buffer.ByteBuf setMedium​(int int2, int int3)
      Specified by:
      setMedium in class io.netty.buffer.ByteBuf
    • setMediumLE

      public io.netty.buffer.ByteBuf setMediumLE​(int int2, int int3)
      Specified by:
      setMediumLE in class io.netty.buffer.ByteBuf
    • setInt

      public io.netty.buffer.ByteBuf setInt​(int int2, int int3)
      Specified by:
      setInt in class io.netty.buffer.ByteBuf
    • setIntLE

      public io.netty.buffer.ByteBuf setIntLE​(int int2, int int3)
      Specified by:
      setIntLE in class io.netty.buffer.ByteBuf
    • setLong

      public io.netty.buffer.ByteBuf setLong​(int int2, long long2)
      Specified by:
      setLong in class io.netty.buffer.ByteBuf
    • setLongLE

      public io.netty.buffer.ByteBuf setLongLE​(int int2, long long2)
      Specified by:
      setLongLE in class io.netty.buffer.ByteBuf
    • setChar

      public io.netty.buffer.ByteBuf setChar​(int int2, int int3)
      Specified by:
      setChar in class io.netty.buffer.ByteBuf
    • setFloat

      public io.netty.buffer.ByteBuf setFloat​(int int2, float float2)
      Specified by:
      setFloat in class io.netty.buffer.ByteBuf
    • setDouble

      public io.netty.buffer.ByteBuf setDouble​(int int2, double double2)
      Specified by:
      setDouble in class io.netty.buffer.ByteBuf
    • setBytes

      public io.netty.buffer.ByteBuf setBytes​(int int2, io.netty.buffer.ByteBuf byteBuf)
      Specified by:
      setBytes in class io.netty.buffer.ByteBuf
    • setBytes

      public io.netty.buffer.ByteBuf setBytes​(int int2, io.netty.buffer.ByteBuf byteBuf, int int3)
      Specified by:
      setBytes in class io.netty.buffer.ByteBuf
    • setBytes

      public io.netty.buffer.ByteBuf setBytes​(int int2, io.netty.buffer.ByteBuf byteBuf, int int3, int int4)
      Specified by:
      setBytes in class io.netty.buffer.ByteBuf
    • setBytes

      public io.netty.buffer.ByteBuf setBytes​(int int2, byte[] byte2)
      Specified by:
      setBytes in class io.netty.buffer.ByteBuf
    • setBytes

      public io.netty.buffer.ByteBuf setBytes​(int int2, byte[] byte2, int int3, int int4)
      Specified by:
      setBytes in class io.netty.buffer.ByteBuf
    • setBytes

      public io.netty.buffer.ByteBuf setBytes​(int int2, ByteBuffer byteBuffer)
      Specified by:
      setBytes in class io.netty.buffer.ByteBuf
    • setBytes

      public int setBytes​(int int2, InputStream inputStream, int int3) throws IOException
      Specified by:
      setBytes in class io.netty.buffer.ByteBuf
      Throws:
      IOException
    • setBytes

      public int setBytes​(int int2, ScatteringByteChannel scatteringByteChannel, int int3) throws IOException
      Specified by:
      setBytes in class io.netty.buffer.ByteBuf
      Throws:
      IOException
    • setBytes

      public int setBytes​(int int2, FileChannel fileChannel, long long2, int int3) throws IOException
      Specified by:
      setBytes in class io.netty.buffer.ByteBuf
      Throws:
      IOException
    • setZero

      public io.netty.buffer.ByteBuf setZero​(int int2, int int3)
      Specified by:
      setZero in class io.netty.buffer.ByteBuf
    • setCharSequence

      public int setCharSequence​(int int2, CharSequence charSequence, Charset charset)
      Specified by:
      setCharSequence in class io.netty.buffer.ByteBuf
    • readBoolean

      public boolean readBoolean()
      Specified by:
      readBoolean in class io.netty.buffer.ByteBuf
    • readByte

      public byte readByte()
      Specified by:
      readByte in class io.netty.buffer.ByteBuf
    • readUnsignedByte

      public short readUnsignedByte()
      Specified by:
      readUnsignedByte in class io.netty.buffer.ByteBuf
    • readShort

      public short readShort()
      Specified by:
      readShort in class io.netty.buffer.ByteBuf
    • readShortLE

      public short readShortLE()
      Specified by:
      readShortLE in class io.netty.buffer.ByteBuf
    • readUnsignedShort

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

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

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

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

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

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

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

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

      public long readUnsignedInt()
      Specified by:
      readUnsignedInt in class io.netty.buffer.ByteBuf
    • readUnsignedIntLE

      public long readUnsignedIntLE()
      Specified by:
      readUnsignedIntLE in class io.netty.buffer.ByteBuf
    • readLong

      public long readLong()
      Specified by:
      readLong in class io.netty.buffer.ByteBuf
    • readLongLE

      public long readLongLE()
      Specified by:
      readLongLE in class io.netty.buffer.ByteBuf
    • readChar

      public char readChar()
      Specified by:
      readChar in class io.netty.buffer.ByteBuf
    • readFloat

      public float readFloat()
      Specified by:
      readFloat in class io.netty.buffer.ByteBuf
    • readDouble

      public double readDouble()
      Specified by:
      readDouble in class io.netty.buffer.ByteBuf
    • readBytes

      public io.netty.buffer.ByteBuf readBytes​(int int2)
      Specified by:
      readBytes in class io.netty.buffer.ByteBuf
    • readSlice

      public io.netty.buffer.ByteBuf readSlice​(int int2)
      Specified by:
      readSlice in class io.netty.buffer.ByteBuf
    • readRetainedSlice

      public io.netty.buffer.ByteBuf readRetainedSlice​(int int2)
      Specified by:
      readRetainedSlice in class io.netty.buffer.ByteBuf
    • readBytes

      public io.netty.buffer.ByteBuf readBytes​(io.netty.buffer.ByteBuf byteBuf)
      Specified by:
      readBytes in class io.netty.buffer.ByteBuf
    • readBytes

      public io.netty.buffer.ByteBuf readBytes​(io.netty.buffer.ByteBuf byteBuf, int int2)
      Specified by:
      readBytes in class io.netty.buffer.ByteBuf
    • readBytes

      public io.netty.buffer.ByteBuf readBytes​(io.netty.buffer.ByteBuf byteBuf, int int2, int int3)
      Specified by:
      readBytes in class io.netty.buffer.ByteBuf
    • readBytes

      public io.netty.buffer.ByteBuf readBytes​(byte[] byte2)
      Specified by:
      readBytes in class io.netty.buffer.ByteBuf
    • readBytes

      public io.netty.buffer.ByteBuf readBytes​(byte[] byte2, int int2, int int3)
      Specified by:
      readBytes in class io.netty.buffer.ByteBuf
    • readBytes

      public io.netty.buffer.ByteBuf readBytes​(ByteBuffer byteBuffer)
      Specified by:
      readBytes in class io.netty.buffer.ByteBuf
    • readBytes

      public io.netty.buffer.ByteBuf readBytes​(OutputStream outputStream, int int2) throws IOException
      Specified by:
      readBytes in class io.netty.buffer.ByteBuf
      Throws:
      IOException
    • readBytes

      public int readBytes​(GatheringByteChannel gatheringByteChannel, int int2) throws IOException
      Specified by:
      readBytes in class io.netty.buffer.ByteBuf
      Throws:
      IOException
    • readCharSequence

      public CharSequence readCharSequence​(int int2, Charset charset)
      Specified by:
      readCharSequence in class io.netty.buffer.ByteBuf
    • readBytes

      public int readBytes​(FileChannel fileChannel, long long2, int int2) throws IOException
      Specified by:
      readBytes in class io.netty.buffer.ByteBuf
      Throws:
      IOException
    • skipBytes

      public io.netty.buffer.ByteBuf skipBytes​(int int2)
      Specified by:
      skipBytes in class io.netty.buffer.ByteBuf
    • writeBoolean

      public io.netty.buffer.ByteBuf writeBoolean​(boolean bool)
      Specified by:
      writeBoolean in class io.netty.buffer.ByteBuf
    • writeByte

      public io.netty.buffer.ByteBuf writeByte​(int int2)
      Specified by:
      writeByte in class io.netty.buffer.ByteBuf
    • writeShort

      public io.netty.buffer.ByteBuf writeShort​(int int2)
      Specified by:
      writeShort in class io.netty.buffer.ByteBuf
    • writeShortLE

      public io.netty.buffer.ByteBuf writeShortLE​(int int2)
      Specified by:
      writeShortLE in class io.netty.buffer.ByteBuf
    • writeMedium

      public io.netty.buffer.ByteBuf writeMedium​(int int2)
      Specified by:
      writeMedium in class io.netty.buffer.ByteBuf
    • writeMediumLE

      public io.netty.buffer.ByteBuf writeMediumLE​(int int2)
      Specified by:
      writeMediumLE in class io.netty.buffer.ByteBuf
    • writeInt

      public io.netty.buffer.ByteBuf writeInt​(int int2)
      Specified by:
      writeInt in class io.netty.buffer.ByteBuf
    • writeIntLE

      public io.netty.buffer.ByteBuf writeIntLE​(int int2)
      Specified by:
      writeIntLE in class io.netty.buffer.ByteBuf
    • writeLong

      public io.netty.buffer.ByteBuf writeLong​(long long2)
      Specified by:
      writeLong in class io.netty.buffer.ByteBuf
    • writeLongLE

      public io.netty.buffer.ByteBuf writeLongLE​(long long2)
      Specified by:
      writeLongLE in class io.netty.buffer.ByteBuf
    • writeChar

      public io.netty.buffer.ByteBuf writeChar​(int int2)
      Specified by:
      writeChar in class io.netty.buffer.ByteBuf
    • writeFloat

      public io.netty.buffer.ByteBuf writeFloat​(float float2)
      Specified by:
      writeFloat in class io.netty.buffer.ByteBuf
    • writeDouble

      public io.netty.buffer.ByteBuf writeDouble​(double double2)
      Specified by:
      writeDouble in class io.netty.buffer.ByteBuf
    • writeBytes

      public io.netty.buffer.ByteBuf writeBytes​(io.netty.buffer.ByteBuf byteBuf)
      Specified by:
      writeBytes in class io.netty.buffer.ByteBuf
    • writeBytes

      public io.netty.buffer.ByteBuf writeBytes​(io.netty.buffer.ByteBuf byteBuf, int int2)
      Specified by:
      writeBytes in class io.netty.buffer.ByteBuf
    • writeBytes

      public io.netty.buffer.ByteBuf writeBytes​(io.netty.buffer.ByteBuf byteBuf, int int2, int int3)
      Specified by:
      writeBytes in class io.netty.buffer.ByteBuf
    • writeBytes

      public io.netty.buffer.ByteBuf writeBytes​(byte[] byte2)
      Specified by:
      writeBytes in class io.netty.buffer.ByteBuf
    • writeBytes

      public io.netty.buffer.ByteBuf writeBytes​(byte[] byte2, int int2, int int3)
      Specified by:
      writeBytes in class io.netty.buffer.ByteBuf
    • writeBytes

      public io.netty.buffer.ByteBuf writeBytes​(ByteBuffer byteBuffer)
      Specified by:
      writeBytes in class io.netty.buffer.ByteBuf
    • writeBytes

      public int writeBytes​(InputStream inputStream, int int2) throws IOException
      Specified by:
      writeBytes in class io.netty.buffer.ByteBuf
      Throws:
      IOException
    • writeBytes

      public int writeBytes​(ScatteringByteChannel scatteringByteChannel, int int2) throws IOException
      Specified by:
      writeBytes in class io.netty.buffer.ByteBuf
      Throws:
      IOException
    • writeBytes

      public int writeBytes​(FileChannel fileChannel, long long2, int int2) throws IOException
      Specified by:
      writeBytes in class io.netty.buffer.ByteBuf
      Throws:
      IOException
    • writeZero

      public io.netty.buffer.ByteBuf writeZero​(int int2)
      Specified by:
      writeZero in class io.netty.buffer.ByteBuf
    • writeCharSequence

      public int writeCharSequence​(CharSequence charSequence, Charset charset)
      Specified by:
      writeCharSequence in class io.netty.buffer.ByteBuf
    • indexOf

      public int indexOf​(int int2, int int3, byte byte2)
      Specified by:
      indexOf in class io.netty.buffer.ByteBuf
    • bytesBefore

      public int bytesBefore​(byte byte2)
      Specified by:
      bytesBefore in class io.netty.buffer.ByteBuf
    • bytesBefore

      public int bytesBefore​(int int2, byte byte2)
      Specified by:
      bytesBefore in class io.netty.buffer.ByteBuf
    • bytesBefore

      public int bytesBefore​(int int2, int int3, byte byte2)
      Specified by:
      bytesBefore in class io.netty.buffer.ByteBuf
    • forEachByte

      public int forEachByte​(io.netty.util.ByteProcessor byteProcessor)
      Specified by:
      forEachByte in class io.netty.buffer.ByteBuf
    • forEachByte

      public int forEachByte​(int int2, int int3, io.netty.util.ByteProcessor byteProcessor)
      Specified by:
      forEachByte in class io.netty.buffer.ByteBuf
    • forEachByteDesc

      public int forEachByteDesc​(io.netty.util.ByteProcessor byteProcessor)
      Specified by:
      forEachByteDesc in class io.netty.buffer.ByteBuf
    • forEachByteDesc

      public int forEachByteDesc​(int int2, int int3, io.netty.util.ByteProcessor byteProcessor)
      Specified by:
      forEachByteDesc in class io.netty.buffer.ByteBuf
    • copy

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

      public io.netty.buffer.ByteBuf copy​(int int2, int int3)
      Specified by:
      copy in class io.netty.buffer.ByteBuf
    • slice

      public io.netty.buffer.ByteBuf slice()
      Specified by:
      slice in class io.netty.buffer.ByteBuf
    • retainedSlice

      public io.netty.buffer.ByteBuf retainedSlice()
      Specified by:
      retainedSlice in class io.netty.buffer.ByteBuf
    • slice

      public io.netty.buffer.ByteBuf slice​(int int2, int int3)
      Specified by:
      slice in class io.netty.buffer.ByteBuf
    • retainedSlice

      public io.netty.buffer.ByteBuf retainedSlice​(int int2, int int3)
      Specified by:
      retainedSlice in class io.netty.buffer.ByteBuf
    • duplicate

      public io.netty.buffer.ByteBuf duplicate()
      Specified by:
      duplicate in class io.netty.buffer.ByteBuf
    • retainedDuplicate

      public io.netty.buffer.ByteBuf retainedDuplicate()
      Specified by:
      retainedDuplicate in class io.netty.buffer.ByteBuf
    • nioBufferCount

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

      public ByteBuffer nioBuffer()
      Specified by:
      nioBuffer in class io.netty.buffer.ByteBuf
    • nioBuffer

      public ByteBuffer nioBuffer​(int int2, int int3)
      Specified by:
      nioBuffer in class io.netty.buffer.ByteBuf
    • internalNioBuffer

      public ByteBuffer internalNioBuffer​(int int2, int int3)
      Specified by:
      internalNioBuffer in class io.netty.buffer.ByteBuf
    • nioBuffers

      public ByteBuffer[] nioBuffers()
      Specified by:
      nioBuffers in class io.netty.buffer.ByteBuf
    • nioBuffers

      public ByteBuffer[] nioBuffers​(int int2, int int3)
      Specified by:
      nioBuffers in class io.netty.buffer.ByteBuf
    • hasArray

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

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

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

      public boolean hasMemoryAddress()
      Specified by:
      hasMemoryAddress in class io.netty.buffer.ByteBuf
    • memoryAddress

      public long memoryAddress()
      Specified by:
      memoryAddress in class io.netty.buffer.ByteBuf
    • toString

      public String toString​(Charset charset)
      Specified by:
      toString in class io.netty.buffer.ByteBuf
    • toString

      public String toString​(int int2, int int3, Charset charset)
      Specified by:
      toString in class io.netty.buffer.ByteBuf
    • hashCode

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

      public boolean equals​(Object object)
      Specified by:
      equals in class io.netty.buffer.ByteBuf
    • compareTo

      public int compareTo​(io.netty.buffer.ByteBuf byteBuf)
      Specified by:
      compareTo in interface Comparable<io.netty.buffer.ByteBuf>
      Specified by:
      compareTo in class io.netty.buffer.ByteBuf
    • toString

      public String toString()
      Specified by:
      toString in class io.netty.buffer.ByteBuf
    • retain

      public io.netty.buffer.ByteBuf retain​(int int2)
      Specified by:
      retain in interface io.netty.util.ReferenceCounted
      Specified by:
      retain in class io.netty.buffer.ByteBuf
    • 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​(Object object)
      Specified by:
      touch in interface io.netty.util.ReferenceCounted
      Specified by:
      touch in class io.netty.buffer.ByteBuf
    • refCnt

      public int refCnt()
    • release

      public boolean release()
    • release

      public boolean release​(int int2)