Sun SPOT API
Green Release  


com.sun.spot.util
Class Utils

java.lang.Object
  extended by com.sun.spot.util.Utils

public class Utils
extends Object


Constructor Summary
Utils()
           
 
Method Summary
static int addressPadding(int address, int padBoundary)
           
static int as6BitNumber(int number)
           
static byte[] copy(byte[] aByteArray)
           
static Vector enumToVector(Enumeration drivers)
           
static int getManifestProperty(String manifestPropertyName, int valueIfNotInManifest)
           
static String getManifestProperty(String manifestPropertyName, String valueIfNotInManifest)
           
static int readBigEndInt(byte[] byteArray, int offset)
           
static long readBigEndLong(byte[] byteArray, int offset)
           
static int readBigEndShort(byte[] byteArray, int offset)
           
static int readLittleEndInt(byte[] byteArray, int offset)
           
static long readLittleEndLong(byte[] byteArray, int offset)
           
static int readLittleEndShort(byte[] byteArray, int offset)
           
static long readLong(String number)
           
static int readNumber(String number)
           
static void sleep(long milliseconds)
           
static String stringify(byte[] b)
           
static void writeBigEndLong(byte[] byteArray, int offset, long value)
           
static void writeBigEndShort(byte[] byteArray, int offset, int value)
           
static void writeLittleEndInt(byte[] byteArray, int offset, int value)
           
static void writeLittleEndLong(byte[] byteArray, int offset, long value)
           
static void writeLittleEndShort(byte[] byteArray, int offset, int value)
           
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Utils

public Utils()
Method Detail

copy

public static byte[] copy(byte[] aByteArray)

readNumber

public static int readNumber(String number)

readLong

public static long readLong(String number)

addressPadding

public static int addressPadding(int address,
                                 int padBoundary)

readLittleEndLong

public static long readLittleEndLong(byte[] byteArray,
                                     int offset)

readLittleEndInt

public static int readLittleEndInt(byte[] byteArray,
                                   int offset)

readBigEndInt

public static int readBigEndInt(byte[] byteArray,
                                int offset)

readLittleEndShort

public static int readLittleEndShort(byte[] byteArray,
                                     int offset)

readBigEndShort

public static int readBigEndShort(byte[] byteArray,
                                  int offset)

readBigEndLong

public static long readBigEndLong(byte[] byteArray,
                                  int offset)

writeLittleEndLong

public static void writeLittleEndLong(byte[] byteArray,
                                      int offset,
                                      long value)

writeLittleEndInt

public static void writeLittleEndInt(byte[] byteArray,
                                     int offset,
                                     int value)

writeLittleEndShort

public static void writeLittleEndShort(byte[] byteArray,
                                       int offset,
                                       int value)

writeBigEndShort

public static void writeBigEndShort(byte[] byteArray,
                                    int offset,
                                    int value)

writeBigEndLong

public static void writeBigEndLong(byte[] byteArray,
                                   int offset,
                                   long value)

as6BitNumber

public static int as6BitNumber(int number)

sleep

public static void sleep(long milliseconds)

getManifestProperty

public static String getManifestProperty(String manifestPropertyName,
                                         String valueIfNotInManifest)

getManifestProperty

public static int getManifestProperty(String manifestPropertyName,
                                      int valueIfNotInManifest)

enumToVector

public static Vector enumToVector(Enumeration drivers)

stringify

public static String stringify(byte[] b)

Sun SPOT API
Green Release  


Copyright © 2006 Sun Microsystems, Inc. All Rights Reserved.