public interface NetInput
| Modifier and Type | Method and Description |
|---|---|
int |
available()
Gets the number of available bytes.
|
boolean |
readBoolean()
Reads the next boolean.
|
byte |
readByte()
Reads the next byte.
|
int |
readBytes(byte[] b)
Reads as much data as possible into the given byte array.
|
int |
readBytes(byte[] b,
int offset,
int length)
Reads the given amount of bytes into the given array at the given offset.
|
byte[] |
readBytes(int length)
Reads the next byte array.
|
char |
readChar()
Reads the next char.
|
double |
readDouble()
Reads the next double.
|
default <T extends Enum<T>> |
readEnum(T[] values)
Reads the next enum.
|
float |
readFloat()
Reads the next float.
|
int |
readInt()
Reads the next integer.
|
int[] |
readInts(int length)
Reads the next int array.
|
int |
readInts(int[] i)
Reads as much data as possible into the given int array.
|
int |
readInts(int[] i,
int offset,
int length)
Reads the given amount of ints into the given array at the given offset.
|
long |
readLong()
Reads the next long.
|
long[] |
readLongs(int length)
Reads the next long array.
|
int |
readLongs(long[] l)
Reads as much data as possible into the given long array.
|
int |
readLongs(long[] l,
int offset,
int length)
Reads the given amount of longs into the given array at the given offset.
|
short |
readShort()
Reads the next short.
|
short[] |
readShorts(int length)
Reads the next short array.
|
int |
readShorts(short[] s)
Reads as much data as possible into the given short array.
|
int |
readShorts(short[] s,
int offset,
int length)
Reads the given amount of shorts into the given array at the given offset.
|
String |
readString()
Reads the next string.
|
int |
readUnsignedByte()
Reads the next unsigned byte.
|
int |
readUnsignedShort()
Reads the next unsigned short.
|
UUID |
readUUID()
Reads the next UUID.
|
int |
readVarInt()
Reads the next varint.
|
long |
readVarLong()
Reads the next varlong.
|
boolean readBoolean()
throws IOException
IOException - If an I/O error occurs.byte readByte()
throws IOException
IOException - If an I/O error occurs.int readUnsignedByte()
throws IOException
IOException - If an I/O error occurs.short readShort()
throws IOException
IOException - If an I/O error occurs.int readUnsignedShort()
throws IOException
IOException - If an I/O error occurs.char readChar()
throws IOException
IOException - If an I/O error occurs.int readInt()
throws IOException
IOException - If an I/O error occurs.int readVarInt()
throws IOException
IOException - If an I/O error occurs.long readLong()
throws IOException
IOException - If an I/O error occurs.long readVarLong()
throws IOException
IOException - If an I/O error occurs.float readFloat()
throws IOException
IOException - If an I/O error occurs.double readDouble()
throws IOException
IOException - If an I/O error occurs.byte[] readBytes(int length)
throws IOException
length - The length of the byte array.IOException - If an I/O error occurs.int readBytes(byte[] b)
throws IOException
b - Byte array to read to.IOException - If an I/O error occurs.int readBytes(byte[] b,
int offset,
int length)
throws IOException
b - Byte array to read to.offset - Offset of the array to read to.length - Length of bytes to read.IOException - If an I/O error occurs.short[] readShorts(int length)
throws IOException
length - The length of the short array.IOException - If an I/O error occurs.int readShorts(short[] s)
throws IOException
s - Short array to read to.IOException - If an I/O error occurs.int readShorts(short[] s,
int offset,
int length)
throws IOException
s - Short array to read to.offset - Offset of the array to read to.length - Length of bytes to read.IOException - If an I/O error occurs.int[] readInts(int length)
throws IOException
length - The length of the int array.IOException - If an I/O error occurs.int readInts(int[] i)
throws IOException
i - Int array to read to.IOException - If an I/O error occurs.int readInts(int[] i,
int offset,
int length)
throws IOException
i - Int array to read to.offset - Offset of the array to read to.length - Length of bytes to read.IOException - If an I/O error occurs.long[] readLongs(int length)
throws IOException
length - The length of the long array.IOException - If an I/O error occurs.int readLongs(long[] l)
throws IOException
l - Long array to read to.IOException - If an I/O error occurs.int readLongs(long[] l,
int offset,
int length)
throws IOException
l - Long array to read to.offset - Offset of the array to read to.length - Length of bytes to read.IOException - If an I/O error occurs.String readString() throws IOException
IOException - If an I/O error occurs.UUID readUUID() throws IOException
IOException - If an I/O error occurs.default <T extends Enum<T>> T readEnum(T[] values) throws IOException
values - the collection of enums to read fromIOException - If an I/O error occurs.int available()
throws IOException
IOException - If an I/O error occurs.Copyright © 2022. All rights reserved.