Package net.minecraft.network
Class FriendlyByteBuf
java.lang.Object
io.netty.buffer.ByteBuf
net.minecraft.network.FriendlyByteBuf
- All Implemented Interfaces:
io.netty.buffer.ByteBufConvertible,io.netty.util.ReferenceCounted,Comparable<io.netty.buffer.ByteBuf>,IFriendlyByteBufExtension
- Direct Known Subclasses:
RegistryFriendlyByteBuf
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intprivate static final Gsonstatic final intprivate static final intprivate static final intstatic final shortprivate static final intprivate final io.netty.buffer.ByteBuf -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionio.netty.buffer.ByteBufAllocatoralloc()byte[]array()intio.netty.buffer.ByteBufintbytesBefore(byte pValue) intbytesBefore(int pLength, byte pValue) intbytesBefore(int pIndex, int pLength, byte pValue) intcapacity()capacity(int pNewCapacity) clear()intcompareTo(io.netty.buffer.ByteBuf pOther) io.netty.buffer.ByteBufcopy()io.netty.buffer.ByteBufcopy(int pIndex, int pLength) io.netty.buffer.ByteBufensureWritable(int pSize) intensureWritable(int pSize, boolean pForce) booleanintforEachByte(int pIndex, int pLength, io.netty.util.ByteProcessor pProcessor) intforEachByte(io.netty.util.ByteProcessor pProcessor) intforEachByteDesc(int pIndex, int pLength, io.netty.util.ByteProcessor pProcessor) intforEachByteDesc(io.netty.util.ByteProcessor pProcessor) booleangetBoolean(int pIndex) bytegetByte(int pIndex) getBytes(int pIndex, byte[] pDestination) getBytes(int pIndex, byte[] pDestination, int pDestinationIndex, int pLength) getBytes(int pIndex, io.netty.buffer.ByteBuf pDestination) getBytes(int pIndex, io.netty.buffer.ByteBuf pDestination, int pLength) getBytes(int pIndex, io.netty.buffer.ByteBuf pDestination, int pDestinationIndex, int pLength) getBytes(int pIndex, OutputStream pOut, int pLength) getBytes(int pIndex, ByteBuffer pDestination) intgetBytes(int pIndex, FileChannel pOut, long pPosition, int pLength) intgetBytes(int pIndex, GatheringByteChannel pOut, int pLength) chargetChar(int pIndex) getCharSequence(int pIndex, int pLength, Charset pCharset) doublegetDouble(int pIndex) floatgetFloat(int pIndex) intgetInt(int pIndex) intgetIntLE(int pIndex) longgetLong(int pIndex) longgetLongLE(int pIndex) intgetMedium(int pIndex) intgetMediumLE(int pIndex) shortgetShort(int pIndex) shortgetShortLE(int pIndex) io.netty.buffer.ByteBufshortgetUnsignedByte(int pIndex) longgetUnsignedInt(int pIndex) longgetUnsignedIntLE(int pIndex) intgetUnsignedMedium(int pIndex) intgetUnsignedMediumLE(int pIndex) intgetUnsignedShort(int pIndex) intgetUnsignedShortLE(int pIndex) booleanhasArray()inthashCode()booleanintindexOf(int pFromIndex, int pToIndex, byte pValue) internalNioBuffer(int pIndex, int pLength) booleanbooleanisDirect()booleanbooleanisReadable(int pSize) booleanbooleanbooleanisWritable(int pSize) static <T> IntFunction<T> limitValue(IntFunction<T> pFunction, int pLimit) intintintlongnioBuffer(int pIndex, int pLength) intnioBuffers(int pIndex, int pLength) order()io.netty.buffer.ByteBufintstatic BlockPosreadBlockPos(io.netty.buffer.ByteBuf pBuffer) boolean<T> TreadById(IntFunction<T> pIdLookup) bytereadByte()byte[]byte[]readByteArray(int pMaxLength) static byte[]readByteArray(io.netty.buffer.ByteBuf pBuffer) static byte[]readByteArray(io.netty.buffer.ByteBuf pBuffer, int pMaxSize) readBytes(byte[] pDestination) readBytes(byte[] pDestination, int pDestinationIndex, int pLength) io.netty.buffer.ByteBufreadBytes(int pLength) readBytes(io.netty.buffer.ByteBuf pDestination) readBytes(io.netty.buffer.ByteBuf pDestination, int pLength) readBytes(io.netty.buffer.ByteBuf pDestination, int pDestinationIndex, int pLength) readBytes(OutputStream pOut, int pLength) readBytes(ByteBuffer pDestination) intreadBytes(FileChannel pOut, long pPosition, int pLength) intreadBytes(GatheringByteChannel pOut, int pLength) charreadChar()readCharSequence(int pLength, Charset pCharset) static ChunkPosreadChunkPos(io.netty.buffer.ByteBuf pBuffer) <T,C extends Collection<T>>
CreadCollection(IntFunction<C> pCollectionFactory, StreamDecoder<? super FriendlyByteBuf, T> pElementReader) intstatic intreadContainerId(io.netty.buffer.ByteBuf pBuffer) readDate()double<L,R> com.mojang.datafixers.util.Either <L, R> readEither(StreamDecoder<? super FriendlyByteBuf, L> pLeftReader, StreamDecoder<? super FriendlyByteBuf, R> pRightReader) <T extends Enum<T>>
TReads an enum of the given type T using the ordinal encoded as a VarInt from the buffer.readEnumSet(Class<E> pEnumClass) intreaderIndex(int pReaderIndex) readFixedBitSet(int pSize) long[]readFixedSizeLongArray(long[] pOutput) static long[]readFixedSizeLongArray(io.netty.buffer.ByteBuf pBuffer, long[] pOutput) floatintreadInt()it.unimi.dsi.fastutil.ints.IntListint<T> TreadLenientJsonWithCodec(com.mojang.serialization.Codec<T> pCodec) <T> List<T> readList(StreamDecoder<? super FriendlyByteBuf, T> pElementReader) longreadLong()long[]static long[]readLongArray(io.netty.buffer.ByteBuf pBuffer) long<K,V, M extends Map<K, V>>
MreadMap(IntFunction<M> pMapFactory, StreamDecoder<? super FriendlyByteBuf, K> pKeyReader, StreamDecoder<? super FriendlyByteBuf, V> pValueReader) <K,V> Map <K, V> readMap(StreamDecoder<? super FriendlyByteBuf, K> pKeyReader, StreamDecoder<? super FriendlyByteBuf, V> pValueReader) intintreadNbt()static CompoundTagreadNbt(io.netty.buffer.ByteBuf pBuffer) static TagreadNbt(io.netty.buffer.ByteBuf pBuffer, NbtAccounter pNbtAccounter) readNbt(NbtAccounter pNbtAccounter) static <T,B extends io.netty.buffer.ByteBuf>
TreadNullable(B pBuffer, StreamDecoder<? super B, T> pReader) <T> TreadNullable(StreamDecoder<? super FriendlyByteBuf, T> pReader) <T> Optional<T> readOptional(StreamDecoder<? super FriendlyByteBuf, T> pReader) static QuaternionfreadQuaternion(io.netty.buffer.ByteBuf pBuffer) <T> ResourceKey<? extends Registry<T>> <T> ResourceKey<T> readResourceKey(ResourceKey<? extends Registry<T>> pRegistryKey) io.netty.buffer.ByteBufreadRetainedSlice(int pLength) shortshortio.netty.buffer.ByteBufreadSlice(int pLength) shortlonglongintintintintreadUtf()readUtf(int pMaxLength) Reads a string with a maximum length from this buffer.readUUID()static UUIDreadUUID(io.netty.buffer.ByteBuf pBuffer) intint[]int[]readVarIntArray(int pMaxLength) Reads an array of VarInts with a maximum length from this buffer.longreadVec3()static Vec3readVec3(io.netty.buffer.ByteBuf pBuffer) static Vector3freadVector3f(io.netty.buffer.ByteBuf pBuffer) <T> TreadWithCodec(com.mojang.serialization.DynamicOps<Tag> pOps, com.mojang.serialization.Codec<T> pCodec, NbtAccounter pNbtAccounter) Deprecated.<T> TreadWithCodecTrusted(com.mojang.serialization.DynamicOps<Tag> pOps, com.mojang.serialization.Codec<T> pCodec) Deprecated.voidreadWithCount(Consumer<FriendlyByteBuf> pReader) Read a VarInt N from this buffer, then reads N values by callingreader.intrefCnt()booleanrelease()booleanrelease(int pDecrement) retain()retain(int pIncrement) io.netty.buffer.ByteBufio.netty.buffer.ByteBufio.netty.buffer.ByteBufretainedSlice(int pIndex, int pLength) setBoolean(int pIndex, boolean pValue) setByte(int pIndex, int pValue) setBytes(int pIndex, byte[] pSource) setBytes(int pIndex, byte[] pSource, int pSourceIndex, int pLength) setBytes(int pIndex, io.netty.buffer.ByteBuf pSource) setBytes(int pIndex, io.netty.buffer.ByteBuf pSource, int pLength) setBytes(int pIndex, io.netty.buffer.ByteBuf pSource, int pSourceIndex, int pLength) intsetBytes(int pIndex, InputStream pIn, int pLength) setBytes(int pIndex, ByteBuffer pSource) intsetBytes(int pIndex, FileChannel pIn, long pPosition, int pLength) intsetBytes(int pIndex, ScatteringByteChannel pIn, int pLength) setChar(int pIndex, int pValue) intsetCharSequence(int pIndex, CharSequence pCharSequence, Charset pCharset) setDouble(int pIndex, double pValue) setFloat(int pIndex, float pValue) setIndex(int pReaderIndex, int pWriterIndex) setInt(int pIndex, int pValue) setIntLE(int pIndex, int pValue) setLong(int pIndex, long pValue) setLongLE(int pIndex, long pValue) setMedium(int pIndex, int pValue) setMediumLE(int pIndex, int pValue) setShort(int pIndex, int pValue) setShortLE(int pIndex, int pValue) setZero(int pIndex, int pLength) skipBytes(int pLength) io.netty.buffer.ByteBufslice()io.netty.buffer.ByteBufslice(int pIndex, int pLength) toString()touch()io.netty.buffer.ByteBufunwrap()intvoidwriteBitSet(BitSet pBitSet) Write a BitSet as a long[].voidwriteBlockHitResult(BlockHitResult pResult) Write a BlockHitResult.static voidwriteBlockPos(io.netty.buffer.ByteBuf pBuffer, BlockPos pPos) writeBlockPos(BlockPos pPos) Writes a BlockPos encoded as a long to the buffer.writeBoolean(boolean pValue) <T> FriendlyByteBufwriteById(ToIntFunction<T> pIdGetter, T pValue) writeByte(int pValue) writeByteArray(byte[] pArray) static voidwriteByteArray(io.netty.buffer.ByteBuf pBuffer, byte[] pArray) writeBytes(byte[] pSource) writeBytes(byte[] pSource, int pSourceIndex, int pLength) writeBytes(io.netty.buffer.ByteBuf pSource) writeBytes(io.netty.buffer.ByteBuf pSource, int pLength) writeBytes(io.netty.buffer.ByteBuf pSource, int pSourceIndex, int pLength) intwriteBytes(InputStream pIn, int pLength) writeBytes(ByteBuffer pSource) intwriteBytes(FileChannel pIn, long pPosition, int pLength) intwriteBytes(ScatteringByteChannel pIn, int pLength) writeChar(int pValue) intwriteCharSequence(CharSequence pCharSequence, Charset pCharset) static voidwriteChunkPos(io.netty.buffer.ByteBuf pBuffer, ChunkPos pChunkPos) writeChunkPos(ChunkPos pChunkPos) Writes a ChunkPos encoded as a long to the buffer.<T> voidwriteCollection(Collection<T> pCollection, StreamEncoder<? super FriendlyByteBuf, T> pElementWriter) voidwriteContainerId(int pContainerId) static voidwriteContainerId(io.netty.buffer.ByteBuf pBuffer, int pContainerId) Write a timestamp as milliseconds since the unix epoch.writeDouble(double pValue) <L,R> void writeEither(com.mojang.datafixers.util.Either<L, R> pEither, StreamEncoder<? super FriendlyByteBuf, L> pLeftWriter, StreamEncoder<? super FriendlyByteBuf, R> pRightWriter) Writes an enum of the given type T using the ordinal encoded as a VarInt to the buffer.<E extends Enum<E>>
voidwriteEnumSet(EnumSet<E> pEnumSet, Class<E> pEnumClass) voidwriteFixedBitSet(BitSet pBitSet, int pSize) writeFixedSizeLongArray(long[] pArray) static voidwriteFixedSizeLongArray(io.netty.buffer.ByteBuf pBuffer, long[] pArray) writeFloat(float pValue) voidwriteGlobalPos(GlobalPos pPos) voidwriteInstant(Instant pInstant) writeInt(int pValue) voidwriteIntIdList(it.unimi.dsi.fastutil.ints.IntList pItIdList) Write an IntList to this buffer.writeIntLE(int pValue) <T> voidwriteJsonWithCodec(com.mojang.serialization.Codec<T> pCodec, T pValue) writeLong(long pValue) writeLongArray(long[] pArray) Writes an array of longs to the buffer, prefixed by the length of the array (as a VarInt).static voidwriteLongArray(io.netty.buffer.ByteBuf pBuffer, long[] pArray) writeLongLE(long pValue) voidwriteLpVec3(Vec3 pVec3) <K,V> void writeMap(Map<K, V> pMap, StreamEncoder<? super FriendlyByteBuf, K> pKeyWriter, StreamEncoder<? super FriendlyByteBuf, V> pValueWriter) writeMedium(int pValue) writeMediumLE(int pValue) static voidstatic <T,B extends io.netty.buffer.ByteBuf>
voidwriteNullable(B pBuffer, T pValue, StreamEncoder<? super B, T> pWriter) <T> voidwriteNullable(T pValue, StreamEncoder<? super FriendlyByteBuf, T> pWriter) <T> voidwriteOptional(Optional<T> pOptional, StreamEncoder<? super FriendlyByteBuf, T> pWriter) writePublicKey(PublicKey pPublicKey) static voidwriteQuaternion(io.netty.buffer.ByteBuf pBuffer, Quaternionf pQuaternion) voidwriteQuaternion(Quaternionf pQuaternion) voidwriteResourceKey(ResourceKey<?> pResourceKey) writeResourceLocation(ResourceLocation pResourceLocation) Write a ResourceLocation using its String representation.intwriterIndex(int pWriterIndex) writeShort(int pValue) writeShortLE(int pValue) Writes a String with a maximum length ofShort.MAX_VALUE.Writes a String with a maximum length.static voidWrites a UUID encoded as two longs to this buffer.writeVarInt(int pInput) Writes a compressed int to the buffer.writeVarIntArray(int[] pArray) Writes an array of VarInts to the buffer, prefixed by the length of the array (as a VarInt).writeVarLong(long pValue) Writes a compressed long to the buffer.static voidvoidstatic voidwriteVector3f(io.netty.buffer.ByteBuf pBuffer, Vector3f pVector3f) voidwriteVector3f(Vector3f pVector3f) <T> FriendlyByteBufwriteWithCodec(com.mojang.serialization.DynamicOps<Tag> pOps, com.mojang.serialization.Codec<T> pCodec, T pValue) Deprecated.writeZero(int pLength) Methods inherited from class io.netty.buffer.ByteBuf
asByteBuf, getDoubleLE, getFloatLE, readDoubleLE, readFloatLE, setDoubleLE, setFloatLE, writeDoubleLE, writeFloatLEMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface net.neoforged.neoforge.common.extensions.IFriendlyByteBufExtension
readArray, readMap, writeArray, writeByte, writeMap, writeObjectCollection
-
Field Details
-
DEFAULT_NBT_QUOTA
public static final int DEFAULT_NBT_QUOTA- See Also:
-
source
private final io.netty.buffer.ByteBuf source -
MAX_STRING_LENGTH
public static final short MAX_STRING_LENGTH- See Also:
-
MAX_COMPONENT_STRING_LENGTH
public static final int MAX_COMPONENT_STRING_LENGTH- See Also:
-
PUBLIC_KEY_SIZE
private static final int PUBLIC_KEY_SIZE- See Also:
-
MAX_PUBLIC_KEY_HEADER_SIZE
private static final int MAX_PUBLIC_KEY_HEADER_SIZE- See Also:
-
MAX_PUBLIC_KEY_LENGTH
private static final int MAX_PUBLIC_KEY_LENGTH- See Also:
-
GSON
-
-
Constructor Details
-
FriendlyByteBuf
public FriendlyByteBuf(io.netty.buffer.ByteBuf pSource)
-
-
Method Details
-
readWithCodecTrusted
@Deprecated public <T> T readWithCodecTrusted(com.mojang.serialization.DynamicOps<Tag> pOps, com.mojang.serialization.Codec<T> pCodec) Deprecated. -
readWithCodec
@Deprecated public <T> T readWithCodec(com.mojang.serialization.DynamicOps<Tag> pOps, com.mojang.serialization.Codec<T> pCodec, NbtAccounter pNbtAccounter) Deprecated. -
writeWithCodec
@Deprecated public <T> FriendlyByteBuf writeWithCodec(com.mojang.serialization.DynamicOps<Tag> pOps, com.mojang.serialization.Codec<T> pCodec, T pValue) Deprecated. -
readLenientJsonWithCodec
public <T> T readLenientJsonWithCodec(com.mojang.serialization.Codec<T> pCodec) -
writeJsonWithCodec
public <T> void writeJsonWithCodec(com.mojang.serialization.Codec<T> pCodec, T pValue) -
limitValue
-
readCollection
public <T,C extends Collection<T>> C readCollection(IntFunction<C> pCollectionFactory, StreamDecoder<? super FriendlyByteBuf, T> pElementReader) -
writeCollection
public <T> void writeCollection(Collection<T> pCollection, StreamEncoder<? super FriendlyByteBuf, T> pElementWriter) -
readList
-
readIntIdList
public it.unimi.dsi.fastutil.ints.IntList readIntIdList() -
writeIntIdList
public void writeIntIdList(it.unimi.dsi.fastutil.ints.IntList pItIdList) Write an IntList to this buffer. Every element is encoded as a VarInt.- See Also:
-
readMap
public <K,V, M readMapM extends Map<K, V>> (IntFunction<M> pMapFactory, StreamDecoder<? super FriendlyByteBuf, K> pKeyReader, StreamDecoder<? super FriendlyByteBuf, V> pValueReader) -
readMap
public <K,V> Map<K,V> readMap(StreamDecoder<? super FriendlyByteBuf, K> pKeyReader, StreamDecoder<? super FriendlyByteBuf, V> pValueReader) -
writeMap
public <K,V> void writeMap(Map<K, V> pMap, StreamEncoder<? super FriendlyByteBuf, K> pKeyWriter, StreamEncoder<? super FriendlyByteBuf, V> pValueWriter) -
readWithCount
Read a VarInt N from this buffer, then reads N values by callingreader. -
writeEnumSet
-
readEnumSet
-
writeOptional
public <T> void writeOptional(Optional<T> pOptional, StreamEncoder<? super FriendlyByteBuf, T> pWriter) -
readOptional
-
writeEither
public <L,R> void writeEither(com.mojang.datafixers.util.Either<L, R> pEither, StreamEncoder<? super FriendlyByteBuf, L> pLeftWriter, StreamEncoder<? super FriendlyByteBuf, R> pRightWriter) -
readEither
public <L,R> com.mojang.datafixers.util.Either<L,R> readEither(StreamDecoder<? super FriendlyByteBuf, L> pLeftReader, StreamDecoder<? super FriendlyByteBuf, R> pRightReader) -
readNullable
-
readNullable
@Nullable public static <T,B extends io.netty.buffer.ByteBuf> T readNullable(B pBuffer, StreamDecoder<? super B, T> pReader) -
writeNullable
-
writeNullable
public static <T,B extends io.netty.buffer.ByteBuf> void writeNullable(B pBuffer, @Nullable T pValue, StreamEncoder<? super B, T> pWriter) -
readByteArray
public byte[] readByteArray() -
readByteArray
public static byte[] readByteArray(io.netty.buffer.ByteBuf pBuffer) -
writeByteArray
-
writeByteArray
public static void writeByteArray(io.netty.buffer.ByteBuf pBuffer, byte[] pArray) -
readByteArray
public byte[] readByteArray(int pMaxLength) -
readByteArray
public static byte[] readByteArray(io.netty.buffer.ByteBuf pBuffer, int pMaxSize) -
writeVarIntArray
Writes an array of VarInts to the buffer, prefixed by the length of the array (as a VarInt).- See Also:
-
readVarIntArray
public int[] readVarIntArray() -
readVarIntArray
public int[] readVarIntArray(int pMaxLength) Reads an array of VarInts with a maximum length from this buffer.- See Also:
-
writeLongArray
Writes an array of longs to the buffer, prefixed by the length of the array (as a VarInt).- See Also:
-
writeLongArray
public static void writeLongArray(io.netty.buffer.ByteBuf pBuffer, long[] pArray) -
writeFixedSizeLongArray
-
writeFixedSizeLongArray
public static void writeFixedSizeLongArray(io.netty.buffer.ByteBuf pBuffer, long[] pArray) -
readLongArray
public long[] readLongArray() -
readFixedSizeLongArray
public long[] readFixedSizeLongArray(long[] pOutput) -
readLongArray
public static long[] readLongArray(io.netty.buffer.ByteBuf pBuffer) -
readFixedSizeLongArray
public static long[] readFixedSizeLongArray(io.netty.buffer.ByteBuf pBuffer, long[] pOutput) -
readBlockPos
-
readBlockPos
-
writeBlockPos
Writes a BlockPos encoded as a long to the buffer.- See Also:
-
writeBlockPos
-
readChunkPos
-
writeChunkPos
Writes a ChunkPos encoded as a long to the buffer.- See Also:
-
readChunkPos
-
writeChunkPos
-
readGlobalPos
-
writeGlobalPos
-
readVector3f
-
readVector3f
-
writeVector3f
-
writeVector3f
-
readQuaternion
-
readQuaternion
-
writeQuaternion
-
writeQuaternion
-
readVec3
-
readVec3
-
writeVec3
-
writeVec3
-
readLpVec3
-
writeLpVec3
-
readEnum
Reads an enum of the given type T using the ordinal encoded as a VarInt from the buffer.- See Also:
-
writeEnum
Writes an enum of the given type T using the ordinal encoded as a VarInt to the buffer.- See Also:
-
readById
-
writeById
-
readVarInt
public int readVarInt() -
readVarLong
public long readVarLong() -
writeUUID
Writes a UUID encoded as two longs to this buffer.- See Also:
-
writeUUID
-
readUUID
-
readUUID
-
writeVarInt
Writes a compressed int to the buffer. The smallest number of bytes to fit the passed int will be written. Of each such byte only 7 bits will be used to describe the actual value since its most significant bit dictates whether the next byte is part of that same int. Micro-optimization for int values that are usually small. -
writeVarLong
Writes a compressed long to the buffer. The smallest number of bytes to fit the passed long will be written. Of each such byte only 7 bits will be used to describe the actual value since its most significant bit dictates whether the next byte is part of that same long. Micro-optimization for long values that are usually small. -
writeNbt
-
writeNbt
-
readNbt
-
readNbt
-
readNbt
-
readNbt
-
readUtf
-
readUtf
Reads a string with a maximum length from this buffer.- See Also:
-
writeUtf
Writes a String with a maximum length ofShort.MAX_VALUE.- See Also:
-
writeUtf
Writes a String with a maximum length.- See Also:
-
readResourceLocation
-
writeResourceLocation
Write a ResourceLocation using its String representation.- See Also:
-
readResourceKey
-
writeResourceKey
-
readRegistryKey
-
readDate
-
writeDate
Write a timestamp as milliseconds since the unix epoch.- See Also:
-
readInstant
-
writeInstant
-
readPublicKey
-
writePublicKey
-
readBlockHitResult
-
writeBlockHitResult
Write a BlockHitResult.- See Also:
-
readBitSet
-
writeBitSet
Write a BitSet as a long[].- See Also:
-
readFixedBitSet
-
writeFixedBitSet
-
readContainerId
public static int readContainerId(io.netty.buffer.ByteBuf pBuffer) -
readContainerId
public int readContainerId() -
writeContainerId
public static void writeContainerId(io.netty.buffer.ByteBuf pBuffer, int pContainerId) -
writeContainerId
public void writeContainerId(int pContainerId) -
isContiguous
public boolean isContiguous()- Overrides:
isContiguousin classio.netty.buffer.ByteBuf
-
maxFastWritableBytes
public int maxFastWritableBytes()- Overrides:
maxFastWritableBytesin classio.netty.buffer.ByteBuf
-
capacity
public int capacity()- Specified by:
capacityin classio.netty.buffer.ByteBuf
-
capacity
- Specified by:
capacityin classio.netty.buffer.ByteBuf
-
maxCapacity
public int maxCapacity()- Specified by:
maxCapacityin classio.netty.buffer.ByteBuf
-
alloc
public io.netty.buffer.ByteBufAllocator alloc()- Specified by:
allocin classio.netty.buffer.ByteBuf
-
order
- Specified by:
orderin classio.netty.buffer.ByteBuf
-
order
- Specified by:
orderin classio.netty.buffer.ByteBuf
-
unwrap
public io.netty.buffer.ByteBuf unwrap()- Specified by:
unwrapin classio.netty.buffer.ByteBuf
-
isDirect
public boolean isDirect()- Specified by:
isDirectin classio.netty.buffer.ByteBuf
-
isReadOnly
public boolean isReadOnly()- Specified by:
isReadOnlyin classio.netty.buffer.ByteBuf
-
asReadOnly
public io.netty.buffer.ByteBuf asReadOnly()- Specified by:
asReadOnlyin classio.netty.buffer.ByteBuf
-
readerIndex
public int readerIndex()- Specified by:
readerIndexin classio.netty.buffer.ByteBuf
-
readerIndex
- Specified by:
readerIndexin classio.netty.buffer.ByteBuf
-
writerIndex
public int writerIndex()- Specified by:
writerIndexin classio.netty.buffer.ByteBuf
-
writerIndex
- Specified by:
writerIndexin classio.netty.buffer.ByteBuf
-
setIndex
- Specified by:
setIndexin classio.netty.buffer.ByteBuf
-
readableBytes
public int readableBytes()- Specified by:
readableBytesin classio.netty.buffer.ByteBuf
-
writableBytes
public int writableBytes()- Specified by:
writableBytesin classio.netty.buffer.ByteBuf
-
maxWritableBytes
public int maxWritableBytes()- Specified by:
maxWritableBytesin classio.netty.buffer.ByteBuf
-
isReadable
public boolean isReadable()- Specified by:
isReadablein classio.netty.buffer.ByteBuf
-
isReadable
public boolean isReadable(int pSize) - Specified by:
isReadablein classio.netty.buffer.ByteBuf
-
isWritable
public boolean isWritable()- Specified by:
isWritablein classio.netty.buffer.ByteBuf
-
isWritable
public boolean isWritable(int pSize) - Specified by:
isWritablein classio.netty.buffer.ByteBuf
-
clear
- Specified by:
clearin classio.netty.buffer.ByteBuf
-
markReaderIndex
- Specified by:
markReaderIndexin classio.netty.buffer.ByteBuf
-
resetReaderIndex
- Specified by:
resetReaderIndexin classio.netty.buffer.ByteBuf
-
markWriterIndex
- Specified by:
markWriterIndexin classio.netty.buffer.ByteBuf
-
resetWriterIndex
- Specified by:
resetWriterIndexin classio.netty.buffer.ByteBuf
-
discardReadBytes
- Specified by:
discardReadBytesin classio.netty.buffer.ByteBuf
-
discardSomeReadBytes
- Specified by:
discardSomeReadBytesin classio.netty.buffer.ByteBuf
-
ensureWritable
- Specified by:
ensureWritablein classio.netty.buffer.ByteBuf
-
ensureWritable
public int ensureWritable(int pSize, boolean pForce) - Specified by:
ensureWritablein classio.netty.buffer.ByteBuf
-
getBoolean
public boolean getBoolean(int pIndex) - Specified by:
getBooleanin classio.netty.buffer.ByteBuf
-
getByte
public byte getByte(int pIndex) - Specified by:
getBytein classio.netty.buffer.ByteBuf
-
getUnsignedByte
public short getUnsignedByte(int pIndex) - Specified by:
getUnsignedBytein classio.netty.buffer.ByteBuf
-
getShort
public short getShort(int pIndex) - Specified by:
getShortin classio.netty.buffer.ByteBuf
-
getShortLE
public short getShortLE(int pIndex) - Specified by:
getShortLEin classio.netty.buffer.ByteBuf
-
getUnsignedShort
public int getUnsignedShort(int pIndex) - Specified by:
getUnsignedShortin classio.netty.buffer.ByteBuf
-
getUnsignedShortLE
public int getUnsignedShortLE(int pIndex) - Specified by:
getUnsignedShortLEin classio.netty.buffer.ByteBuf
-
getMedium
public int getMedium(int pIndex) - Specified by:
getMediumin classio.netty.buffer.ByteBuf
-
getMediumLE
public int getMediumLE(int pIndex) - Specified by:
getMediumLEin classio.netty.buffer.ByteBuf
-
getUnsignedMedium
public int getUnsignedMedium(int pIndex) - Specified by:
getUnsignedMediumin classio.netty.buffer.ByteBuf
-
getUnsignedMediumLE
public int getUnsignedMediumLE(int pIndex) - Specified by:
getUnsignedMediumLEin classio.netty.buffer.ByteBuf
-
getInt
public int getInt(int pIndex) - Specified by:
getIntin classio.netty.buffer.ByteBuf
-
getIntLE
public int getIntLE(int pIndex) - Specified by:
getIntLEin classio.netty.buffer.ByteBuf
-
getUnsignedInt
public long getUnsignedInt(int pIndex) - Specified by:
getUnsignedIntin classio.netty.buffer.ByteBuf
-
getUnsignedIntLE
public long getUnsignedIntLE(int pIndex) - Specified by:
getUnsignedIntLEin classio.netty.buffer.ByteBuf
-
getLong
public long getLong(int pIndex) - Specified by:
getLongin classio.netty.buffer.ByteBuf
-
getLongLE
public long getLongLE(int pIndex) - Specified by:
getLongLEin classio.netty.buffer.ByteBuf
-
getChar
public char getChar(int pIndex) - Specified by:
getCharin classio.netty.buffer.ByteBuf
-
getFloat
public float getFloat(int pIndex) - Specified by:
getFloatin classio.netty.buffer.ByteBuf
-
getDouble
public double getDouble(int pIndex) - Specified by:
getDoublein classio.netty.buffer.ByteBuf
-
getBytes
- Specified by:
getBytesin classio.netty.buffer.ByteBuf
-
getBytes
- Specified by:
getBytesin classio.netty.buffer.ByteBuf
-
getBytes
public FriendlyByteBuf getBytes(int pIndex, io.netty.buffer.ByteBuf pDestination, int pDestinationIndex, int pLength) - Specified by:
getBytesin classio.netty.buffer.ByteBuf
-
getBytes
- Specified by:
getBytesin classio.netty.buffer.ByteBuf
-
getBytes
public FriendlyByteBuf getBytes(int pIndex, byte[] pDestination, int pDestinationIndex, int pLength) - Specified by:
getBytesin classio.netty.buffer.ByteBuf
-
getBytes
- Specified by:
getBytesin classio.netty.buffer.ByteBuf
-
getBytes
- Specified by:
getBytesin classio.netty.buffer.ByteBuf- Throws:
IOException
-
getBytes
- Specified by:
getBytesin classio.netty.buffer.ByteBuf- Throws:
IOException
-
getBytes
- Specified by:
getBytesin classio.netty.buffer.ByteBuf- Throws:
IOException
-
getCharSequence
- Specified by:
getCharSequencein classio.netty.buffer.ByteBuf
-
setBoolean
- Specified by:
setBooleanin classio.netty.buffer.ByteBuf
-
setByte
- Specified by:
setBytein classio.netty.buffer.ByteBuf
-
setShort
- Specified by:
setShortin classio.netty.buffer.ByteBuf
-
setShortLE
- Specified by:
setShortLEin classio.netty.buffer.ByteBuf
-
setMedium
- Specified by:
setMediumin classio.netty.buffer.ByteBuf
-
setMediumLE
- Specified by:
setMediumLEin classio.netty.buffer.ByteBuf
-
setInt
- Specified by:
setIntin classio.netty.buffer.ByteBuf
-
setIntLE
- Specified by:
setIntLEin classio.netty.buffer.ByteBuf
-
setLong
- Specified by:
setLongin classio.netty.buffer.ByteBuf
-
setLongLE
- Specified by:
setLongLEin classio.netty.buffer.ByteBuf
-
setChar
- Specified by:
setCharin classio.netty.buffer.ByteBuf
-
setFloat
- Specified by:
setFloatin classio.netty.buffer.ByteBuf
-
setDouble
- Specified by:
setDoublein classio.netty.buffer.ByteBuf
-
setBytes
- Specified by:
setBytesin classio.netty.buffer.ByteBuf
-
setBytes
- Specified by:
setBytesin classio.netty.buffer.ByteBuf
-
setBytes
public FriendlyByteBuf setBytes(int pIndex, io.netty.buffer.ByteBuf pSource, int pSourceIndex, int pLength) - Specified by:
setBytesin classio.netty.buffer.ByteBuf
-
setBytes
- Specified by:
setBytesin classio.netty.buffer.ByteBuf
-
setBytes
- Specified by:
setBytesin classio.netty.buffer.ByteBuf
-
setBytes
- Specified by:
setBytesin classio.netty.buffer.ByteBuf
-
setBytes
- Specified by:
setBytesin classio.netty.buffer.ByteBuf- Throws:
IOException
-
setBytes
- Specified by:
setBytesin classio.netty.buffer.ByteBuf- Throws:
IOException
-
setBytes
- Specified by:
setBytesin classio.netty.buffer.ByteBuf- Throws:
IOException
-
setZero
- Specified by:
setZeroin classio.netty.buffer.ByteBuf
-
setCharSequence
- Specified by:
setCharSequencein classio.netty.buffer.ByteBuf
-
readBoolean
public boolean readBoolean()- Specified by:
readBooleanin classio.netty.buffer.ByteBuf
-
readByte
public byte readByte()- Specified by:
readBytein classio.netty.buffer.ByteBuf
-
readUnsignedByte
public short readUnsignedByte()- Specified by:
readUnsignedBytein classio.netty.buffer.ByteBuf
-
readShort
public short readShort()- Specified by:
readShortin classio.netty.buffer.ByteBuf
-
readShortLE
public short readShortLE()- Specified by:
readShortLEin classio.netty.buffer.ByteBuf
-
readUnsignedShort
public int readUnsignedShort()- Specified by:
readUnsignedShortin classio.netty.buffer.ByteBuf
-
readUnsignedShortLE
public int readUnsignedShortLE()- Specified by:
readUnsignedShortLEin classio.netty.buffer.ByteBuf
-
readMedium
public int readMedium()- Specified by:
readMediumin classio.netty.buffer.ByteBuf
-
readMediumLE
public int readMediumLE()- Specified by:
readMediumLEin classio.netty.buffer.ByteBuf
-
readUnsignedMedium
public int readUnsignedMedium()- Specified by:
readUnsignedMediumin classio.netty.buffer.ByteBuf
-
readUnsignedMediumLE
public int readUnsignedMediumLE()- Specified by:
readUnsignedMediumLEin classio.netty.buffer.ByteBuf
-
readInt
public int readInt()- Specified by:
readIntin classio.netty.buffer.ByteBuf
-
readIntLE
public int readIntLE()- Specified by:
readIntLEin classio.netty.buffer.ByteBuf
-
readUnsignedInt
public long readUnsignedInt()- Specified by:
readUnsignedIntin classio.netty.buffer.ByteBuf
-
readUnsignedIntLE
public long readUnsignedIntLE()- Specified by:
readUnsignedIntLEin classio.netty.buffer.ByteBuf
-
readLong
public long readLong()- Specified by:
readLongin classio.netty.buffer.ByteBuf
-
readLongLE
public long readLongLE()- Specified by:
readLongLEin classio.netty.buffer.ByteBuf
-
readChar
public char readChar()- Specified by:
readCharin classio.netty.buffer.ByteBuf
-
readFloat
public float readFloat()- Specified by:
readFloatin classio.netty.buffer.ByteBuf
-
readDouble
public double readDouble()- Specified by:
readDoublein classio.netty.buffer.ByteBuf
-
readBytes
public io.netty.buffer.ByteBuf readBytes(int pLength) - Specified by:
readBytesin classio.netty.buffer.ByteBuf
-
readSlice
public io.netty.buffer.ByteBuf readSlice(int pLength) - Specified by:
readSlicein classio.netty.buffer.ByteBuf
-
readRetainedSlice
public io.netty.buffer.ByteBuf readRetainedSlice(int pLength) - Specified by:
readRetainedSlicein classio.netty.buffer.ByteBuf
-
readBytes
- Specified by:
readBytesin classio.netty.buffer.ByteBuf
-
readBytes
- Specified by:
readBytesin classio.netty.buffer.ByteBuf
-
readBytes
public FriendlyByteBuf readBytes(io.netty.buffer.ByteBuf pDestination, int pDestinationIndex, int pLength) - Specified by:
readBytesin classio.netty.buffer.ByteBuf
-
readBytes
- Specified by:
readBytesin classio.netty.buffer.ByteBuf
-
readBytes
- Specified by:
readBytesin classio.netty.buffer.ByteBuf
-
readBytes
- Specified by:
readBytesin classio.netty.buffer.ByteBuf
-
readBytes
- Specified by:
readBytesin classio.netty.buffer.ByteBuf- Throws:
IOException
-
readBytes
- Specified by:
readBytesin classio.netty.buffer.ByteBuf- Throws:
IOException
-
readCharSequence
- Specified by:
readCharSequencein classio.netty.buffer.ByteBuf
-
readBytes
- Specified by:
readBytesin classio.netty.buffer.ByteBuf- Throws:
IOException
-
skipBytes
- Specified by:
skipBytesin classio.netty.buffer.ByteBuf
-
writeBoolean
- Specified by:
writeBooleanin classio.netty.buffer.ByteBuf
-
writeByte
- Specified by:
writeBytein classio.netty.buffer.ByteBuf
-
writeShort
- Specified by:
writeShortin classio.netty.buffer.ByteBuf
-
writeShortLE
- Specified by:
writeShortLEin classio.netty.buffer.ByteBuf
-
writeMedium
- Specified by:
writeMediumin classio.netty.buffer.ByteBuf
-
writeMediumLE
- Specified by:
writeMediumLEin classio.netty.buffer.ByteBuf
-
writeInt
- Specified by:
writeIntin classio.netty.buffer.ByteBuf
-
writeIntLE
- Specified by:
writeIntLEin classio.netty.buffer.ByteBuf
-
writeLong
- Specified by:
writeLongin classio.netty.buffer.ByteBuf
-
writeLongLE
- Specified by:
writeLongLEin classio.netty.buffer.ByteBuf
-
writeChar
- Specified by:
writeCharin classio.netty.buffer.ByteBuf
-
writeFloat
- Specified by:
writeFloatin classio.netty.buffer.ByteBuf
-
writeDouble
- Specified by:
writeDoublein classio.netty.buffer.ByteBuf
-
writeBytes
- Specified by:
writeBytesin classio.netty.buffer.ByteBuf
-
writeBytes
- Specified by:
writeBytesin classio.netty.buffer.ByteBuf
-
writeBytes
- Specified by:
writeBytesin classio.netty.buffer.ByteBuf
-
writeBytes
- Specified by:
writeBytesin classio.netty.buffer.ByteBuf
-
writeBytes
- Specified by:
writeBytesin classio.netty.buffer.ByteBuf
-
writeBytes
- Specified by:
writeBytesin classio.netty.buffer.ByteBuf
-
writeBytes
- Specified by:
writeBytesin classio.netty.buffer.ByteBuf- Throws:
IOException
-
writeBytes
- Specified by:
writeBytesin classio.netty.buffer.ByteBuf- Throws:
IOException
-
writeBytes
- Specified by:
writeBytesin classio.netty.buffer.ByteBuf- Throws:
IOException
-
writeZero
- Specified by:
writeZeroin classio.netty.buffer.ByteBuf
-
writeCharSequence
- Specified by:
writeCharSequencein classio.netty.buffer.ByteBuf
-
indexOf
public int indexOf(int pFromIndex, int pToIndex, byte pValue) - Specified by:
indexOfin classio.netty.buffer.ByteBuf
-
bytesBefore
public int bytesBefore(byte pValue) - Specified by:
bytesBeforein classio.netty.buffer.ByteBuf
-
bytesBefore
public int bytesBefore(int pLength, byte pValue) - Specified by:
bytesBeforein classio.netty.buffer.ByteBuf
-
bytesBefore
public int bytesBefore(int pIndex, int pLength, byte pValue) - Specified by:
bytesBeforein classio.netty.buffer.ByteBuf
-
forEachByte
public int forEachByte(io.netty.util.ByteProcessor pProcessor) - Specified by:
forEachBytein classio.netty.buffer.ByteBuf
-
forEachByte
public int forEachByte(int pIndex, int pLength, io.netty.util.ByteProcessor pProcessor) - Specified by:
forEachBytein classio.netty.buffer.ByteBuf
-
forEachByteDesc
public int forEachByteDesc(io.netty.util.ByteProcessor pProcessor) - Specified by:
forEachByteDescin classio.netty.buffer.ByteBuf
-
forEachByteDesc
public int forEachByteDesc(int pIndex, int pLength, io.netty.util.ByteProcessor pProcessor) - Specified by:
forEachByteDescin classio.netty.buffer.ByteBuf
-
copy
public io.netty.buffer.ByteBuf copy()- Specified by:
copyin classio.netty.buffer.ByteBuf
-
copy
public io.netty.buffer.ByteBuf copy(int pIndex, int pLength) - Specified by:
copyin classio.netty.buffer.ByteBuf
-
slice
public io.netty.buffer.ByteBuf slice()- Specified by:
slicein classio.netty.buffer.ByteBuf
-
retainedSlice
public io.netty.buffer.ByteBuf retainedSlice()- Specified by:
retainedSlicein classio.netty.buffer.ByteBuf
-
slice
public io.netty.buffer.ByteBuf slice(int pIndex, int pLength) - Specified by:
slicein classio.netty.buffer.ByteBuf
-
retainedSlice
public io.netty.buffer.ByteBuf retainedSlice(int pIndex, int pLength) - Specified by:
retainedSlicein classio.netty.buffer.ByteBuf
-
duplicate
public io.netty.buffer.ByteBuf duplicate()- Specified by:
duplicatein classio.netty.buffer.ByteBuf
-
retainedDuplicate
public io.netty.buffer.ByteBuf retainedDuplicate()- Specified by:
retainedDuplicatein classio.netty.buffer.ByteBuf
-
nioBufferCount
public int nioBufferCount()- Specified by:
nioBufferCountin classio.netty.buffer.ByteBuf
-
nioBuffer
- Specified by:
nioBufferin classio.netty.buffer.ByteBuf
-
nioBuffer
- Specified by:
nioBufferin classio.netty.buffer.ByteBuf
-
internalNioBuffer
- Specified by:
internalNioBufferin classio.netty.buffer.ByteBuf
-
nioBuffers
- Specified by:
nioBuffersin classio.netty.buffer.ByteBuf
-
nioBuffers
- Specified by:
nioBuffersin classio.netty.buffer.ByteBuf
-
hasArray
public boolean hasArray()- Specified by:
hasArrayin classio.netty.buffer.ByteBuf
-
array
public byte[] array()- Specified by:
arrayin classio.netty.buffer.ByteBuf
-
arrayOffset
public int arrayOffset()- Specified by:
arrayOffsetin classio.netty.buffer.ByteBuf
-
hasMemoryAddress
public boolean hasMemoryAddress()- Specified by:
hasMemoryAddressin classio.netty.buffer.ByteBuf
-
memoryAddress
public long memoryAddress()- Specified by:
memoryAddressin classio.netty.buffer.ByteBuf
-
toString
- Specified by:
toStringin classio.netty.buffer.ByteBuf
-
toString
- Specified by:
toStringin classio.netty.buffer.ByteBuf
-
hashCode
public int hashCode()- Specified by:
hashCodein classio.netty.buffer.ByteBuf
-
equals
- Specified by:
equalsin classio.netty.buffer.ByteBuf
-
compareTo
public int compareTo(io.netty.buffer.ByteBuf pOther) - Specified by:
compareToin interfaceComparable<io.netty.buffer.ByteBuf>- Specified by:
compareToin classio.netty.buffer.ByteBuf
-
toString
- Specified by:
toStringin classio.netty.buffer.ByteBuf
-
retain
- Specified by:
retainin interfaceio.netty.util.ReferenceCounted- Specified by:
retainin classio.netty.buffer.ByteBuf
-
retain
- Specified by:
retainin interfaceio.netty.util.ReferenceCounted- Specified by:
retainin classio.netty.buffer.ByteBuf
-
touch
- Specified by:
touchin interfaceio.netty.util.ReferenceCounted- Specified by:
touchin classio.netty.buffer.ByteBuf
-
touch
- Specified by:
touchin interfaceio.netty.util.ReferenceCounted- Specified by:
touchin classio.netty.buffer.ByteBuf
-
refCnt
public int refCnt()- Specified by:
refCntin interfaceio.netty.util.ReferenceCounted
-
release
public boolean release()- Specified by:
releasein interfaceio.netty.util.ReferenceCounted
-
release
public boolean release(int pDecrement) - Specified by:
releasein interfaceio.netty.util.ReferenceCounted
-
getSource
@Internal public io.netty.buffer.ByteBuf getSource()
-