rasmus.util
Class ByteConversion

java.lang.Object
  extended by rasmus.util.ByteConversion

public final class ByteConversion
extends java.lang.Object


Constructor Summary
ByteConversion()
           
 
Method Summary
static int byteToInt(byte buffer)
           
static int byteToInt(byte[] buffer)
           
static java.lang.String charToString(byte[] buffer)
           
static long dwordToLong(byte[] buffer)
           
static java.lang.String guidToString(byte[] buffer)
           
static byte[] intToByte(int buffer)
           
static byte[] intToShort(int buffer)
           
static byte[] intToWord(int buffer)
           
static byte[] longToDWord(long buffer)
           
static int shortToInt(byte[] buffer)
           
static byte[] stringToChar(java.lang.String buffer, int size)
           
static int wordToInt_BE(byte[] buffer)
           
static int wordToInt_LE(byte[] buffer)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ByteConversion

public ByteConversion()
Method Detail

guidToString

public static final java.lang.String guidToString(byte[] buffer)

byteToInt

public static final int byteToInt(byte buffer)

byteToInt

public static final int byteToInt(byte[] buffer)

charToString

public static final java.lang.String charToString(byte[] buffer)
                                           throws java.io.UnsupportedEncodingException
Throws:
java.io.UnsupportedEncodingException

dwordToLong

public static final long dwordToLong(byte[] buffer)

intToByte

public static final byte[] intToByte(int buffer)

intToShort

public static final byte[] intToShort(int buffer)

intToWord

public static final byte[] intToWord(int buffer)

longToDWord

public static final byte[] longToDWord(long buffer)

shortToInt

public static final int shortToInt(byte[] buffer)

stringToChar

public static final byte[] stringToChar(java.lang.String buffer,
                                        int size)

wordToInt_LE

public static final int wordToInt_LE(byte[] buffer)

wordToInt_BE

public static final int wordToInt_BE(byte[] buffer)