oemware.core.util
Class NetUtils

java.lang.Object
  extended by oemware.core.util.NetUtils

public final class NetUtils
extends java.lang.Object

The network utils.


Constructor Summary
NetUtils()
           
 
Method Summary
static java.lang.String decodeIpV4Addr(int pAddr)
          Takes an ipv4 address in int format and converts to a string
static byte[] encodeIpV4Addr(java.lang.String pAddr)
          This takes a period delimited ip address and converts it to a four byte value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NetUtils

public NetUtils()
Method Detail

decodeIpV4Addr

public static final java.lang.String decodeIpV4Addr(int pAddr)
Takes an ipv4 address in int format and converts to a string

Parameters:
pAddr - The address. This method creates a new buffer and a string... this needs to be fixed.
Returns:
The ipv4 string address. Null is returned if it's invalid.

encodeIpV4Addr

public static final byte[] encodeIpV4Addr(java.lang.String pAddr)
This takes a period delimited ip address and converts it to a four byte value.

Parameters:
pAddr - The address to encode.
Returns:
The four byte array.


Copyright © 2009 Deft Labs - Released under LGPL, Version 3.0