|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.savarese.vserv.tcpip.OctetConverter
OctetConverter is a utility singleton class for converting IP octets to and from other representations.
Method Summary | |
static void |
intToOctets(int address,
byte[] octets)
Same as intToOctets(address, octets, 0); |
static void |
intToOctets(int address,
byte[] octets,
int offset)
Converts a 32-bit word representation of an IPv4 address to a byte array of octets. |
static void |
intToString(java.lang.StringBuffer buffer,
int address)
Converts a 32-bit word representation of an IPv4 address to a string representation. |
static void |
longToOctets(long address,
byte[] octets)
Same as longToOctets(address, octets, 0); |
static void |
longToOctets(long address,
byte[] octets,
int offset)
Converts a 64-bit word to a byte array of octets. |
static int |
octetsToInt(byte[] octets)
Same as octetsToInt(octets, 0); |
static int |
octetsToInt(byte[] octets,
int offset)
Converts a set of IPv4 octets to a 32-bit word. |
static long |
octetsToLong(byte[] octets)
Same as octetsToLong(octets, 0); |
static long |
octetsToLong(byte[] octets,
int offset)
Converts a set of octets to a 64-bit word. |
static void |
octetsToString(java.lang.StringBuffer buffer,
byte[] octets)
Same as octetsToString(buffer, octets, 0); |
static void |
octetsToString(java.lang.StringBuffer buffer,
byte[] octets,
int offset)
Converts a set of IPv4 octets to a string representation. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public static final int octetsToInt(byte[] octets, int offset)
octets
- A byte array containing the IPv4 octets.offset
- The offset into the array where the octets start.
public static final int octetsToInt(byte[] octets)
octetsToInt(octets, 0);
public static final long octetsToLong(byte[] octets, int offset)
octets
- A byte array containing the octets.offset
- The offset into the array where the octets start.
public static final long octetsToLong(byte[] octets)
octetsToLong(octets, 0);
public static final void octetsToString(java.lang.StringBuffer buffer, byte[] octets, int offset)
buffer
- The StringBuffer to which to append the string.octets
- A byte array containing the IPv4 octets.offset
- The offset into the array where the octets start.public static final void octetsToString(java.lang.StringBuffer buffer, byte[] octets)
octetsToString(buffer, octets, 0);
public static final void intToString(java.lang.StringBuffer buffer, int address)
buffer
- The StringBuffer to which to append the string.address
- The 32-bit word representation of the address.public static final void intToOctets(int address, byte[] octets, int offset)
address
- The 32-bit word representation of the IPv4 address.octets
- The byte array in which to store the IPv4 octets.offset
- The offset into the array where the octets start.public static final void intToOctets(int address, byte[] octets)
intToOctets(address, octets, 0);
public static final void longToOctets(long address, byte[] octets, int offset)
address
- The 64-bit word.octets
- The byte array in which to store octets.offset
- The offset into the array where the octets start.public static final void longToOctets(long address, byte[] octets)
longToOctets(address, octets, 0);
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |