fr.dyade.aaa.util

Class Ubyte


public class Ubyte
extends java.lang.Object

Provides a kind of unsigned byte functionality.

Method Summary

static byte
signedValue(int b)
Gives the Byte value of an unsigned byte value.
static String
toHexString(byte b)
Gives the hexa representation of unsigned value of the byte.
static String
toHexString(byte[] buffer, int start, int stop)
Gives the hexa representation of an array of bytes.
static String
toHexString(byte[] buffer, int start, int stop, int bytesInBlock, String blockHeader, int blocksInLine, String lineHeader, int current)
static int
unsignedValue(byte b)
Gives the unsigned value of a byte.

Method Details

signedValue

public static byte signedValue(int b)
Gives the Byte value of an unsigned byte value.


toHexString

public static String toHexString(byte b)
Gives the hexa representation of unsigned value of the byte.


toHexString

public static String toHexString(byte[] buffer,
                                 int start,
                                 int stop)
Gives the hexa representation of an array of bytes.

Parameters:
buffer - array of bytes to print
start - index of first byte to print in buffer
stop - index of first byte not to print in buffer


toHexString

public static String toHexString(byte[] buffer,
                                 int start,
                                 int stop,
                                 int bytesInBlock,
                                 String blockHeader,
                                 int blocksInLine,
                                 String lineHeader,
                                 int current)


unsignedValue

public static int unsignedValue(byte b)
Gives the unsigned value of a byte.


Copyright B) 2004 Scalagent - All rights reserved