| 
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectutil.Util
public class Util
Various static utility methods.
| Constructor Summary | |
|---|---|
Util()
 | 
|
| Method Summary | |
|---|---|
static int | 
BAToInt(byte[] buf)
Convert byte[0]...buf[3] to integer.  | 
static int | 
BAToInt(byte[] buf,
        int offset)
Convert byte[offset]...byte[offset+3] to integer.  | 
static int | 
BAToShort(byte[] buf)
Convert buf[0] buf[1] to int in range 0..65535  | 
static int | 
BAToShort(byte[] buf,
          int offset)
Convert buf[offset] buf[offset+1] to int in range 0..65535  | 
static java.lang.String | 
InetAddrToHost(java.net.InetSocketAddress addr)
 | 
static void | 
IntToBA(int val,
        byte[] buf)
Write integer into buf[0]...buf[3]  | 
static void | 
IntToBA(int val,
        byte[] buf,
        int offset)
Write integer into buf[offset]...buf[offset+3]  | 
static void | 
main(java.lang.String[] args)
Unit test.  | 
static void | 
ShortToBA(int val,
          byte[] buf)
Write low order 16-bits of val into buf[0] buf[1]  | 
static void | 
ShortToBA(int val,
          byte[] buf,
          int offset)
Write low-order 16-bits of val into buf[offset] buf[offset+1]  | 
| Methods inherited from class java.lang.Object | 
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Constructor Detail | 
|---|
public Util()
| Method Detail | 
|---|
public static java.lang.String InetAddrToHost(java.net.InetSocketAddress addr)
                                       throws java.net.UnknownHostException
java.net.UnknownHostException
public static void IntToBA(int val,
                           byte[] buf,
                           int offset)
public static void IntToBA(int val,
                           byte[] buf)
public static int BAToInt(byte[] buf,
                          int offset)
public static int BAToInt(byte[] buf)
public static void ShortToBA(int val,
                             byte[] buf,
                             int offset)
public static void ShortToBA(int val,
                             byte[] buf)
public static int BAToShort(byte[] buf,
                            int offset)
public static int BAToShort(byte[] buf)
public static void main(java.lang.String[] args)
  | 
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||