All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class net.tabuleiro.nebulae.ConversionUtils

net.tabuleiro.nebulae.ConversionUtils

public class ConversionUtils
extends java.lang.Object
Collection of static methods for data conversion. Data is treated in network byte order. This class is reserved for internal use of the Nebulae MultiUser Server


Constructor Index

 o ConversionUtils()

Method Index

 o binHexToBytes(String, byte[], int, int, int)
 o byteArrayToInt(byte[], int)
 o byteArrayToLong(byte[], int)
 o byteArrayToShort(byte[], int)
 o byteArrayToUNCString(byte[], int, int)
 o bytesToBinHex(byte[])
 o bytesToBinHex(byte[], int, int)
 o correctLongBytes(long)
 o intArrayToLong(int[], int)
 o intToBinHex(int)
 o intToByteArray(int, byte[], int)
 o longHi32(long)
 o longLo32(long)
 o longToBinHex(long)
 o longToByteArray(long, byte[], int)
 o longToIntArray(long, int[], int)
 o makeLong(int, int)
 o shortToByteArray(int, byte[], int)
 o swapIntBytes(int)

Constructors

 o ConversionUtils
 public ConversionUtils()

Methods

 o byteArrayToLong
 public static long byteArrayToLong(byte buffer[],
                                    int nStartIndex)
 o byteArrayToInt
 public static int byteArrayToInt(byte buffer[],
                                  int nStartIndex)
 o byteArrayToShort
 public static short byteArrayToShort(byte buffer[],
                                      int nStartIndex)
 o longToByteArray
 public static void longToByteArray(long lValue,
                                    byte buffer[],
                                    int nStartIndex)
 o correctLongBytes
 public static long correctLongBytes(long lValue)
 o swapIntBytes
 public static int swapIntBytes(int lValue)
 o intToByteArray
 public static void intToByteArray(int lValue,
                                   byte buffer[],
                                   int nStartIndex)
 o shortToByteArray
 public static void shortToByteArray(int lValue,
                                     byte buffer[],
                                     int nStartIndex)
 o intArrayToLong
 public static long intArrayToLong(int buffer[],
                                   int nStartIndex)
 o longToIntArray
 public static void longToIntArray(long lValue,
                                   int buffer[],
                                   int nStartIndex)
 o makeLong
 public static long makeLong(int nLo,
                             int nHi)
 o longLo32
 public static int longLo32(long lVal)
 o longHi32
 public static int longHi32(long lVal)
 o bytesToBinHex
 public static java.lang.String bytesToBinHex(byte data[])
 o longToBinHex
 public static java.lang.String longToBinHex(long lValue)
 o intToBinHex
 public static java.lang.String intToBinHex(int lValue)
 o bytesToBinHex
 public static java.lang.String bytesToBinHex(byte data[],
                                              int nStartPos,
                                              int nNumOfBytes)
 o binHexToBytes
 public static int binHexToBytes(java.lang.String sBinHex,
                                 byte data[],
                                 int nSrcPos,
                                 int nDstPos,
                                 int nNumOfBytes)
 o byteArrayToUNCString
 public static java.lang.String byteArrayToUNCString(byte data[],
                                                     int nStartPos,
                                                     int nNumOfBytes)

All Packages  Class Hierarchy  This Package  Previous  Next  Index