org.openaltimeter
Class TypeConverter

java.lang.Object
  extended by org.openaltimeter.TypeConverter

public class TypeConverter
extends java.lang.Object


Constructor Summary
TypeConverter()
           
 
Method Summary
static float bytesToFloat(byte b0, byte b1, byte b2, byte b3)
           
static int bytesToSignedInt(byte b0, byte b1, byte b2, byte b3)
           
static short bytesToSignedShort(byte b0, byte b1)
           
static int byteToUnsignedByte(byte b)
           
static byte[] floatToBytes(float f)
           
static byte[] unsignedShortToBytes(int i)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TypeConverter

public TypeConverter()
Method Detail

bytesToSignedInt

public static int bytesToSignedInt(byte b0,
                                   byte b1,
                                   byte b2,
                                   byte b3)

bytesToSignedShort

public static short bytesToSignedShort(byte b0,
                                       byte b1)

bytesToFloat

public static float bytesToFloat(byte b0,
                                 byte b1,
                                 byte b2,
                                 byte b3)

byteToUnsignedByte

public static int byteToUnsignedByte(byte b)

unsignedShortToBytes

public static byte[] unsignedShortToBytes(int i)

floatToBytes

public static byte[] floatToBytes(float f)