Package pcap.common.util
Class Hexs
java.lang.Object
pcap.common.util.Hexs
@Inclubating public final class Hexs extends Object
- Author:
- Ardika Rommy Sanjaya
-
Constructor Summary
Constructors Constructor Description Hexs()
-
Method Summary
Modifier and Type Method Description static byte[]
parseHex(String hexStream)
Hex stream to byte array.static String
toHexString(byte[] buffer)
ByteBuffer
to hex string.static String
toHexString(byte[] buffer, int offset, int length)
ByteBuffer
to hex string.static String
toHexString(ByteBuffer buffer)
ByteBuffer
to hex string.static String
toHexString(ByteBuffer buffer, int offset, int length)
ByteBuffer
to hex string.static String
toPrettyHexDump(byte[] data)
Byte array to hex dump format.static String
toPrettyHexDump(byte[] data, int offset, int length)
Byte array to hex dump format.static String
toPrettyHexDump(ByteBuffer buffer, int offset, int length)
Byte buffer to hex dump format.
-
Constructor Details
-
Hexs
public Hexs()
-
-
Method Details
-
toHexString
ByteBuffer
to hex string.- Parameters:
buffer
- buffer.- Returns:
- returns hex string.
-
toHexString
ByteBuffer
to hex string.- Parameters:
buffer
- buffer.offset
- offset.length
- length.- Returns:
- returns hex string.
-
toHexString
ByteBuffer
to hex string.- Parameters:
buffer
- buffer.- Returns:
- returns hex string.
-
toHexString
ByteBuffer
to hex string.- Parameters:
buffer
- buffer.offset
- offset.length
- length.- Returns:
- returns hex string.
-
toPrettyHexDump
Byte array to hex dump format.- Parameters:
data
- byte array.- Returns:
- hex dump format.
- Since:
- 1.0.0
-
toPrettyHexDump
Byte array to hex dump format.- Parameters:
data
- byte array.offset
- offset.length
- length.- Returns:
- hex dump format.
- Since:
- 1.0.0
-
toPrettyHexDump
Byte buffer to hex dump format.- Parameters:
buffer
- byte buffer.offset
- offset.length
- length.- Returns:
- hex dump format.
- Since:
- 1.1.0
-
parseHex
Hex stream to byte array.- Parameters:
hexStream
- hex stream.- Returns:
- byte array.
- Since:
- 1.0.0
-