public class PacketBuffer extends io.netty.buffer.ByteBuf implements IForgePacketBuffer
| コンストラクタと説明 |
|---|
PacketBuffer(io.netty.buffer.ByteBuf wrapped) |
| 修飾子とタイプ | メソッドと説明 |
|---|---|
io.netty.buffer.ByteBufAllocator |
alloc()
Returns the
ByteBufAllocator which created this buffer. |
byte[] |
array()
Returns the backing byte array of this buffer.
|
int |
arrayOffset()
Returns the offset of the first byte within the backing byte array of
this buffer.
|
io.netty.buffer.ByteBuf |
asReadOnly()
Returns a read-only version of this buffer.
|
int |
bytesBefore(byte p_bytesBefore_1_)
Locates the first occurrence of the specified
value in this
buffer. |
int |
bytesBefore(int p_bytesBefore_1_,
byte p_bytesBefore_2_)
Locates the first occurrence of the specified
value in this
buffer. |
int |
bytesBefore(int p_bytesBefore_1_,
int p_bytesBefore_2_,
byte p_bytesBefore_3_)
Locates the first occurrence of the specified
value in this
buffer. |
int |
capacity()
Returns the number of bytes (octets) this buffer can contain.
|
io.netty.buffer.ByteBuf |
capacity(int p_capacity_1_)
Adjusts the capacity of this buffer.
|
io.netty.buffer.ByteBuf |
clear()
Sets the
readerIndex and writerIndex of this buffer to
0. |
int |
compareTo(io.netty.buffer.ByteBuf p_compareTo_1_)
Compares the content of the specified buffer to the content of this
buffer.
|
io.netty.buffer.ByteBuf |
copy()
Returns a copy of this buffer's readable bytes.
|
io.netty.buffer.ByteBuf |
copy(int p_copy_1_,
int p_copy_2_)
Returns a copy of this buffer's sub-region.
|
io.netty.buffer.ByteBuf |
discardReadBytes()
Discards the bytes between the 0th index and
readerIndex. |
io.netty.buffer.ByteBuf |
discardSomeReadBytes()
Similar to
ByteBuf.discardReadBytes() except that this method might discard
some, all, or none of read bytes depending on its internal implementation to reduce
overall memory bandwidth consumption at the cost of potentially additional memory
consumption. |
io.netty.buffer.ByteBuf |
duplicate()
Returns a buffer which shares the whole region of this buffer.
|
io.netty.buffer.ByteBuf |
ensureWritable(int p_ensureWritable_1_)
Makes sure the number of the writable bytes
is equal to or greater than the specified value.
|
int |
ensureWritable(int p_ensureWritable_1_,
boolean p_ensureWritable_2_)
Tries to make sure the number of the writable bytes
is equal to or greater than the specified value.
|
boolean |
equals(java.lang.Object p_equals_1_)
Determines if the content of the specified buffer is identical to the
content of this array.
|
int |
forEachByte(io.netty.util.ByteProcessor p_forEachByte_1_)
Iterates over the readable bytes of this buffer with the specified
processor in ascending order. |
int |
forEachByte(int p_forEachByte_1_,
int p_forEachByte_2_,
io.netty.util.ByteProcessor p_forEachByte_3_)
Iterates over the specified area of this buffer with the specified
processor in ascending order. |
int |
forEachByteDesc(io.netty.util.ByteProcessor p_forEachByteDesc_1_)
Iterates over the readable bytes of this buffer with the specified
processor in descending order. |
int |
forEachByteDesc(int p_forEachByteDesc_1_,
int p_forEachByteDesc_2_,
io.netty.util.ByteProcessor p_forEachByteDesc_3_)
Iterates over the specified area of this buffer with the specified
processor in descending order. |
boolean |
getBoolean(int p_getBoolean_1_)
Gets a boolean at the specified absolute (@code index) in this buffer.
|
byte |
getByte(int p_getByte_1_)
Gets a byte at the specified absolute
index in this buffer. |
io.netty.buffer.ByteBuf |
getBytes(int p_getBytes_1_,
byte[] p_getBytes_2_)
Transfers this buffer's data to the specified destination starting at
the specified absolute
index. |
io.netty.buffer.ByteBuf |
getBytes(int p_getBytes_1_,
byte[] p_getBytes_2_,
int p_getBytes_3_,
int p_getBytes_4_)
Transfers this buffer's data to the specified destination starting at
the specified absolute
index. |
io.netty.buffer.ByteBuf |
getBytes(int p_getBytes_1_,
io.netty.buffer.ByteBuf p_getBytes_2_)
Transfers this buffer's data to the specified destination starting at
the specified absolute
index until the destination becomes
non-writable. |
io.netty.buffer.ByteBuf |
getBytes(int p_getBytes_1_,
java.nio.ByteBuffer p_getBytes_2_)
Transfers this buffer's data to the specified destination starting at
the specified absolute
index until the destination's position
reaches its limit. |
io.netty.buffer.ByteBuf |
getBytes(int p_getBytes_1_,
io.netty.buffer.ByteBuf p_getBytes_2_,
int p_getBytes_3_)
Transfers this buffer's data to the specified destination starting at
the specified absolute
index. |
io.netty.buffer.ByteBuf |
getBytes(int p_getBytes_1_,
io.netty.buffer.ByteBuf p_getBytes_2_,
int p_getBytes_3_,
int p_getBytes_4_)
Transfers this buffer's data to the specified destination starting at
the specified absolute
index. |
int |
getBytes(int p_getBytes_1_,
java.nio.channels.FileChannel p_getBytes_2_,
long p_getBytes_3_,
int p_getBytes_5_)
Transfers this buffer's data starting at the specified absolute
index
to the specified channel starting at the given file position. |
int |
getBytes(int p_getBytes_1_,
java.nio.channels.GatheringByteChannel p_getBytes_2_,
int p_getBytes_3_)
Transfers this buffer's data to the specified channel starting at the
specified absolute
index. |
io.netty.buffer.ByteBuf |
getBytes(int p_getBytes_1_,
java.io.OutputStream p_getBytes_2_,
int p_getBytes_3_)
Transfers this buffer's data to the specified stream starting at the
specified absolute
index. |
char |
getChar(int p_getChar_1_)
Gets a 2-byte UTF-16 character at the specified absolute
index in this buffer. |
java.lang.CharSequence |
getCharSequence(int p_getCharSequence_1_,
int p_getCharSequence_2_,
java.nio.charset.Charset p_getCharSequence_3_)
Gets a
CharSequence with the given length at the given index. |
double |
getDouble(int p_getDouble_1_)
Gets a 64-bit floating point number at the specified absolute
index in this buffer. |
float |
getFloat(int p_getFloat_1_)
Gets a 32-bit floating point number at the specified absolute
index in this buffer. |
int |
getInt(int p_getInt_1_)
Gets a 32-bit integer at the specified absolute
index in
this buffer. |
int |
getIntLE(int p_getIntLE_1_)
Gets a 32-bit integer at the specified absolute
index in
this buffer with Little Endian Byte Order. |
long |
getLong(int p_getLong_1_)
Gets a 64-bit long integer at the specified absolute
index in
this buffer. |
long |
getLongLE(int p_getLongLE_1_)
Gets a 64-bit long integer at the specified absolute
index in
this buffer in Little Endian Byte Order. |
int |
getMedium(int p_getMedium_1_)
Gets a 24-bit medium integer at the specified absolute
index in
this buffer. |
int |
getMediumLE(int p_getMediumLE_1_)
Gets a 24-bit medium integer at the specified absolute
index in
this buffer in the Little Endian Byte Order. |
short |
getShort(int p_getShort_1_)
Gets a 16-bit short integer at the specified absolute
index in
this buffer. |
short |
getShortLE(int p_getShortLE_1_)
Gets a 16-bit short integer at the specified absolute
index in
this buffer in Little Endian Byte Order. |
short |
getUnsignedByte(int p_getUnsignedByte_1_)
Gets an unsigned byte at the specified absolute
index in this
buffer. |
long |
getUnsignedInt(int p_getUnsignedInt_1_)
Gets an unsigned 32-bit integer at the specified absolute
index
in this buffer. |
long |
getUnsignedIntLE(int p_getUnsignedIntLE_1_)
Gets an unsigned 32-bit integer at the specified absolute
index
in this buffer in Little Endian Byte Order. |
int |
getUnsignedMedium(int p_getUnsignedMedium_1_)
Gets an unsigned 24-bit medium integer at the specified absolute
index in this buffer. |
int |
getUnsignedMediumLE(int p_getUnsignedMediumLE_1_)
Gets an unsigned 24-bit medium integer at the specified absolute
index in this buffer in Little Endian Byte Order. |
int |
getUnsignedShort(int p_getUnsignedShort_1_)
Gets an unsigned 16-bit short integer at the specified absolute
index in this buffer. |
int |
getUnsignedShortLE(int p_getUnsignedShortLE_1_)
Gets an unsigned 16-bit short integer at the specified absolute
index in this buffer in Little Endian Byte Order. |
static int |
getVarIntSize(int input)
Calculates the number of bytes required to fit the supplied int (0-5) if it were to be read/written using
readVarIntFromBuffer or writeVarIntToBuffer
|
boolean |
hasArray()
Returns
true if and only if this buffer has a backing byte array. |
int |
hashCode()
Returns a hash code which was calculated from the content of this
buffer.
|
boolean |
hasMemoryAddress()
Returns
true if and only if this buffer has a reference to the low-level memory address that points
to the backing data. |
int |
indexOf(int p_indexOf_1_,
int p_indexOf_2_,
byte p_indexOf_3_)
Locates the first occurrence of the specified
value in this
buffer. |
java.nio.ByteBuffer |
internalNioBuffer(int p_internalNioBuffer_1_,
int p_internalNioBuffer_2_)
Internal use only: Exposes the internal NIO buffer.
|
boolean |
isDirect()
Returns
true if and only if this buffer is backed by an
NIO direct buffer. |
boolean |
isReadable()
Returns
true
if and only if (this.writerIndex - this.readerIndex) is greater
than 0. |
boolean |
isReadable(int p_isReadable_1_)
Returns
true if and only if this buffer contains equal to or more than the specified number of elements. |
boolean |
isReadOnly()
Returns
true if and only if this buffer is read-only. |
boolean |
isWritable()
Returns
true
if and only if (this.capacity - this.writerIndex) is greater
than 0. |
boolean |
isWritable(int p_isWritable_1_)
Returns
true if and only if this buffer has enough room to allow writing the specified number of
elements. |
io.netty.buffer.ByteBuf |
markReaderIndex()
Marks the current
readerIndex in this buffer. |
io.netty.buffer.ByteBuf |
markWriterIndex()
Marks the current
writerIndex in this buffer. |
int |
maxCapacity()
Returns the maximum allowed capacity of this buffer.
|
int |
maxWritableBytes()
Returns the maximum possible number of writable bytes, which is equal to
(this.maxCapacity - this.writerIndex). |
long |
memoryAddress()
Returns the low-level memory address that point to the first byte of ths backing data.
|
java.nio.ByteBuffer |
nioBuffer()
Exposes this buffer's readable bytes as an NIO
ByteBuffer. |
java.nio.ByteBuffer |
nioBuffer(int p_nioBuffer_1_,
int p_nioBuffer_2_)
Exposes this buffer's sub-region as an NIO
ByteBuffer. |
int |
nioBufferCount()
Returns the maximum number of NIO
ByteBuffers that consist this buffer. |
java.nio.ByteBuffer[] |
nioBuffers()
Exposes this buffer's readable bytes as an NIO
ByteBuffer's. |
java.nio.ByteBuffer[] |
nioBuffers(int p_nioBuffers_1_,
int p_nioBuffers_2_)
Exposes this buffer's bytes as an NIO
ByteBuffer's for the specified index and length
The returned buffer either share or contains the copied content of this buffer, while changing
the position and limit of the returned NIO buffer does not affect the indexes and marks of this buffer. |
java.nio.ByteOrder |
order()
Returns the endianness
of this buffer.
|
io.netty.buffer.ByteBuf |
order(java.nio.ByteOrder p_order_1_)
Returns a buffer with the specified
endianness which shares the whole region,
indexes, and marks of this buffer. |
int |
readableBytes()
Returns the number of readable bytes which is equal to
(this.writerIndex - this.readerIndex). |
BlockPos |
readBlockPos() |
BlockRayTraceResult |
readBlockRay() |
boolean |
readBoolean()
Gets a boolean at the current
readerIndex and increases
the readerIndex by 1 in this buffer. |
byte |
readByte()
Gets a byte at the current
readerIndex and increases
the readerIndex by 1 in this buffer. |
byte[] |
readByteArray() |
byte[] |
readByteArray(int maxLength) |
io.netty.buffer.ByteBuf |
readBytes(byte[] p_readBytes_1_)
Transfers this buffer's data to the specified destination starting at
the current
readerIndex and increases the readerIndex
by the number of the transferred bytes (= dst.length). |
io.netty.buffer.ByteBuf |
readBytes(byte[] p_readBytes_1_,
int p_readBytes_2_,
int p_readBytes_3_)
Transfers this buffer's data to the specified destination starting at
the current
readerIndex and increases the readerIndex
by the number of the transferred bytes (= length). |
io.netty.buffer.ByteBuf |
readBytes(io.netty.buffer.ByteBuf p_readBytes_1_)
Transfers this buffer's data to the specified destination starting at
the current
readerIndex until the destination becomes
non-writable, and increases the readerIndex by the number of the
transferred bytes. |
io.netty.buffer.ByteBuf |
readBytes(java.nio.ByteBuffer p_readBytes_1_)
Transfers this buffer's data to the specified destination starting at
the current
readerIndex until the destination's position
reaches its limit, and increases the readerIndex by the
number of the transferred bytes. |
io.netty.buffer.ByteBuf |
readBytes(io.netty.buffer.ByteBuf p_readBytes_1_,
int p_readBytes_2_)
Transfers this buffer's data to the specified destination starting at
the current
readerIndex and increases the readerIndex
by the number of the transferred bytes (= length). |
io.netty.buffer.ByteBuf |
readBytes(io.netty.buffer.ByteBuf p_readBytes_1_,
int p_readBytes_2_,
int p_readBytes_3_)
Transfers this buffer's data to the specified destination starting at
the current
readerIndex and increases the readerIndex
by the number of the transferred bytes (= length). |
int |
readBytes(java.nio.channels.FileChannel p_readBytes_1_,
long p_readBytes_2_,
int p_readBytes_4_)
Transfers this buffer's data starting at the current
readerIndex
to the specified channel starting at the given file position. |
int |
readBytes(java.nio.channels.GatheringByteChannel p_readBytes_1_,
int p_readBytes_2_)
Transfers this buffer's data to the specified stream starting at the
current
readerIndex. |
io.netty.buffer.ByteBuf |
readBytes(int p_readBytes_1_)
Transfers this buffer's data to a newly created buffer starting at
the current
readerIndex and increases the readerIndex
by the number of the transferred bytes (= length). |
io.netty.buffer.ByteBuf |
readBytes(java.io.OutputStream p_readBytes_1_,
int p_readBytes_2_)
Transfers this buffer's data to the specified stream starting at the
current
readerIndex. |
char |
readChar()
Gets a 2-byte UTF-16 character at the current
readerIndex
and increases the readerIndex by 2 in this buffer. |
java.lang.CharSequence |
readCharSequence(int p_readCharSequence_1_,
java.nio.charset.Charset p_readCharSequence_2_)
Gets a
CharSequence with the given length at the current readerIndex
and increases the readerIndex by the given length. |
CompoundNBT |
readCompoundTag()
Reads a compressed NBTTagCompound from this buffer
|
double |
readDouble()
Gets a 64-bit floating point number at the current
readerIndex
and increases the readerIndex by 8 in this buffer. |
<T extends java.lang.Enum<T>> |
readEnumValue(java.lang.Class<T> enumClass) |
int |
readerIndex()
Returns the
readerIndex of this buffer. |
io.netty.buffer.ByteBuf |
readerIndex(int p_readerIndex_1_)
Sets the
readerIndex of this buffer. |
float |
readFloat()
Gets a 32-bit floating point number at the current
readerIndex
and increases the readerIndex by 4 in this buffer. |
int |
readInt()
Gets a 32-bit integer at the current
readerIndex
and increases the readerIndex by 4 in this buffer. |
int |
readIntLE()
Gets a 32-bit integer at the current
readerIndex
in the Little Endian Byte Order and increases the readerIndex
by 4 in this buffer. |
ItemStack |
readItemStack()
Reads an ItemStack from this buffer
|
long |
readLong()
Gets a 64-bit integer at the current
readerIndex
and increases the readerIndex by 8 in this buffer. |
long[] |
readLongArray(long[] array)
Reads a length-prefixed array of longs from the buffer.
|
long[] |
readLongArray(long[] array,
int maxLength) |
long |
readLongLE()
Gets a 64-bit integer at the current
readerIndex
in the Little Endian Byte Order and increases the readerIndex
by 8 in this buffer. |
int |
readMedium()
Gets a 24-bit medium integer at the current
readerIndex
and increases the readerIndex by 3 in this buffer. |
int |
readMediumLE()
Gets a 24-bit medium integer at the current
readerIndex
in the Little Endian Byte Order and increases the
readerIndex by 3 in this buffer. |
ResourceLocation |
readResourceLocation() |
io.netty.buffer.ByteBuf |
readRetainedSlice(int p_readRetainedSlice_1_)
Returns a new retained slice of this buffer's sub-region starting at the current
readerIndex and increases the readerIndex by the size
of the new slice (= length). |
SectionPos |
readSectionPos() |
short |
readShort()
Gets a 16-bit short integer at the current
readerIndex
and increases the readerIndex by 2 in this buffer. |
short |
readShortLE()
Gets a 16-bit short integer at the current
readerIndex
in the Little Endian Byte Order and increases the readerIndex
by 2 in this buffer. |
io.netty.buffer.ByteBuf |
readSlice(int p_readSlice_1_)
Returns a new slice of this buffer's sub-region starting at the current
readerIndex and increases the readerIndex by the size
of the new slice (= length). |
java.lang.String |
readString() |
java.lang.String |
readString(int maxLength)
Reads a string from this buffer.
|
ITextComponent |
readTextComponent() |
java.util.Date |
readTime() |
java.util.UUID |
readUniqueId() |
short |
readUnsignedByte()
Gets an unsigned byte at the current
readerIndex and increases
the readerIndex by 1 in this buffer. |
long |
readUnsignedInt()
Gets an unsigned 32-bit integer at the current
readerIndex
and increases the readerIndex by 4 in this buffer. |
long |
readUnsignedIntLE()
Gets an unsigned 32-bit integer at the current
readerIndex
in the Little Endian Byte Order and increases the readerIndex
by 4 in this buffer. |
int |
readUnsignedMedium()
Gets an unsigned 24-bit medium integer at the current
readerIndex
and increases the readerIndex by 3 in this buffer. |
int |
readUnsignedMediumLE()
Gets an unsigned 24-bit medium integer at the current
readerIndex
in the Little Endian Byte Order and increases the readerIndex
by 3 in this buffer. |
int |
readUnsignedShort()
Gets an unsigned 16-bit short integer at the current
readerIndex
and increases the readerIndex by 2 in this buffer. |
int |
readUnsignedShortLE()
Gets an unsigned 16-bit short integer at the current
readerIndex
in the Little Endian Byte Order and increases the readerIndex
by 2 in this buffer. |
int |
readVarInt()
Reads a compressed int from the buffer.
|
int[] |
readVarIntArray() |
int[] |
readVarIntArray(int maxLength) |
long |
readVarLong() |
int |
refCnt()
Returns the reference count of this object.
|
boolean |
release()
Decreases the reference count by
1 and deallocates this object if the reference count reaches at
0. |
boolean |
release(int p_release_1_)
Decreases the reference count by the specified
decrement and deallocates this object if the reference
count reaches at 0. |
io.netty.buffer.ByteBuf |
resetReaderIndex()
Repositions the current
readerIndex to the marked
readerIndex in this buffer. |
io.netty.buffer.ByteBuf |
resetWriterIndex()
Repositions the current
writerIndex to the marked
writerIndex in this buffer. |
io.netty.buffer.ByteBuf |
retain()
Increases the reference count by
1. |
io.netty.buffer.ByteBuf |
retain(int p_retain_1_)
Increases the reference count by the specified
increment. |
io.netty.buffer.ByteBuf |
retainedDuplicate()
Returns a retained buffer which shares the whole region of this buffer.
|
io.netty.buffer.ByteBuf |
retainedSlice()
Returns a retained slice of this buffer's readable bytes.
|
io.netty.buffer.ByteBuf |
retainedSlice(int p_retainedSlice_1_,
int p_retainedSlice_2_)
Returns a retained slice of this buffer's sub-region.
|
io.netty.buffer.ByteBuf |
setBoolean(int p_setBoolean_1_,
boolean p_setBoolean_2_)
Sets the specified boolean at the specified absolute
index in this
buffer. |
io.netty.buffer.ByteBuf |
setByte(int p_setByte_1_,
int p_setByte_2_)
Sets the specified byte at the specified absolute
index in this
buffer. |
io.netty.buffer.ByteBuf |
setBytes(int p_setBytes_1_,
byte[] p_setBytes_2_)
Transfers the specified source array's data to this buffer starting at
the specified absolute
index. |
io.netty.buffer.ByteBuf |
setBytes(int p_setBytes_1_,
byte[] p_setBytes_2_,
int p_setBytes_3_,
int p_setBytes_4_)
Transfers the specified source array's data to this buffer starting at
the specified absolute
index. |
io.netty.buffer.ByteBuf |
setBytes(int p_setBytes_1_,
io.netty.buffer.ByteBuf p_setBytes_2_)
Transfers the specified source buffer's data to this buffer starting at
the specified absolute
index until the source buffer becomes
unreadable. |
io.netty.buffer.ByteBuf |
setBytes(int p_setBytes_1_,
java.nio.ByteBuffer p_setBytes_2_)
Transfers the specified source buffer's data to this buffer starting at
the specified absolute
index until the source buffer's position
reaches its limit. |
io.netty.buffer.ByteBuf |
setBytes(int p_setBytes_1_,
io.netty.buffer.ByteBuf p_setBytes_2_,
int p_setBytes_3_)
Transfers the specified source buffer's data to this buffer starting at
the specified absolute
index. |
io.netty.buffer.ByteBuf |
setBytes(int p_setBytes_1_,
io.netty.buffer.ByteBuf p_setBytes_2_,
int p_setBytes_3_,
int p_setBytes_4_)
Transfers the specified source buffer's data to this buffer starting at
the specified absolute
index. |
int |
setBytes(int p_setBytes_1_,
java.nio.channels.FileChannel p_setBytes_2_,
long p_setBytes_3_,
int p_setBytes_5_)
Transfers the content of the specified source channel starting at the given file position
to this buffer starting at the specified absolute
index. |
int |
setBytes(int p_setBytes_1_,
java.io.InputStream p_setBytes_2_,
int p_setBytes_3_)
Transfers the content of the specified source stream to this buffer
starting at the specified absolute
index. |
int |
setBytes(int p_setBytes_1_,
java.nio.channels.ScatteringByteChannel p_setBytes_2_,
int p_setBytes_3_)
Transfers the content of the specified source channel to this buffer
starting at the specified absolute
index. |
io.netty.buffer.ByteBuf |
setChar(int p_setChar_1_,
int p_setChar_2_)
Sets the specified 2-byte UTF-16 character at the specified absolute
index in this buffer. |
int |
setCharSequence(int p_setCharSequence_1_,
java.lang.CharSequence p_setCharSequence_2_,
java.nio.charset.Charset p_setCharSequence_3_)
Writes the specified
CharSequence at the current writerIndex and increases
the writerIndex by the written bytes. |
io.netty.buffer.ByteBuf |
setDouble(int p_setDouble_1_,
double p_setDouble_2_)
Sets the specified 64-bit floating-point number at the specified
absolute
index in this buffer. |
io.netty.buffer.ByteBuf |
setFloat(int p_setFloat_1_,
float p_setFloat_2_)
Sets the specified 32-bit floating-point number at the specified
absolute
index in this buffer. |
io.netty.buffer.ByteBuf |
setIndex(int p_setIndex_1_,
int p_setIndex_2_)
Sets the
readerIndex and writerIndex of this buffer
in one shot. |
io.netty.buffer.ByteBuf |
setInt(int p_setInt_1_,
int p_setInt_2_)
Sets the specified 32-bit integer at the specified absolute
index in this buffer. |
io.netty.buffer.ByteBuf |
setIntLE(int p_setIntLE_1_,
int p_setIntLE_2_)
Sets the specified 32-bit integer at the specified absolute
index in this buffer with Little Endian byte order
. |
io.netty.buffer.ByteBuf |
setLong(int p_setLong_1_,
long p_setLong_2_)
Sets the specified 64-bit long integer at the specified absolute
index in this buffer. |
io.netty.buffer.ByteBuf |
setLongLE(int p_setLongLE_1_,
long p_setLongLE_2_)
Sets the specified 64-bit long integer at the specified absolute
index in this buffer in Little Endian Byte Order. |
io.netty.buffer.ByteBuf |
setMedium(int p_setMedium_1_,
int p_setMedium_2_)
Sets the specified 24-bit medium integer at the specified absolute
index in this buffer. |
io.netty.buffer.ByteBuf |
setMediumLE(int p_setMediumLE_1_,
int p_setMediumLE_2_)
Sets the specified 24-bit medium integer at the specified absolute
index in this buffer in the Little Endian Byte Order. |
io.netty.buffer.ByteBuf |
setShort(int p_setShort_1_,
int p_setShort_2_)
Sets the specified 16-bit short integer at the specified absolute
index in this buffer. |
io.netty.buffer.ByteBuf |
setShortLE(int p_setShortLE_1_,
int p_setShortLE_2_)
Sets the specified 16-bit short integer at the specified absolute
index in this buffer with the Little Endian Byte Order. |
io.netty.buffer.ByteBuf |
setZero(int p_setZero_1_,
int p_setZero_2_)
Fills this buffer with NUL (0x00) starting at the specified
absolute
index. |
io.netty.buffer.ByteBuf |
skipBytes(int p_skipBytes_1_)
Increases the current
readerIndex by the specified
length in this buffer. |
io.netty.buffer.ByteBuf |
slice()
Returns a slice of this buffer's readable bytes.
|
io.netty.buffer.ByteBuf |
slice(int p_slice_1_,
int p_slice_2_)
Returns a slice of this buffer's sub-region.
|
java.lang.String |
toString()
Returns the string representation of this buffer.
|
java.lang.String |
toString(java.nio.charset.Charset p_toString_1_)
Decodes this buffer's readable bytes into a string with the specified
character set name.
|
java.lang.String |
toString(int p_toString_1_,
int p_toString_2_,
java.nio.charset.Charset p_toString_3_)
Decodes this buffer's sub-region into a string with the specified
character set.
|
io.netty.buffer.ByteBuf |
touch()
Records the current access location of this object for debugging purposes.
|
io.netty.buffer.ByteBuf |
touch(java.lang.Object p_touch_1_)
Records the current access location of this object with an additional arbitrary information for debugging
purposes.
|
io.netty.buffer.ByteBuf |
unwrap()
Return the underlying buffer instance if this buffer is a wrapper of another buffer.
|
int |
writableBytes()
Returns the number of writable bytes which is equal to
(this.capacity - this.writerIndex). |
PacketBuffer |
writeBlockPos(BlockPos pos) |
void |
writeBlockRay(BlockRayTraceResult resultIn) |
io.netty.buffer.ByteBuf |
writeBoolean(boolean p_writeBoolean_1_)
Sets the specified boolean at the current
writerIndex
and increases the writerIndex by 1 in this buffer. |
io.netty.buffer.ByteBuf |
writeByte(int p_writeByte_1_)
Sets the specified byte at the current
writerIndex
and increases the writerIndex by 1 in this buffer. |
PacketBuffer |
writeByteArray(byte[] array) |
io.netty.buffer.ByteBuf |
writeBytes(byte[] p_writeBytes_1_)
Transfers the specified source array's data to this buffer starting at
the current
writerIndex and increases the writerIndex
by the number of the transferred bytes (= src.length). |
io.netty.buffer.ByteBuf |
writeBytes(byte[] p_writeBytes_1_,
int p_writeBytes_2_,
int p_writeBytes_3_)
Transfers the specified source array's data to this buffer starting at
the current
writerIndex and increases the writerIndex
by the number of the transferred bytes (= length). |
io.netty.buffer.ByteBuf |
writeBytes(io.netty.buffer.ByteBuf p_writeBytes_1_)
Transfers the specified source buffer's data to this buffer starting at
the current
writerIndex until the source buffer becomes
unreadable, and increases the writerIndex by the number of
the transferred bytes. |
io.netty.buffer.ByteBuf |
writeBytes(java.nio.ByteBuffer p_writeBytes_1_)
Transfers the specified source buffer's data to this buffer starting at
the current
writerIndex until the source buffer's position
reaches its limit, and increases the writerIndex by the
number of the transferred bytes. |
io.netty.buffer.ByteBuf |
writeBytes(io.netty.buffer.ByteBuf p_writeBytes_1_,
int p_writeBytes_2_)
Transfers the specified source buffer's data to this buffer starting at
the current
writerIndex and increases the writerIndex
by the number of the transferred bytes (= length). |
io.netty.buffer.ByteBuf |
writeBytes(io.netty.buffer.ByteBuf p_writeBytes_1_,
int p_writeBytes_2_,
int p_writeBytes_3_)
Transfers the specified source buffer's data to this buffer starting at
the current
writerIndex and increases the writerIndex
by the number of the transferred bytes (= length). |
int |
writeBytes(java.nio.channels.FileChannel p_writeBytes_1_,
long p_writeBytes_2_,
int p_writeBytes_4_)
Transfers the content of the specified channel starting at the given file position
to this buffer starting at the current
writerIndex and increases the
writerIndex by the number of the transferred bytes. |
int |
writeBytes(java.io.InputStream p_writeBytes_1_,
int p_writeBytes_2_)
Transfers the content of the specified stream to this buffer
starting at the current
writerIndex and increases the
writerIndex by the number of the transferred bytes. |
int |
writeBytes(java.nio.channels.ScatteringByteChannel p_writeBytes_1_,
int p_writeBytes_2_)
Transfers the content of the specified channel to this buffer
starting at the current
writerIndex and increases the
writerIndex by the number of the transferred bytes. |
io.netty.buffer.ByteBuf |
writeChar(int p_writeChar_1_)
Sets the specified 2-byte UTF-16 character at the current
writerIndex and increases the writerIndex by 2
in this buffer. |
int |
writeCharSequence(java.lang.CharSequence p_writeCharSequence_1_,
java.nio.charset.Charset p_writeCharSequence_2_)
Writes the specified
CharSequence at the current writerIndex and increases
the writerIndex by the written bytes. |
PacketBuffer |
writeCompoundTag(CompoundNBT nbt)
Writes a compressed NBTTagCompound to this buffer
|
io.netty.buffer.ByteBuf |
writeDouble(double p_writeDouble_1_)
Sets the specified 64-bit floating point number at the current
writerIndex and increases the writerIndex by 8
in this buffer. |
PacketBuffer |
writeEnumValue(java.lang.Enum<?> value) |
io.netty.buffer.ByteBuf |
writeFloat(float p_writeFloat_1_)
Sets the specified 32-bit floating point number at the current
writerIndex and increases the writerIndex by 4
in this buffer. |
io.netty.buffer.ByteBuf |
writeInt(int p_writeInt_1_)
Sets the specified 32-bit integer at the current
writerIndex
and increases the writerIndex by 4 in this buffer. |
io.netty.buffer.ByteBuf |
writeIntLE(int p_writeIntLE_1_)
Sets the specified 32-bit integer at the current
writerIndex
in the Little Endian Byte Order and increases the writerIndex
by 4 in this buffer. |
PacketBuffer |
writeItemStack(ItemStack stack)
Writes the ItemStack's ID (short), then size (byte), then damage.
|
PacketBuffer |
writeItemStack(ItemStack stack,
boolean limitedTag)
Most ItemStack serialization is Server to Client,and doesn't need to know the FULL tag details.
|
io.netty.buffer.ByteBuf |
writeLong(long p_writeLong_1_)
Sets the specified 64-bit long integer at the current
writerIndex and increases the writerIndex by 8
in this buffer. |
PacketBuffer |
writeLongArray(long[] array)
Writes an array of longs to the buffer, prefixed by the length of the array (as a VarInt).
|
io.netty.buffer.ByteBuf |
writeLongLE(long p_writeLongLE_1_)
Sets the specified 64-bit long integer at the current
writerIndex in the Little Endian Byte Order and
increases the writerIndex by 8
in this buffer. |
io.netty.buffer.ByteBuf |
writeMedium(int p_writeMedium_1_)
Sets the specified 24-bit medium integer at the current
writerIndex and increases the writerIndex by 3
in this buffer. |
io.netty.buffer.ByteBuf |
writeMediumLE(int p_writeMediumLE_1_)
Sets the specified 24-bit medium integer at the current
writerIndex in the Little Endian Byte Order and
increases the writerIndex by 3 in this
buffer. |
PacketBuffer |
writeResourceLocation(ResourceLocation resourceLocationIn) |
int |
writerIndex()
Returns the
writerIndex of this buffer. |
io.netty.buffer.ByteBuf |
writerIndex(int p_writerIndex_1_)
Sets the
writerIndex of this buffer. |
io.netty.buffer.ByteBuf |
writeShort(int p_writeShort_1_)
Sets the specified 16-bit short integer at the current
writerIndex and increases the writerIndex by 2
in this buffer. |
io.netty.buffer.ByteBuf |
writeShortLE(int p_writeShortLE_1_)
Sets the specified 16-bit short integer in the Little Endian Byte
Order at the current
writerIndex and increases the
writerIndex by 2 in this buffer. |
PacketBuffer |
writeString(java.lang.String string) |
PacketBuffer |
writeString(java.lang.String string,
int maxLength) |
PacketBuffer |
writeTextComponent(ITextComponent component) |
PacketBuffer |
writeTime(java.util.Date time) |
PacketBuffer |
writeUniqueId(java.util.UUID uuid) |
PacketBuffer |
writeVarInt(int input)
Writes a compressed int to the buffer.
|
PacketBuffer |
writeVarIntArray(int[] array)
Writes an array of VarInts to the buffer, prefixed by the length of the array (as a VarInt).
|
PacketBuffer |
writeVarLong(long value) |
io.netty.buffer.ByteBuf |
writeZero(int p_writeZero_1_)
Fills this buffer with NUL (0x00) starting at the current
writerIndex and increases the writerIndex by the
specified length. |
getDoubleLE, getFloatLE, readDoubleLE, readFloatLE, setDoubleLE, setFloatLE, writeDoubleLE, writeFloatLEgetBuffer, readFluidStack, readRegistryId, readRegistryIdSafe, readRegistryIdUnsafe, writeFluidStack, writeRegistryId, writeRegistryIdUnsafe, writeRegistryIdUnsafepublic static int getVarIntSize(int input)
public PacketBuffer writeByteArray(byte[] array)
public byte[] readByteArray()
public byte[] readByteArray(int maxLength)
public PacketBuffer writeVarIntArray(int[] array)
public int[] readVarIntArray()
public int[] readVarIntArray(int maxLength)
public PacketBuffer writeLongArray(long[] array)
public long[] readLongArray(@Nullable
long[] array)
public long[] readLongArray(@Nullable
long[] array,
int maxLength)
public BlockPos readBlockPos()
public PacketBuffer writeBlockPos(BlockPos pos)
public SectionPos readSectionPos()
public ITextComponent readTextComponent()
public PacketBuffer writeTextComponent(ITextComponent component)
public <T extends java.lang.Enum<T>> T readEnumValue(java.lang.Class<T> enumClass)
public PacketBuffer writeEnumValue(java.lang.Enum<?> value)
public int readVarInt()
public long readVarLong()
public PacketBuffer writeUniqueId(java.util.UUID uuid)
public java.util.UUID readUniqueId()
public PacketBuffer writeVarInt(int input)
public PacketBuffer writeVarLong(long value)
public PacketBuffer writeCompoundTag(@Nullable CompoundNBT nbt)
@Nullable public CompoundNBT readCompoundTag()
public PacketBuffer writeItemStack(ItemStack stack)
public PacketBuffer writeItemStack(ItemStack stack, boolean limitedTag)
public ItemStack readItemStack()
public java.lang.String readString()
public java.lang.String readString(int maxLength)
public PacketBuffer writeString(java.lang.String string)
public PacketBuffer writeString(java.lang.String string, int maxLength)
public ResourceLocation readResourceLocation()
public PacketBuffer writeResourceLocation(ResourceLocation resourceLocationIn)
public java.util.Date readTime()
public PacketBuffer writeTime(java.util.Date time)
public BlockRayTraceResult readBlockRay()
public void writeBlockRay(BlockRayTraceResult resultIn)
public int capacity()
io.netty.buffer.ByteBufcapacity クラス内 io.netty.buffer.ByteBufpublic io.netty.buffer.ByteBuf capacity(int p_capacity_1_)
io.netty.buffer.ByteBufnewCapacity is less than the current
capacity, the content of this buffer is truncated. If the newCapacity is greater
than the current capacity, the buffer is appended with unspecified data whose length is
(newCapacity - currentCapacity).capacity クラス内 io.netty.buffer.ByteBufpublic int maxCapacity()
io.netty.buffer.ByteBufByteBuf.capacity(int) or
ByteBuf.ensureWritable(int), those methods will raise an
IllegalArgumentException.maxCapacity クラス内 io.netty.buffer.ByteBufpublic io.netty.buffer.ByteBufAllocator alloc()
io.netty.buffer.ByteBufByteBufAllocator which created this buffer.alloc クラス内 io.netty.buffer.ByteBufpublic java.nio.ByteOrder order()
io.netty.buffer.ByteBuforder クラス内 io.netty.buffer.ByteBufpublic io.netty.buffer.ByteBuf order(java.nio.ByteOrder p_order_1_)
io.netty.buffer.ByteBufendianness which shares the whole region,
indexes, and marks of this buffer. Modifying the content, the indexes, or the marks of the
returned buffer or this buffer affects each other's content, indexes, and marks. If the
specified endianness is identical to this buffer's byte order, this method can
return this. This method does not modify readerIndex or writerIndex
of this buffer.order クラス内 io.netty.buffer.ByteBufpublic io.netty.buffer.ByteBuf unwrap()
io.netty.buffer.ByteBufunwrap クラス内 io.netty.buffer.ByteBufnull if this buffer is not a wrapperpublic boolean isDirect()
io.netty.buffer.ByteBuftrue if and only if this buffer is backed by an
NIO direct buffer.isDirect クラス内 io.netty.buffer.ByteBufpublic boolean isReadOnly()
io.netty.buffer.ByteBuftrue if and only if this buffer is read-only.isReadOnly クラス内 io.netty.buffer.ByteBufpublic io.netty.buffer.ByteBuf asReadOnly()
io.netty.buffer.ByteBufasReadOnly クラス内 io.netty.buffer.ByteBufpublic int readerIndex()
io.netty.buffer.ByteBufreaderIndex of this buffer.readerIndex クラス内 io.netty.buffer.ByteBufpublic io.netty.buffer.ByteBuf readerIndex(int p_readerIndex_1_)
io.netty.buffer.ByteBufreaderIndex of this buffer.readerIndex クラス内 io.netty.buffer.ByteBufpublic int writerIndex()
io.netty.buffer.ByteBufwriterIndex of this buffer.writerIndex クラス内 io.netty.buffer.ByteBufpublic io.netty.buffer.ByteBuf writerIndex(int p_writerIndex_1_)
io.netty.buffer.ByteBufwriterIndex of this buffer.writerIndex クラス内 io.netty.buffer.ByteBufpublic io.netty.buffer.ByteBuf setIndex(int p_setIndex_1_,
int p_setIndex_2_)
io.netty.buffer.ByteBufreaderIndex and writerIndex of this buffer
in one shot. This method is useful when you have to worry about the
invocation order of ByteBuf.readerIndex(int) and ByteBuf.writerIndex(int)
methods. For example, the following code will fail:
// Create a buffer whose readerIndex, writerIndex and capacity are // 0, 0 and 8 respectively.The following code will also fail:ByteBufbuf =Unpooled.buffer(8); // IndexOutOfBoundsException is thrown because the specified // readerIndex (2) cannot be greater than the current writerIndex (0). buf.readerIndex(2); buf.writerIndex(4);
// Create a buffer whose readerIndex, writerIndex and capacity are // 0, 8 and 8 respectively.By contrast, this method guarantees that it never throws anByteBufbuf =Unpooled.wrappedBuffer(new byte[8]); // readerIndex becomes 8. buf.readLong(); // IndexOutOfBoundsException is thrown because the specified // writerIndex (4) cannot be less than the current readerIndex (8). buf.writerIndex(4); buf.readerIndex(2);
IndexOutOfBoundsException as long as the specified
indexes meet basic constraints, regardless what the current index
values of the buffer are:
// No matter what the current state of the buffer is, the following // call always succeeds as long as the capacity of the buffer is not // less than 4. buf.setIndex(2, 4);
setIndex クラス内 io.netty.buffer.ByteBufpublic int readableBytes()
io.netty.buffer.ByteBuf(this.writerIndex - this.readerIndex).readableBytes クラス内 io.netty.buffer.ByteBufpublic int writableBytes()
io.netty.buffer.ByteBuf(this.capacity - this.writerIndex).writableBytes クラス内 io.netty.buffer.ByteBufpublic int maxWritableBytes()
io.netty.buffer.ByteBuf(this.maxCapacity - this.writerIndex).maxWritableBytes クラス内 io.netty.buffer.ByteBufpublic boolean isReadable()
io.netty.buffer.ByteBuftrue
if and only if (this.writerIndex - this.readerIndex) is greater
than 0.isReadable クラス内 io.netty.buffer.ByteBufpublic boolean isReadable(int p_isReadable_1_)
io.netty.buffer.ByteBuftrue if and only if this buffer contains equal to or more than the specified number of elements.isReadable クラス内 io.netty.buffer.ByteBufpublic boolean isWritable()
io.netty.buffer.ByteBuftrue
if and only if (this.capacity - this.writerIndex) is greater
than 0.isWritable クラス内 io.netty.buffer.ByteBufpublic boolean isWritable(int p_isWritable_1_)
io.netty.buffer.ByteBuftrue if and only if this buffer has enough room to allow writing the specified number of
elements.isWritable クラス内 io.netty.buffer.ByteBufpublic io.netty.buffer.ByteBuf clear()
io.netty.buffer.ByteBufreaderIndex and writerIndex of this buffer to
0.
This method is identical to setIndex(0, 0).
Please note that the behavior of this method is different
from that of NIO buffer, which sets the limit to
the capacity of the buffer.
clear クラス内 io.netty.buffer.ByteBufpublic io.netty.buffer.ByteBuf markReaderIndex()
io.netty.buffer.ByteBufreaderIndex in this buffer. You can
reposition the current readerIndex to the marked
readerIndex by calling ByteBuf.resetReaderIndex().
The initial value of the marked readerIndex is 0.markReaderIndex クラス内 io.netty.buffer.ByteBufpublic io.netty.buffer.ByteBuf resetReaderIndex()
io.netty.buffer.ByteBufreaderIndex to the marked
readerIndex in this buffer.resetReaderIndex クラス内 io.netty.buffer.ByteBufpublic io.netty.buffer.ByteBuf markWriterIndex()
io.netty.buffer.ByteBufwriterIndex in this buffer. You can
reposition the current writerIndex to the marked
writerIndex by calling ByteBuf.resetWriterIndex().
The initial value of the marked writerIndex is 0.markWriterIndex クラス内 io.netty.buffer.ByteBufpublic io.netty.buffer.ByteBuf resetWriterIndex()
io.netty.buffer.ByteBufwriterIndex to the marked
writerIndex in this buffer.resetWriterIndex クラス内 io.netty.buffer.ByteBufpublic io.netty.buffer.ByteBuf discardReadBytes()
io.netty.buffer.ByteBufreaderIndex.
It moves the bytes between readerIndex and writerIndex
to the 0th index, and sets readerIndex and writerIndex
to 0 and oldWriterIndex - oldReaderIndex respectively.
Please refer to the class documentation for more detailed explanation.
discardReadBytes クラス内 io.netty.buffer.ByteBufpublic io.netty.buffer.ByteBuf discardSomeReadBytes()
io.netty.buffer.ByteBufByteBuf.discardReadBytes() except that this method might discard
some, all, or none of read bytes depending on its internal implementation to reduce
overall memory bandwidth consumption at the cost of potentially additional memory
consumption.discardSomeReadBytes クラス内 io.netty.buffer.ByteBufpublic io.netty.buffer.ByteBuf ensureWritable(int p_ensureWritable_1_)
io.netty.buffer.ByteBufIllegalArgumentException.ensureWritable クラス内 io.netty.buffer.ByteBufp_ensureWritable_1_ - the expected minimum number of writable bytespublic int ensureWritable(int p_ensureWritable_1_,
boolean p_ensureWritable_2_)
io.netty.buffer.ByteBufByteBuf.ensureWritable(int),
this method does not raise an exception but returns a code.ensureWritable クラス内 io.netty.buffer.ByteBufp_ensureWritable_1_ - the expected minimum number of writable bytesp_ensureWritable_2_ - When ByteBuf.writerIndex() + minWritableBytes > ByteBuf.maxCapacity():
true - the capacity of the buffer is expanded to ByteBuf.maxCapacity()false - the capacity of the buffer is unchanged0 if the buffer has enough writable bytes, and its capacity is unchanged.
1 if the buffer does not have enough bytes, and its capacity is unchanged.
2 if the buffer has enough writable bytes, and its capacity has been increased.
3 if the buffer does not have enough bytes, but its capacity has been
increased to its maximum.public boolean getBoolean(int p_getBoolean_1_)
io.netty.buffer.ByteBufreaderIndex or writerIndex
of this buffer.getBoolean クラス内 io.netty.buffer.ByteBufpublic byte getByte(int p_getByte_1_)
io.netty.buffer.ByteBufindex in this buffer.
This method does not modify readerIndex or writerIndex of
this buffer.getByte クラス内 io.netty.buffer.ByteBufpublic short getUnsignedByte(int p_getUnsignedByte_1_)
io.netty.buffer.ByteBufindex in this
buffer. This method does not modify readerIndex or
writerIndex of this buffer.getUnsignedByte クラス内 io.netty.buffer.ByteBufpublic short getShort(int p_getShort_1_)
io.netty.buffer.ByteBufindex in
this buffer. This method does not modify readerIndex or
writerIndex of this buffer.getShort クラス内 io.netty.buffer.ByteBufpublic short getShortLE(int p_getShortLE_1_)
io.netty.buffer.ByteBufindex in
this buffer in Little Endian Byte Order. This method does not modify
readerIndex or writerIndex of this buffer.getShortLE クラス内 io.netty.buffer.ByteBufpublic int getUnsignedShort(int p_getUnsignedShort_1_)
io.netty.buffer.ByteBufindex in this buffer. This method does not modify
readerIndex or writerIndex of this buffer.getUnsignedShort クラス内 io.netty.buffer.ByteBufpublic int getUnsignedShortLE(int p_getUnsignedShortLE_1_)
io.netty.buffer.ByteBufindex in this buffer in Little Endian Byte Order.
This method does not modify readerIndex or
writerIndex of this buffer.getUnsignedShortLE クラス内 io.netty.buffer.ByteBufpublic int getMedium(int p_getMedium_1_)
io.netty.buffer.ByteBufindex in
this buffer. This method does not modify readerIndex or
writerIndex of this buffer.getMedium クラス内 io.netty.buffer.ByteBufpublic int getMediumLE(int p_getMediumLE_1_)
io.netty.buffer.ByteBufindex in
this buffer in the Little Endian Byte Order. This method does not
modify readerIndex or writerIndex of this buffer.getMediumLE クラス内 io.netty.buffer.ByteBufpublic int getUnsignedMedium(int p_getUnsignedMedium_1_)
io.netty.buffer.ByteBufindex in this buffer. This method does not modify
readerIndex or writerIndex of this buffer.getUnsignedMedium クラス内 io.netty.buffer.ByteBufpublic int getUnsignedMediumLE(int p_getUnsignedMediumLE_1_)
io.netty.buffer.ByteBufindex in this buffer in Little Endian Byte Order.
This method does not modify readerIndex or
writerIndex of this buffer.getUnsignedMediumLE クラス内 io.netty.buffer.ByteBufpublic int getInt(int p_getInt_1_)
io.netty.buffer.ByteBufindex in
this buffer. This method does not modify readerIndex or
writerIndex of this buffer.getInt クラス内 io.netty.buffer.ByteBufpublic int getIntLE(int p_getIntLE_1_)
io.netty.buffer.ByteBufindex in
this buffer with Little Endian Byte Order. This method does not
modify readerIndex or writerIndex of this buffer.getIntLE クラス内 io.netty.buffer.ByteBufpublic long getUnsignedInt(int p_getUnsignedInt_1_)
io.netty.buffer.ByteBufindex
in this buffer. This method does not modify readerIndex or
writerIndex of this buffer.getUnsignedInt クラス内 io.netty.buffer.ByteBufpublic long getUnsignedIntLE(int p_getUnsignedIntLE_1_)
io.netty.buffer.ByteBufindex
in this buffer in Little Endian Byte Order. This method does not
modify readerIndex or writerIndex of this buffer.getUnsignedIntLE クラス内 io.netty.buffer.ByteBufpublic long getLong(int p_getLong_1_)
io.netty.buffer.ByteBufindex in
this buffer. This method does not modify readerIndex or
writerIndex of this buffer.getLong クラス内 io.netty.buffer.ByteBufpublic long getLongLE(int p_getLongLE_1_)
io.netty.buffer.ByteBufindex in
this buffer in Little Endian Byte Order. This method does not
modify readerIndex or writerIndex of this buffer.getLongLE クラス内 io.netty.buffer.ByteBufpublic char getChar(int p_getChar_1_)
io.netty.buffer.ByteBufindex in this buffer. This method does not modify
readerIndex or writerIndex of this buffer.getChar クラス内 io.netty.buffer.ByteBufpublic float getFloat(int p_getFloat_1_)
io.netty.buffer.ByteBufindex in this buffer. This method does not modify
readerIndex or writerIndex of this buffer.getFloat クラス内 io.netty.buffer.ByteBufpublic double getDouble(int p_getDouble_1_)
io.netty.buffer.ByteBufindex in this buffer. This method does not modify
readerIndex or writerIndex of this buffer.getDouble クラス内 io.netty.buffer.ByteBufpublic io.netty.buffer.ByteBuf getBytes(int p_getBytes_1_,
io.netty.buffer.ByteBuf p_getBytes_2_)
io.netty.buffer.ByteBufindex until the destination becomes
non-writable. This method is basically same with
ByteBuf.getBytes(int, ByteBuf, int, int), except that this
method increases the writerIndex of the destination by the
number of the transferred bytes while
ByteBuf.getBytes(int, ByteBuf, int, int) does not.
This method does not modify readerIndex or writerIndex of
the source buffer (i.e. this).getBytes クラス内 io.netty.buffer.ByteBufpublic io.netty.buffer.ByteBuf getBytes(int p_getBytes_1_,
io.netty.buffer.ByteBuf p_getBytes_2_,
int p_getBytes_3_)
io.netty.buffer.ByteBufindex. This method is basically same
with ByteBuf.getBytes(int, ByteBuf, int, int), except that this
method increases the writerIndex of the destination by the
number of the transferred bytes while
ByteBuf.getBytes(int, ByteBuf, int, int) does not.
This method does not modify readerIndex or writerIndex of
the source buffer (i.e. this).getBytes クラス内 io.netty.buffer.ByteBufp_getBytes_3_ - the number of bytes to transferpublic io.netty.buffer.ByteBuf getBytes(int p_getBytes_1_,
io.netty.buffer.ByteBuf p_getBytes_2_,
int p_getBytes_3_,
int p_getBytes_4_)
io.netty.buffer.ByteBufindex.
This method does not modify readerIndex or writerIndex
of both the source (i.e. this) and the destination.getBytes クラス内 io.netty.buffer.ByteBufp_getBytes_3_ - the first index of the destinationp_getBytes_4_ - the number of bytes to transferpublic io.netty.buffer.ByteBuf getBytes(int p_getBytes_1_,
byte[] p_getBytes_2_)
io.netty.buffer.ByteBufindex.
This method does not modify readerIndex or writerIndex of
this buffergetBytes クラス内 io.netty.buffer.ByteBufpublic io.netty.buffer.ByteBuf getBytes(int p_getBytes_1_,
byte[] p_getBytes_2_,
int p_getBytes_3_,
int p_getBytes_4_)
io.netty.buffer.ByteBufindex.
This method does not modify readerIndex or writerIndex
of this buffer.getBytes クラス内 io.netty.buffer.ByteBufp_getBytes_3_ - the first index of the destinationp_getBytes_4_ - the number of bytes to transferpublic io.netty.buffer.ByteBuf getBytes(int p_getBytes_1_,
java.nio.ByteBuffer p_getBytes_2_)
io.netty.buffer.ByteBufindex until the destination's position
reaches its limit.
This method does not modify readerIndex or writerIndex of
this buffer while the destination's position will be increased.getBytes クラス内 io.netty.buffer.ByteBufpublic io.netty.buffer.ByteBuf getBytes(int p_getBytes_1_,
java.io.OutputStream p_getBytes_2_,
int p_getBytes_3_)
throws java.io.IOException
io.netty.buffer.ByteBufindex.
This method does not modify readerIndex or writerIndex of
this buffer.getBytes クラス内 io.netty.buffer.ByteBufp_getBytes_3_ - the number of bytes to transferjava.io.IOException - if the specified stream threw an exception during I/Opublic int getBytes(int p_getBytes_1_,
java.nio.channels.GatheringByteChannel p_getBytes_2_,
int p_getBytes_3_)
throws java.io.IOException
io.netty.buffer.ByteBufindex.
This method does not modify readerIndex or writerIndex of
this buffer.getBytes クラス内 io.netty.buffer.ByteBufp_getBytes_3_ - the maximum number of bytes to transferjava.io.IOException - if the specified channel threw an exception during I/Opublic int getBytes(int p_getBytes_1_,
java.nio.channels.FileChannel p_getBytes_2_,
long p_getBytes_3_,
int p_getBytes_5_)
throws java.io.IOException
io.netty.buffer.ByteBufindex
to the specified channel starting at the given file position.
This method does not modify readerIndex or writerIndex of
this buffer. This method does not modify the channel's position.getBytes クラス内 io.netty.buffer.ByteBufp_getBytes_3_ - the file position at which the transfer is to beginp_getBytes_5_ - the maximum number of bytes to transferjava.io.IOException - if the specified channel threw an exception during I/Opublic java.lang.CharSequence getCharSequence(int p_getCharSequence_1_,
int p_getCharSequence_2_,
java.nio.charset.Charset p_getCharSequence_3_)
io.netty.buffer.ByteBufCharSequence with the given length at the given index.getCharSequence クラス内 io.netty.buffer.ByteBufp_getCharSequence_2_ - the length to readp_getCharSequence_3_ - that should be usedpublic io.netty.buffer.ByteBuf setBoolean(int p_setBoolean_1_,
boolean p_setBoolean_2_)
io.netty.buffer.ByteBufindex in this
buffer.
This method does not modify readerIndex or writerIndex of
this buffer.setBoolean クラス内 io.netty.buffer.ByteBufpublic io.netty.buffer.ByteBuf setByte(int p_setByte_1_,
int p_setByte_2_)
io.netty.buffer.ByteBufindex in this
buffer. The 24 high-order bits of the specified value are ignored.
This method does not modify readerIndex or writerIndex of
this buffer.setByte クラス内 io.netty.buffer.ByteBufpublic io.netty.buffer.ByteBuf setShort(int p_setShort_1_,
int p_setShort_2_)
io.netty.buffer.ByteBufindex 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.setShort クラス内 io.netty.buffer.ByteBufpublic io.netty.buffer.ByteBuf setShortLE(int p_setShortLE_1_,
int p_setShortLE_2_)
io.netty.buffer.ByteBufindex in this buffer with the Little Endian Byte Order.
The 16 high-order bits of the specified value are ignored.
This method does not modify readerIndex or writerIndex of
this buffer.setShortLE クラス内 io.netty.buffer.ByteBufpublic io.netty.buffer.ByteBuf setMedium(int p_setMedium_1_,
int p_setMedium_2_)
io.netty.buffer.ByteBufindex in this buffer. Please note that the most significant
byte is ignored in the specified value.
This method does not modify readerIndex or writerIndex of
this buffer.setMedium クラス内 io.netty.buffer.ByteBufpublic io.netty.buffer.ByteBuf setMediumLE(int p_setMediumLE_1_,
int p_setMediumLE_2_)
io.netty.buffer.ByteBufindex in this buffer in the Little Endian Byte Order.
Please note that the most significant byte is ignored in the
specified value.
This method does not modify readerIndex or writerIndex of
this buffer.setMediumLE クラス内 io.netty.buffer.ByteBufpublic io.netty.buffer.ByteBuf setInt(int p_setInt_1_,
int p_setInt_2_)
io.netty.buffer.ByteBufindex in this buffer.
This method does not modify readerIndex or writerIndex of
this buffer.setInt クラス内 io.netty.buffer.ByteBufpublic io.netty.buffer.ByteBuf setIntLE(int p_setIntLE_1_,
int p_setIntLE_2_)
io.netty.buffer.ByteBufindex in this buffer with Little Endian byte order
.
This method does not modify readerIndex or writerIndex of
this buffer.setIntLE クラス内 io.netty.buffer.ByteBufpublic io.netty.buffer.ByteBuf setLong(int p_setLong_1_,
long p_setLong_2_)
io.netty.buffer.ByteBufindex in this buffer.
This method does not modify readerIndex or writerIndex of
this buffer.setLong クラス内 io.netty.buffer.ByteBufpublic io.netty.buffer.ByteBuf setLongLE(int p_setLongLE_1_,
long p_setLongLE_2_)
io.netty.buffer.ByteBufindex in this buffer in Little Endian Byte Order.
This method does not modify readerIndex or writerIndex of
this buffer.setLongLE クラス内 io.netty.buffer.ByteBufpublic io.netty.buffer.ByteBuf setChar(int p_setChar_1_,
int p_setChar_2_)
io.netty.buffer.ByteBufindex 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.setChar クラス内 io.netty.buffer.ByteBufpublic io.netty.buffer.ByteBuf setFloat(int p_setFloat_1_,
float p_setFloat_2_)
io.netty.buffer.ByteBufindex in this buffer.
This method does not modify readerIndex or writerIndex of
this buffer.setFloat クラス内 io.netty.buffer.ByteBufpublic io.netty.buffer.ByteBuf setDouble(int p_setDouble_1_,
double p_setDouble_2_)
io.netty.buffer.ByteBufindex in this buffer.
This method does not modify readerIndex or writerIndex of
this buffer.setDouble クラス内 io.netty.buffer.ByteBufpublic io.netty.buffer.ByteBuf setBytes(int p_setBytes_1_,
io.netty.buffer.ByteBuf p_setBytes_2_)
io.netty.buffer.ByteBufindex until the source buffer becomes
unreadable. This method is basically same with
ByteBuf.setBytes(int, ByteBuf, int, int), except that this
method increases the readerIndex of the source buffer by
the number of the transferred bytes while
ByteBuf.setBytes(int, ByteBuf, int, int) does not.
This method does not modify readerIndex or writerIndex of
the source buffer (i.e. this).setBytes クラス内 io.netty.buffer.ByteBufpublic io.netty.buffer.ByteBuf setBytes(int p_setBytes_1_,
io.netty.buffer.ByteBuf p_setBytes_2_,
int p_setBytes_3_)
io.netty.buffer.ByteBufindex. This method is basically same
with ByteBuf.setBytes(int, ByteBuf, int, int), except that this
method increases the readerIndex of the source buffer by
the number of the transferred bytes while
ByteBuf.setBytes(int, ByteBuf, int, int) does not.
This method does not modify readerIndex or writerIndex of
the source buffer (i.e. this).setBytes クラス内 io.netty.buffer.ByteBufp_setBytes_3_ - the number of bytes to transferpublic io.netty.buffer.ByteBuf setBytes(int p_setBytes_1_,
io.netty.buffer.ByteBuf p_setBytes_2_,
int p_setBytes_3_,
int p_setBytes_4_)
io.netty.buffer.ByteBufindex.
This method does not modify readerIndex or writerIndex
of both the source (i.e. this) and the destination.setBytes クラス内 io.netty.buffer.ByteBufp_setBytes_3_ - the first index of the sourcep_setBytes_4_ - the number of bytes to transferpublic io.netty.buffer.ByteBuf setBytes(int p_setBytes_1_,
byte[] p_setBytes_2_)
io.netty.buffer.ByteBufindex.
This method does not modify readerIndex or writerIndex of
this buffer.setBytes クラス内 io.netty.buffer.ByteBufpublic io.netty.buffer.ByteBuf setBytes(int p_setBytes_1_,
byte[] p_setBytes_2_,
int p_setBytes_3_,
int p_setBytes_4_)
io.netty.buffer.ByteBufindex.
This method does not modify readerIndex or writerIndex of
this buffer.setBytes クラス内 io.netty.buffer.ByteBufpublic io.netty.buffer.ByteBuf setBytes(int p_setBytes_1_,
java.nio.ByteBuffer p_setBytes_2_)
io.netty.buffer.ByteBufindex until the source buffer's position
reaches its limit.
This method does not modify readerIndex or writerIndex of
this buffer.setBytes クラス内 io.netty.buffer.ByteBufpublic int setBytes(int p_setBytes_1_,
java.io.InputStream p_setBytes_2_,
int p_setBytes_3_)
throws java.io.IOException
io.netty.buffer.ByteBufindex.
This method does not modify readerIndex or writerIndex of
this buffer.setBytes クラス内 io.netty.buffer.ByteBufp_setBytes_3_ - the number of bytes to transfer-1 if the specified channel is closed.java.io.IOException - if the specified stream threw an exception during I/Opublic int setBytes(int p_setBytes_1_,
java.nio.channels.ScatteringByteChannel p_setBytes_2_,
int p_setBytes_3_)
throws java.io.IOException
io.netty.buffer.ByteBufindex.
This method does not modify readerIndex or writerIndex of
this buffer.setBytes クラス内 io.netty.buffer.ByteBufp_setBytes_3_ - the maximum number of bytes to transfer-1 if the specified channel is closed.java.io.IOException - if the specified channel threw an exception during I/Opublic int setBytes(int p_setBytes_1_,
java.nio.channels.FileChannel p_setBytes_2_,
long p_setBytes_3_,
int p_setBytes_5_)
throws java.io.IOException
io.netty.buffer.ByteBufindex.
This method does not modify readerIndex or writerIndex of
this buffer. This method does not modify the channel's position.setBytes クラス内 io.netty.buffer.ByteBufp_setBytes_3_ - the file position at which the transfer is to beginp_setBytes_5_ - the maximum number of bytes to transfer-1 if the specified channel is closed.java.io.IOException - if the specified channel threw an exception during I/Opublic io.netty.buffer.ByteBuf setZero(int p_setZero_1_,
int p_setZero_2_)
io.netty.buffer.ByteBufindex.
This method does not modify readerIndex or writerIndex of
this buffer.setZero クラス内 io.netty.buffer.ByteBufp_setZero_2_ - the number of NULs to write to the bufferpublic int setCharSequence(int p_setCharSequence_1_,
java.lang.CharSequence p_setCharSequence_2_,
java.nio.charset.Charset p_setCharSequence_3_)
io.netty.buffer.ByteBufCharSequence at the current writerIndex and increases
the writerIndex by the written bytes.setCharSequence クラス内 io.netty.buffer.ByteBufp_setCharSequence_1_ - on which the sequence should be writtenp_setCharSequence_2_ - to writep_setCharSequence_3_ - that should be used.public boolean readBoolean()
io.netty.buffer.ByteBufreaderIndex and increases
the readerIndex by 1 in this buffer.readBoolean クラス内 io.netty.buffer.ByteBufpublic byte readByte()
io.netty.buffer.ByteBufreaderIndex and increases
the readerIndex by 1 in this buffer.readByte クラス内 io.netty.buffer.ByteBufpublic short readUnsignedByte()
io.netty.buffer.ByteBufreaderIndex and increases
the readerIndex by 1 in this buffer.readUnsignedByte クラス内 io.netty.buffer.ByteBufpublic short readShort()
io.netty.buffer.ByteBufreaderIndex
and increases the readerIndex by 2 in this buffer.readShort クラス内 io.netty.buffer.ByteBufpublic short readShortLE()
io.netty.buffer.ByteBufreaderIndex
in the Little Endian Byte Order and increases the readerIndex
by 2 in this buffer.readShortLE クラス内 io.netty.buffer.ByteBufpublic int readUnsignedShort()
io.netty.buffer.ByteBufreaderIndex
and increases the readerIndex by 2 in this buffer.readUnsignedShort クラス内 io.netty.buffer.ByteBufpublic int readUnsignedShortLE()
io.netty.buffer.ByteBufreaderIndex
in the Little Endian Byte Order and increases the readerIndex
by 2 in this buffer.readUnsignedShortLE クラス内 io.netty.buffer.ByteBufpublic int readMedium()
io.netty.buffer.ByteBufreaderIndex
and increases the readerIndex by 3 in this buffer.readMedium クラス内 io.netty.buffer.ByteBufpublic int readMediumLE()
io.netty.buffer.ByteBufreaderIndex
in the Little Endian Byte Order and increases the
readerIndex by 3 in this buffer.readMediumLE クラス内 io.netty.buffer.ByteBufpublic int readUnsignedMedium()
io.netty.buffer.ByteBufreaderIndex
and increases the readerIndex by 3 in this buffer.readUnsignedMedium クラス内 io.netty.buffer.ByteBufpublic int readUnsignedMediumLE()
io.netty.buffer.ByteBufreaderIndex
in the Little Endian Byte Order and increases the readerIndex
by 3 in this buffer.readUnsignedMediumLE クラス内 io.netty.buffer.ByteBufpublic int readInt()
io.netty.buffer.ByteBufreaderIndex
and increases the readerIndex by 4 in this buffer.readInt クラス内 io.netty.buffer.ByteBufpublic int readIntLE()
io.netty.buffer.ByteBufreaderIndex
in the Little Endian Byte Order and increases the readerIndex
by 4 in this buffer.readIntLE クラス内 io.netty.buffer.ByteBufpublic long readUnsignedInt()
io.netty.buffer.ByteBufreaderIndex
and increases the readerIndex by 4 in this buffer.readUnsignedInt クラス内 io.netty.buffer.ByteBufpublic long readUnsignedIntLE()
io.netty.buffer.ByteBufreaderIndex
in the Little Endian Byte Order and increases the readerIndex
by 4 in this buffer.readUnsignedIntLE クラス内 io.netty.buffer.ByteBufpublic long readLong()
io.netty.buffer.ByteBufreaderIndex
and increases the readerIndex by 8 in this buffer.readLong クラス内 io.netty.buffer.ByteBufpublic long readLongLE()
io.netty.buffer.ByteBufreaderIndex
in the Little Endian Byte Order and increases the readerIndex
by 8 in this buffer.readLongLE クラス内 io.netty.buffer.ByteBufpublic char readChar()
io.netty.buffer.ByteBufreaderIndex
and increases the readerIndex by 2 in this buffer.readChar クラス内 io.netty.buffer.ByteBufpublic float readFloat()
io.netty.buffer.ByteBufreaderIndex
and increases the readerIndex by 4 in this buffer.readFloat クラス内 io.netty.buffer.ByteBufpublic double readDouble()
io.netty.buffer.ByteBufreaderIndex
and increases the readerIndex by 8 in this buffer.readDouble クラス内 io.netty.buffer.ByteBufpublic io.netty.buffer.ByteBuf readBytes(int p_readBytes_1_)
io.netty.buffer.ByteBufreaderIndex and increases the readerIndex
by the number of the transferred bytes (= length).
The returned buffer's readerIndex and writerIndex are
0 and length respectively.readBytes クラス内 io.netty.buffer.ByteBufp_readBytes_1_ - the number of bytes to transferpublic io.netty.buffer.ByteBuf readSlice(int p_readSlice_1_)
io.netty.buffer.ByteBufreaderIndex and increases the readerIndex by the size
of the new slice (= length).
Also be aware that this method will NOT call ByteBuf.retain() and so the
reference count will NOT be increased.
readSlice クラス内 io.netty.buffer.ByteBufp_readSlice_1_ - the size of the new slicepublic io.netty.buffer.ByteBuf readRetainedSlice(int p_readRetainedSlice_1_)
io.netty.buffer.ByteBufreaderIndex and increases the readerIndex by the size
of the new slice (= length).
Note that this method returns a retained buffer unlike ByteBuf.readSlice(int).
This method behaves similarly to readSlice(...).retain() except that this method may return
a buffer implementation that produces less garbage.
readRetainedSlice クラス内 io.netty.buffer.ByteBufp_readRetainedSlice_1_ - the size of the new slicepublic io.netty.buffer.ByteBuf readBytes(io.netty.buffer.ByteBuf p_readBytes_1_)
io.netty.buffer.ByteBufreaderIndex until the destination becomes
non-writable, and increases the readerIndex by the number of the
transferred bytes. This method is basically same with
ByteBuf.readBytes(ByteBuf, int, int), except that this method
increases the writerIndex of the destination by the number of
the transferred bytes while ByteBuf.readBytes(ByteBuf, int, int)
does not.readBytes クラス内 io.netty.buffer.ByteBufpublic io.netty.buffer.ByteBuf readBytes(io.netty.buffer.ByteBuf p_readBytes_1_,
int p_readBytes_2_)
io.netty.buffer.ByteBufreaderIndex and increases the readerIndex
by the number of the transferred bytes (= length). This method
is basically same with ByteBuf.readBytes(ByteBuf, int, int),
except that this method increases the writerIndex of the
destination by the number of the transferred bytes (= length)
while ByteBuf.readBytes(ByteBuf, int, int) does not.readBytes クラス内 io.netty.buffer.ByteBufpublic io.netty.buffer.ByteBuf readBytes(io.netty.buffer.ByteBuf p_readBytes_1_,
int p_readBytes_2_,
int p_readBytes_3_)
io.netty.buffer.ByteBufreaderIndex and increases the readerIndex
by the number of the transferred bytes (= length).readBytes クラス内 io.netty.buffer.ByteBufp_readBytes_2_ - the first index of the destinationp_readBytes_3_ - the number of bytes to transferpublic io.netty.buffer.ByteBuf readBytes(byte[] p_readBytes_1_)
io.netty.buffer.ByteBufreaderIndex and increases the readerIndex
by the number of the transferred bytes (= dst.length).readBytes クラス内 io.netty.buffer.ByteBufpublic io.netty.buffer.ByteBuf readBytes(byte[] p_readBytes_1_,
int p_readBytes_2_,
int p_readBytes_3_)
io.netty.buffer.ByteBufreaderIndex and increases the readerIndex
by the number of the transferred bytes (= length).readBytes クラス内 io.netty.buffer.ByteBufp_readBytes_2_ - the first index of the destinationp_readBytes_3_ - the number of bytes to transferpublic io.netty.buffer.ByteBuf readBytes(java.nio.ByteBuffer p_readBytes_1_)
io.netty.buffer.ByteBufreaderIndex until the destination's position
reaches its limit, and increases the readerIndex by the
number of the transferred bytes.readBytes クラス内 io.netty.buffer.ByteBufpublic io.netty.buffer.ByteBuf readBytes(java.io.OutputStream p_readBytes_1_,
int p_readBytes_2_)
throws java.io.IOException
io.netty.buffer.ByteBufreaderIndex.readBytes クラス内 io.netty.buffer.ByteBufp_readBytes_2_ - the number of bytes to transferjava.io.IOException - if the specified stream threw an exception during I/Opublic int readBytes(java.nio.channels.GatheringByteChannel p_readBytes_1_,
int p_readBytes_2_)
throws java.io.IOException
io.netty.buffer.ByteBufreaderIndex.readBytes クラス内 io.netty.buffer.ByteBufp_readBytes_2_ - the maximum number of bytes to transferjava.io.IOException - if the specified channel threw an exception during I/Opublic java.lang.CharSequence readCharSequence(int p_readCharSequence_1_,
java.nio.charset.Charset p_readCharSequence_2_)
io.netty.buffer.ByteBufCharSequence with the given length at the current readerIndex
and increases the readerIndex by the given length.readCharSequence クラス内 io.netty.buffer.ByteBufp_readCharSequence_1_ - the length to readp_readCharSequence_2_ - that should be usedpublic int readBytes(java.nio.channels.FileChannel p_readBytes_1_,
long p_readBytes_2_,
int p_readBytes_4_)
throws java.io.IOException
io.netty.buffer.ByteBufreaderIndex
to the specified channel starting at the given file position.
This method does not modify the channel's position.readBytes クラス内 io.netty.buffer.ByteBufp_readBytes_2_ - the file position at which the transfer is to beginp_readBytes_4_ - the maximum number of bytes to transferjava.io.IOException - if the specified channel threw an exception during I/Opublic io.netty.buffer.ByteBuf skipBytes(int p_skipBytes_1_)
io.netty.buffer.ByteBufreaderIndex by the specified
length in this buffer.skipBytes クラス内 io.netty.buffer.ByteBufpublic io.netty.buffer.ByteBuf writeBoolean(boolean p_writeBoolean_1_)
io.netty.buffer.ByteBufwriterIndex
and increases the writerIndex by 1 in this buffer.writeBoolean クラス内 io.netty.buffer.ByteBufpublic io.netty.buffer.ByteBuf writeByte(int p_writeByte_1_)
io.netty.buffer.ByteBufwriterIndex
and increases the writerIndex by 1 in this buffer.
The 24 high-order bits of the specified value are ignored.writeByte クラス内 io.netty.buffer.ByteBufpublic io.netty.buffer.ByteBuf writeShort(int p_writeShort_1_)
io.netty.buffer.ByteBufwriterIndex and increases the writerIndex by 2
in this buffer. The 16 high-order bits of the specified value are ignored.writeShort クラス内 io.netty.buffer.ByteBufpublic io.netty.buffer.ByteBuf writeShortLE(int p_writeShortLE_1_)
io.netty.buffer.ByteBufwriterIndex and increases the
writerIndex by 2 in this buffer.
The 16 high-order bits of the specified value are ignored.writeShortLE クラス内 io.netty.buffer.ByteBufpublic io.netty.buffer.ByteBuf writeMedium(int p_writeMedium_1_)
io.netty.buffer.ByteBufwriterIndex and increases the writerIndex by 3
in this buffer.writeMedium クラス内 io.netty.buffer.ByteBufpublic io.netty.buffer.ByteBuf writeMediumLE(int p_writeMediumLE_1_)
io.netty.buffer.ByteBufwriterIndex in the Little Endian Byte Order and
increases the writerIndex by 3 in this
buffer.writeMediumLE クラス内 io.netty.buffer.ByteBufpublic io.netty.buffer.ByteBuf writeInt(int p_writeInt_1_)
io.netty.buffer.ByteBufwriterIndex
and increases the writerIndex by 4 in this buffer.writeInt クラス内 io.netty.buffer.ByteBufpublic io.netty.buffer.ByteBuf writeIntLE(int p_writeIntLE_1_)
io.netty.buffer.ByteBufwriterIndex
in the Little Endian Byte Order and increases the writerIndex
by 4 in this buffer.writeIntLE クラス内 io.netty.buffer.ByteBufpublic io.netty.buffer.ByteBuf writeLong(long p_writeLong_1_)
io.netty.buffer.ByteBufwriterIndex and increases the writerIndex by 8
in this buffer.writeLong クラス内 io.netty.buffer.ByteBufpublic io.netty.buffer.ByteBuf writeLongLE(long p_writeLongLE_1_)
io.netty.buffer.ByteBufwriterIndex in the Little Endian Byte Order and
increases the writerIndex by 8
in this buffer.writeLongLE クラス内 io.netty.buffer.ByteBufpublic io.netty.buffer.ByteBuf writeChar(int p_writeChar_1_)
io.netty.buffer.ByteBufwriterIndex and increases the writerIndex by 2
in this buffer. The 16 high-order bits of the specified value are ignored.writeChar クラス内 io.netty.buffer.ByteBufpublic io.netty.buffer.ByteBuf writeFloat(float p_writeFloat_1_)
io.netty.buffer.ByteBufwriterIndex and increases the writerIndex by 4
in this buffer.writeFloat クラス内 io.netty.buffer.ByteBufpublic io.netty.buffer.ByteBuf writeDouble(double p_writeDouble_1_)
io.netty.buffer.ByteBufwriterIndex and increases the writerIndex by 8
in this buffer.writeDouble クラス内 io.netty.buffer.ByteBufpublic io.netty.buffer.ByteBuf writeBytes(io.netty.buffer.ByteBuf p_writeBytes_1_)
io.netty.buffer.ByteBufwriterIndex until the source buffer becomes
unreadable, and increases the writerIndex by the number of
the transferred bytes. This method is basically same with
ByteBuf.writeBytes(ByteBuf, int, int), except that this method
increases the readerIndex of the source buffer by the number of
the transferred bytes while ByteBuf.writeBytes(ByteBuf, int, int)
does not.writeBytes クラス内 io.netty.buffer.ByteBufpublic io.netty.buffer.ByteBuf writeBytes(io.netty.buffer.ByteBuf p_writeBytes_1_,
int p_writeBytes_2_)
io.netty.buffer.ByteBufwriterIndex and increases the writerIndex
by the number of the transferred bytes (= length). This method
is basically same with ByteBuf.writeBytes(ByteBuf, int, int),
except that this method increases the readerIndex of the source
buffer by the number of the transferred bytes (= length) while
ByteBuf.writeBytes(ByteBuf, int, int) does not.writeBytes クラス内 io.netty.buffer.ByteBufp_writeBytes_2_ - the number of bytes to transferpublic io.netty.buffer.ByteBuf writeBytes(io.netty.buffer.ByteBuf p_writeBytes_1_,
int p_writeBytes_2_,
int p_writeBytes_3_)
io.netty.buffer.ByteBufwriterIndex and increases the writerIndex
by the number of the transferred bytes (= length).writeBytes クラス内 io.netty.buffer.ByteBufp_writeBytes_2_ - the first index of the sourcep_writeBytes_3_ - the number of bytes to transferpublic io.netty.buffer.ByteBuf writeBytes(byte[] p_writeBytes_1_)
io.netty.buffer.ByteBufwriterIndex and increases the writerIndex
by the number of the transferred bytes (= src.length).writeBytes クラス内 io.netty.buffer.ByteBufpublic io.netty.buffer.ByteBuf writeBytes(byte[] p_writeBytes_1_,
int p_writeBytes_2_,
int p_writeBytes_3_)
io.netty.buffer.ByteBufwriterIndex and increases the writerIndex
by the number of the transferred bytes (= length).writeBytes クラス内 io.netty.buffer.ByteBufp_writeBytes_2_ - the first index of the sourcep_writeBytes_3_ - the number of bytes to transferpublic io.netty.buffer.ByteBuf writeBytes(java.nio.ByteBuffer p_writeBytes_1_)
io.netty.buffer.ByteBufwriterIndex until the source buffer's position
reaches its limit, and increases the writerIndex by the
number of the transferred bytes.writeBytes クラス内 io.netty.buffer.ByteBufpublic int writeBytes(java.io.InputStream p_writeBytes_1_,
int p_writeBytes_2_)
throws java.io.IOException
io.netty.buffer.ByteBufwriterIndex and increases the
writerIndex by the number of the transferred bytes.writeBytes クラス内 io.netty.buffer.ByteBufp_writeBytes_2_ - the number of bytes to transferjava.io.IOException - if the specified stream threw an exception during I/Opublic int writeBytes(java.nio.channels.ScatteringByteChannel p_writeBytes_1_,
int p_writeBytes_2_)
throws java.io.IOException
io.netty.buffer.ByteBufwriterIndex and increases the
writerIndex by the number of the transferred bytes.writeBytes クラス内 io.netty.buffer.ByteBufp_writeBytes_2_ - the maximum number of bytes to transferjava.io.IOException - if the specified channel threw an exception during I/Opublic int writeBytes(java.nio.channels.FileChannel p_writeBytes_1_,
long p_writeBytes_2_,
int p_writeBytes_4_)
throws java.io.IOException
io.netty.buffer.ByteBufwriterIndex and increases the
writerIndex by the number of the transferred bytes.
This method does not modify the channel's position.writeBytes クラス内 io.netty.buffer.ByteBufp_writeBytes_2_ - the file position at which the transfer is to beginp_writeBytes_4_ - the maximum number of bytes to transferjava.io.IOException - if the specified channel threw an exception during I/Opublic io.netty.buffer.ByteBuf writeZero(int p_writeZero_1_)
io.netty.buffer.ByteBufwriterIndex and increases the writerIndex by the
specified length.writeZero クラス内 io.netty.buffer.ByteBufp_writeZero_1_ - the number of NULs to write to the bufferpublic int writeCharSequence(java.lang.CharSequence p_writeCharSequence_1_,
java.nio.charset.Charset p_writeCharSequence_2_)
io.netty.buffer.ByteBufCharSequence at the current writerIndex and increases
the writerIndex by the written bytes.
in this buffer.writeCharSequence クラス内 io.netty.buffer.ByteBufp_writeCharSequence_1_ - to writep_writeCharSequence_2_ - that should be usedpublic int indexOf(int p_indexOf_1_,
int p_indexOf_2_,
byte p_indexOf_3_)
io.netty.buffer.ByteBufvalue in this
buffer. The search takes place from the specified fromIndex
(inclusive) to the specified toIndex (exclusive).
If fromIndex is greater than toIndex, the search is
performed in a reversed order.
This method does not modify readerIndex or writerIndex of
this buffer.
indexOf クラス内 io.netty.buffer.ByteBuf-1 otherwise.public int bytesBefore(byte p_bytesBefore_1_)
io.netty.buffer.ByteBufvalue in this
buffer. The search takes place from the current readerIndex
(inclusive) to the current writerIndex (exclusive).
This method does not modify readerIndex or writerIndex of
this buffer.
bytesBefore クラス内 io.netty.buffer.ByteBufreaderIndex
and the first occurrence if found. -1 otherwise.public int bytesBefore(int p_bytesBefore_1_,
byte p_bytesBefore_2_)
io.netty.buffer.ByteBufvalue in this
buffer. The search starts from the current readerIndex
(inclusive) and lasts for the specified length.
This method does not modify readerIndex or writerIndex of
this buffer.
bytesBefore クラス内 io.netty.buffer.ByteBufreaderIndex
and the first occurrence if found. -1 otherwise.public int bytesBefore(int p_bytesBefore_1_,
int p_bytesBefore_2_,
byte p_bytesBefore_3_)
io.netty.buffer.ByteBufvalue in this
buffer. The search starts from the specified index (inclusive)
and lasts for the specified length.
This method does not modify readerIndex or writerIndex of
this buffer.
bytesBefore クラス内 io.netty.buffer.ByteBufindex
and the first occurrence if found. -1 otherwise.public int forEachByte(io.netty.util.ByteProcessor p_forEachByte_1_)
io.netty.buffer.ByteBufprocessor in ascending order.forEachByte クラス内 io.netty.buffer.ByteBuf-1 if the processor iterated to or beyond the end of the readable bytes.
The last-visited index If the ByteProcessor.process(byte) returned false.public int forEachByte(int p_forEachByte_1_,
int p_forEachByte_2_,
io.netty.util.ByteProcessor p_forEachByte_3_)
io.netty.buffer.ByteBufprocessor in ascending order.
(i.e. index, (index + 1), .. (index + length - 1))forEachByte クラス内 io.netty.buffer.ByteBuf-1 if the processor iterated to or beyond the end of the specified area.
The last-visited index If the ByteProcessor.process(byte) returned false.public int forEachByteDesc(io.netty.util.ByteProcessor p_forEachByteDesc_1_)
io.netty.buffer.ByteBufprocessor in descending order.forEachByteDesc クラス内 io.netty.buffer.ByteBuf-1 if the processor iterated to or beyond the beginning of the readable bytes.
The last-visited index If the ByteProcessor.process(byte) returned false.public int forEachByteDesc(int p_forEachByteDesc_1_,
int p_forEachByteDesc_2_,
io.netty.util.ByteProcessor p_forEachByteDesc_3_)
io.netty.buffer.ByteBufprocessor in descending order.
(i.e. (index + length - 1), (index + length - 2), ... index)forEachByteDesc クラス内 io.netty.buffer.ByteBuf-1 if the processor iterated to or beyond the beginning of the specified area.
The last-visited index If the ByteProcessor.process(byte) returned false.public io.netty.buffer.ByteBuf copy()
io.netty.buffer.ByteBufbuf.copy(buf.readerIndex(), buf.readableBytes()).
This method does not modify readerIndex or writerIndex of
this buffer.copy クラス内 io.netty.buffer.ByteBufpublic io.netty.buffer.ByteBuf copy(int p_copy_1_,
int p_copy_2_)
io.netty.buffer.ByteBufreaderIndex or writerIndex of
this buffer.copy クラス内 io.netty.buffer.ByteBufpublic io.netty.buffer.ByteBuf slice()
io.netty.buffer.ByteBufbuf.slice(buf.readerIndex(), buf.readableBytes()).
This method does not modify readerIndex or writerIndex of
this buffer.
Also be aware that this method will NOT call ByteBuf.retain() and so the
reference count will NOT be increased.
slice クラス内 io.netty.buffer.ByteBufpublic io.netty.buffer.ByteBuf retainedSlice()
io.netty.buffer.ByteBufbuf.slice(buf.readerIndex(), buf.readableBytes()).
This method does not modify readerIndex or writerIndex of
this buffer.
Note that this method returns a retained buffer unlike ByteBuf.slice().
This method behaves similarly to slice().retain() except that this method may return
a buffer implementation that produces less garbage.
retainedSlice クラス内 io.netty.buffer.ByteBufpublic io.netty.buffer.ByteBuf slice(int p_slice_1_,
int p_slice_2_)
io.netty.buffer.ByteBufreaderIndex or writerIndex of
this buffer.
Also be aware that this method will NOT call ByteBuf.retain() and so the
reference count will NOT be increased.
slice クラス内 io.netty.buffer.ByteBufpublic io.netty.buffer.ByteBuf retainedSlice(int p_retainedSlice_1_,
int p_retainedSlice_2_)
io.netty.buffer.ByteBufreaderIndex or writerIndex of
this buffer.
Note that this method returns a retained buffer unlike ByteBuf.slice(int, int).
This method behaves similarly to slice(...).retain() except that this method may return
a buffer implementation that produces less garbage.
retainedSlice クラス内 io.netty.buffer.ByteBufpublic io.netty.buffer.ByteBuf duplicate()
io.netty.buffer.ByteBufreaderIndex or writerIndex of
this buffer.
The reader and writer marks will not be duplicated. Also be aware that this method will
NOT call ByteBuf.retain() and so the reference count will NOT be increased.
duplicate クラス内 io.netty.buffer.ByteBufByteBuf.slice().
However this buffer will share the capacity of the underlying buffer, and therefore allows access to all of the
underlying content if necessary.public io.netty.buffer.ByteBuf retainedDuplicate()
io.netty.buffer.ByteBufbuf.slice(0, buf.capacity()).
This method does not modify readerIndex or writerIndex of
this buffer.
Note that this method returns a retained buffer unlike ByteBuf.slice(int, int).
This method behaves similarly to duplicate().retain() except that this method may return
a buffer implementation that produces less garbage.
retainedDuplicate クラス内 io.netty.buffer.ByteBufpublic int nioBufferCount()
io.netty.buffer.ByteBufByteBuffers that consist this buffer. Note that ByteBuf.nioBuffers()
or ByteBuf.nioBuffers(int, int) might return a less number of ByteBuffers.nioBufferCount クラス内 io.netty.buffer.ByteBuf-1 if this buffer has no underlying ByteBuffer.
the number of the underlying ByteBuffers if this buffer has at least one underlying
ByteBuffer. Note that this method does not return 0 to avoid confusion.ByteBuf.nioBuffer(),
ByteBuf.nioBuffer(int, int),
ByteBuf.nioBuffers(),
ByteBuf.nioBuffers(int, int)public java.nio.ByteBuffer nioBuffer()
io.netty.buffer.ByteBufByteBuffer. The returned buffer
either share or contains the copied content of this buffer, while changing the position
and limit of the returned NIO buffer does not affect the indexes and marks of this buffer.
This method is identical to buf.nioBuffer(buf.readerIndex(), buf.readableBytes()).
This method does not modify readerIndex or writerIndex of this buffer.
Please note that the returned NIO buffer will not see the changes of this buffer if this buffer
is a dynamic buffer and it adjusted its capacity.nioBuffer クラス内 io.netty.buffer.ByteBufByteBuf.nioBufferCount(),
ByteBuf.nioBuffers(),
ByteBuf.nioBuffers(int, int)public java.nio.ByteBuffer nioBuffer(int p_nioBuffer_1_,
int p_nioBuffer_2_)
io.netty.buffer.ByteBufByteBuffer. The returned buffer
either share or contains the copied content of this buffer, while changing the position
and limit of the returned NIO buffer does not affect the indexes and marks of this buffer.
This method does not modify readerIndex or writerIndex of this buffer.
Please note that the returned NIO buffer will not see the changes of this buffer if this buffer
is a dynamic buffer and it adjusted its capacity.nioBuffer クラス内 io.netty.buffer.ByteBufByteBuf.nioBufferCount(),
ByteBuf.nioBuffers(),
ByteBuf.nioBuffers(int, int)public java.nio.ByteBuffer internalNioBuffer(int p_internalNioBuffer_1_,
int p_internalNioBuffer_2_)
io.netty.buffer.ByteBufinternalNioBuffer クラス内 io.netty.buffer.ByteBufpublic java.nio.ByteBuffer[] nioBuffers()
io.netty.buffer.ByteBufByteBuffer's. The returned buffer
either share or contains the copied content of this buffer, while changing the position
and limit of the returned NIO buffer does not affect the indexes and marks of this buffer.
This method does not modify readerIndex or writerIndex of this buffer.
Please note that the returned NIO buffer will not see the changes of this buffer if this buffer
is a dynamic buffer and it adjusted its capacity.nioBuffers クラス内 io.netty.buffer.ByteBufByteBuf.nioBufferCount(),
ByteBuf.nioBuffer(),
ByteBuf.nioBuffer(int, int)public java.nio.ByteBuffer[] nioBuffers(int p_nioBuffers_1_,
int p_nioBuffers_2_)
io.netty.buffer.ByteBufByteBuffer's for the specified index and length
The returned buffer either share or contains the copied content of this buffer, while changing
the position and limit of the returned NIO buffer does not affect the indexes and marks of this buffer.
This method does not modify readerIndex or writerIndex of this buffer. Please note that the
returned NIO buffer will not see the changes of this buffer if this buffer is a dynamic
buffer and it adjusted its capacity.nioBuffers クラス内 io.netty.buffer.ByteBufByteBuf.nioBufferCount(),
ByteBuf.nioBuffer(),
ByteBuf.nioBuffer(int, int)public boolean hasArray()
io.netty.buffer.ByteBuftrue if and only if this buffer has a backing byte array.
If this method returns true, you can safely call ByteBuf.array() and
ByteBuf.arrayOffset().hasArray クラス内 io.netty.buffer.ByteBufpublic byte[] array()
io.netty.buffer.ByteBufarray クラス内 io.netty.buffer.ByteBufpublic int arrayOffset()
io.netty.buffer.ByteBufarrayOffset クラス内 io.netty.buffer.ByteBufpublic boolean hasMemoryAddress()
io.netty.buffer.ByteBuftrue if and only if this buffer has a reference to the low-level memory address that points
to the backing data.hasMemoryAddress クラス内 io.netty.buffer.ByteBufpublic long memoryAddress()
io.netty.buffer.ByteBufmemoryAddress クラス内 io.netty.buffer.ByteBufpublic java.lang.String toString(java.nio.charset.Charset p_toString_1_)
io.netty.buffer.ByteBufbuf.toString(buf.readerIndex(), buf.readableBytes(), charsetName).
This method does not modify readerIndex or writerIndex of
this buffer.toString クラス内 io.netty.buffer.ByteBufpublic java.lang.String toString(int p_toString_1_,
int p_toString_2_,
java.nio.charset.Charset p_toString_3_)
io.netty.buffer.ByteBufreaderIndex or
writerIndex of this buffer.toString クラス内 io.netty.buffer.ByteBufpublic int hashCode()
io.netty.buffer.ByteBufhashCode クラス内 io.netty.buffer.ByteBufpublic boolean equals(java.lang.Object p_equals_1_)
io.netty.buffer.ByteBufByteBuf.readerIndex() nor
ByteBuf.writerIndex(). This method also returns false for
null and an object which is not an instance of
ByteBuf type.equals クラス内 io.netty.buffer.ByteBufpublic int compareTo(io.netty.buffer.ByteBuf p_compareTo_1_)
io.netty.buffer.ByteBufstrcmp,
memcmp and String.compareTo(String).compareTo インタフェース内 java.lang.Comparable<io.netty.buffer.ByteBuf>compareTo クラス内 io.netty.buffer.ByteBufpublic java.lang.String toString()
io.netty.buffer.ByteBufByteBuf.readerIndex(),
ByteBuf.writerIndex() and ByteBuf.capacity().toString クラス内 io.netty.buffer.ByteBufpublic io.netty.buffer.ByteBuf retain(int p_retain_1_)
io.netty.util.ReferenceCountedincrement.retain インタフェース内 io.netty.util.ReferenceCountedretain クラス内 io.netty.buffer.ByteBufpublic io.netty.buffer.ByteBuf retain()
io.netty.util.ReferenceCounted1.retain インタフェース内 io.netty.util.ReferenceCountedretain クラス内 io.netty.buffer.ByteBufpublic io.netty.buffer.ByteBuf touch()
io.netty.util.ReferenceCountedResourceLeakDetector. This method is a shortcut to touch(null).touch インタフェース内 io.netty.util.ReferenceCountedtouch クラス内 io.netty.buffer.ByteBufpublic io.netty.buffer.ByteBuf touch(java.lang.Object p_touch_1_)
io.netty.util.ReferenceCountedResourceLeakDetector.touch インタフェース内 io.netty.util.ReferenceCountedtouch クラス内 io.netty.buffer.ByteBufpublic int refCnt()
io.netty.util.ReferenceCounted0, it means this object has been deallocated.refCnt インタフェース内 io.netty.util.ReferenceCountedpublic boolean release()
io.netty.util.ReferenceCounted1 and deallocates this object if the reference count reaches at
0.release インタフェース内 io.netty.util.ReferenceCountedtrue if and only if the reference count became 0 and this object has been deallocatedpublic boolean release(int p_release_1_)
io.netty.util.ReferenceCounteddecrement and deallocates this object if the reference
count reaches at 0.release インタフェース内 io.netty.util.ReferenceCountedtrue if and only if the reference count became 0 and this object has been deallocated