ByteUtil

open class ByteUtil

Constructors

Link copied to clipboard
constructor()

Properties

Link copied to clipboard
val BYTE_WIDTH: Int = 1
Link copied to clipboard
val INT_WIDTH: Int = 4
Link copied to clipboard
val LONG_WIDTH: Int = 8
Link copied to clipboard
val SHORT_WIDTH: Int = 2

Functions

Link copied to clipboard
@NotNull
open fun byteArrayToHex(a: @NotNull Array<Byte>): @NotNull String
@NotNull
open fun byteArrayToHex(a: @NotNull Array<Byte>, format: String): @NotNull String
@NotNull
open fun byteArrayToHex(a: @NotNull Array<Byte>, offset: Int, length: Int, format: String): @NotNull String
Link copied to clipboard
open fun byteArrayToUnsignedInt(data: @NotNull Array<Byte>): Int
open fun byteArrayToUnsignedInt(data: @NotNull Array<Byte>, offset: Int): Int
open fun byteArrayToUnsignedInt(data: @NotNull Array<Byte>, offset: Int, @Nullable endian: @Nullable Endian): Int
open fun byteArrayToUnsignedInt(data: @NotNull Array<Byte>, offset: Int, @Nullable endian: @Nullable Endian, length: Int): Int
Converts a byte array to an unsigned integer.
Link copied to clipboard
open fun byteArrayToUnsignedLong(data: @NotNull Array<Byte>): Long
open fun byteArrayToUnsignedLong(data: @NotNull Array<Byte>, offset: Int): Long
open fun byteArrayToUnsignedLong(data: @NotNull Array<Byte>, offset: Int, @Nullable endian: @Nullable Endian): Long
open fun byteArrayToUnsignedLong(data: @NotNull Array<Byte>, offset: Int, @Nullable endian: @Nullable Endian, length: Int): Long
Converts a byte array to an unsigned long.
Link copied to clipboard
open fun byteToUnsignedInt(b: Byte): Int
Converts a unsigned byte to an int.
Link copied to clipboard
Converts a byte to an unsigned long.