Class ByteKit
java.lang.Object
com.iohao.net.common.kit.ByteKit
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleangetBoolean(byte[] array) static byte[]getBytes(byte[] data) intgetInt(byte[] array) longgetLong(byte[] array) byte[]getPayload(byte[] payload, int payloadLength) getString(byte[] array) static byte[]ofBytes(int length) byte[]toBytes(boolean value) byte[]toBytes(int value) byte[]toBytes(long value) byte[]
-
Constructor Details
-
ByteKit
public ByteKit()
-
-
Method Details
-
toBytes
public byte[] toBytes(long value) -
getLong
public long getLong(byte[] array) -
toBytes
public byte[] toBytes(int value) -
getInt
public int getInt(byte[] array) -
toBytes
public byte[] toBytes(boolean value) -
getBoolean
public boolean getBoolean(byte[] array) -
toBytes
-
getString
-
getPayload
public byte[] getPayload(byte[] payload, int payloadLength) -
getBytes
public static byte[] getBytes(byte[] data) -
ofBytes
public static byte[] ofBytes(int length)
-