| Modifier and Type | Method and Description |
|---|---|
static byte[] |
ipv4ToBytes(CharSequence ip)
Converts a text representation of an IPv4 address into an array of bytes.
|
static boolean |
ipv4ToBytes(CharSequence ip,
byte[] output,
int off)
Converts a text representation of an IPv4 address into an array of bytes.
|
static int |
ipv4ToInt(CharSequence ip)
Converts a text representation of an IPv4 address into an
int value. |
static String |
ipv4ToString(byte[] data)
Converts an array of bytes into a text representation of an IPv4 address.
|
static String |
ipv4ToString(byte[] data,
int off)
Converts an array of bytes into a text representation of an IPv4 address.
|
static String |
ipv4ToString(int value)
Converts an
int value into a text representation of an IPv4 address. |
static byte[] |
ipv6ToBytes(CharSequence ip)
Converts a text representation of an IPv6 address into an array of bytes.
|
static boolean |
ipv6ToBytes(CharSequence ip,
byte[] output,
int off)
Converts a text representation of an IPv6 address into an array of bytes.
|
static String |
ipv6ToString(byte[] data,
int off,
boolean embedIpv4)
Converts an array of bytes into a compressed text representation of an IPv6
address.
|
static String |
ipv6ToString(byte[] data,
int off,
boolean embedIpv4,
boolean compress)
Converts an array of bytes into a text representation of an IPv6 address.
|
static byte[] |
portToBytes(int port)
Converts a port number into an array of bytes.
|
static void |
portToBytes(int port,
byte[] output,
int off)
Converts a port number into an array of bytes.
|
static byte[] |
toBytes(int value)
Converts an
int value into an array of bytes. |
static void |
toBytes(int value,
byte[] output,
int off)
Converts an
int value into an array of bytes. |
static byte[] |
toBytes(long value)
Converts a
long value into an array of bytes. |
static void |
toBytes(long value,
byte[] output,
int off)
Converts a
long value into an array of bytes. |
static byte[] |
toBytes(short value)
Converts a
short value into an array of bytes. |
static void |
toBytes(short value,
byte[] output,
int off)
Converts a
short value into an array of bytes. |
static int |
toInt(byte[] data)
Converts an array of bytes into an
int value. |
static int |
toInt(byte[] data,
int off)
Converts an array of bytes into an
int value. |
static long |
toLong(byte[] data)
Converts an array of bytes into a
long value. |
static long |
toLong(byte[] data,
int off)
Converts an array of bytes into a
long value. |
static int |
toPort(byte[] data)
Converts an array of bytes into a port number.
|
static int |
toPort(byte[] data,
int off)
Converts an array of bytes into a port number.
|
static short |
toShort(byte[] data)
Converts an array of bytes into a
short value. |
static short |
toShort(byte[] data,
int off)
Converts an array of bytes into a
short value. |
public static boolean ipv6ToBytes(CharSequence ip, byte[] output, int off)
ip - the text representation of an IPv6 addressoutput - an array for the output bytesoff - starting position for the output bytes in the arraytrue if the text representation was a valid IPv6 address. If
the returned value is false the initial content in the output
array is not changedpublic static byte[] ipv6ToBytes(CharSequence ip)
ip - the text representation of an IPv6 addressnull if the text representation was not
a valid IPv6 addresspublic static String ipv6ToString(byte[] data, int off, boolean embedIpv4)
data - the array of bytesoff - starting position in the array of bytesembedIpv4 - true if the IPv4 notation should should be embedded
in the returned text representation of the IPv6 address.public static String ipv6ToString(byte[] data, int off, boolean embedIpv4, boolean compress)
data - the array of bytesoff - starting position in the array of bytesembedIpv4 - true if the IPv4 notation should should be embedded
in the returned text representation of the IPv6 addresscompress - true to used compressed text representation of the
IPv6 addresspublic static boolean ipv4ToBytes(CharSequence ip, byte[] output, int off)
ip - the text representation of an IPv4 addressoutput - an array for the output bytesoff - starting position for the output bytes in the arraytrue if the text representation was a valid IPv4 address. If
the returned value is false the initial content in the output
array is not changedpublic static byte[] ipv4ToBytes(CharSequence ip)
ip - the text representation of an IPv4 addressnull if the text representation was not
a valid IPv4 addresspublic static String ipv4ToString(byte[] data, int off)
data - the array of bytesoff - starting position in the array of bytespublic static String ipv4ToString(byte[] data)
data - the array of bytespublic static String ipv4ToString(int value)
int value into a text representation of an IPv4 address.value - the int valuepublic static int ipv4ToInt(CharSequence ip)
int value.ip - the text representation of an IPv4 addressint valuepublic static int toPort(byte[] data,
int off)
data - the array of bytesoff - starting position in the array of bytespublic static int toPort(byte[] data)
data - the array of bytespublic static void portToBytes(int port,
byte[] output,
int off)
port - the port numberoutput - an array for the output bytesoff - starting position for the output bytes in the arraypublic static byte[] portToBytes(int port)
port - the port numberpublic static short toShort(byte[] data,
int off)
short value.data - the array of bytesoff - starting position in the array of bytesshort valuepublic static short toShort(byte[] data)
short value.data - the array of bytesshort valuepublic static void toBytes(short value,
byte[] output,
int off)
short value into an array of bytes.value - the short valueoutput - an array for the output bytesoff - starting position for the output bytes in the arraypublic static byte[] toBytes(short value)
short value into an array of bytes.value - the short valuepublic static int toInt(byte[] data,
int off)
int value.data - the array of bytesoff - starting position in the array of bytesint valuepublic static int toInt(byte[] data)
int value.data - the array of bytesint valuepublic static void toBytes(int value,
byte[] output,
int off)
int value into an array of bytes.value - the short valueoutput - an array for the output bytesoff - starting position for the output bytes in the arraypublic static byte[] toBytes(int value)
int value into an array of bytes.value - the short valuepublic static long toLong(byte[] data,
int off)
long value.data - the array of bytesoff - starting position in the array of byteslong valuepublic static long toLong(byte[] data)
long value.data - the array of byteslong valuepublic static void toBytes(long value,
byte[] output,
int off)
long value into an array of bytes.value - the short valueoutput - an array for the output bytesoff - starting position for the output bytes in the arraypublic static byte[] toBytes(long value)
long value into an array of bytes.value - the short valueCopyright © 2017–2022 SNF4J.ORG. All rights reserved.