Package net.minecraft.server.rcon
Class PktUtils
java.lang.Object
net.minecraft.server.rcon.PktUtils
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic int
intFromByteArray
(byte[] pInput, int pOffset) Read 4 bytes from thestatic int
intFromByteArray
(byte[] pInput, int pOffset, int pLength) Read 4 bytes from the given array in little-endian format and return them as an intstatic int
intFromNetworkByteArray
(byte[] pInput, int pOffset, int pLength) Read 4 bytes from the given array in big-endian format and return them as an intstatic String
stringFromByteArray
(byte[] pInput, int pOffset, int pLength) Read a null-terminated string from the given byte arraystatic String
toHexString
(byte pInput) Returns a String representation of the byte in hexadecimal format
-
Field Details
-
MAX_PACKET_SIZE
public static final int MAX_PACKET_SIZE- See Also:
-
HEX_CHAR
public static final char[] HEX_CHAR
-
-
Constructor Details
-
PktUtils
public PktUtils()
-
-
Method Details
-
stringFromByteArray
Read a null-terminated string from the given byte array -
intFromByteArray
public static int intFromByteArray(byte[] pInput, int pOffset) Read 4 bytes from the -
intFromByteArray
public static int intFromByteArray(byte[] pInput, int pOffset, int pLength) Read 4 bytes from the given array in little-endian format and return them as an int -
intFromNetworkByteArray
public static int intFromNetworkByteArray(byte[] pInput, int pOffset, int pLength) Read 4 bytes from the given array in big-endian format and return them as an int -
toHexString
Returns a String representation of the byte in hexadecimal format
-