TrueZIP 6.8.2

de.schlichtherle.util.zip
Class UByte

java.lang.Object
  extended by de.schlichtherle.util.zip.UByte

final class UByte
extends Object

Provides constants and static utility methods for unsigned byte integer values (8 bits).

This class is safe for multithreading.

Since:
TrueZIP 6.7
Version:
$Id: UByte.java 5e709f50671d 2010/11/05 11:52:07 christian $
Author:
Christian Schlichtherle

Field Summary
static short MAX_VALUE
          The maximum value of an unsigned byte integer, which is 255.
static short MIN_VALUE
          The minimum value of an unsigned byte integer, which is 0.
static int SIZE
          The number of bits used to represent an unsigned short integer in binary form, which is 8.
 
Constructor Summary
private UByte()
          This class cannot get instantiated.
 
Method Summary
static void check(int i)
          Checks the parameter range.
static void check(int i, String subject, String error)
          Checks the parameter range.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MIN_VALUE

public static final short MIN_VALUE
The minimum value of an unsigned byte integer, which is 0.

See Also:
Constant Field Values

MAX_VALUE

public static final short MAX_VALUE
The maximum value of an unsigned byte integer, which is 255.

See Also:
Constant Field Values

SIZE

public static final int SIZE
The number of bits used to represent an unsigned short integer in binary form, which is 8.

See Also:
Constant Field Values
Constructor Detail

UByte

private UByte()
This class cannot get instantiated.

Method Detail

check

public static void check(int i,
                         String subject,
                         String error)
                  throws IllegalArgumentException
Checks the parameter range.

Parameters:
i - The integer to check to be in the range of an unsigned byte integer (8 bits).
subject - The subject of the exception message - may be null. This should not end with a punctuation character.
error - First sentence of the exception message - may be null. This should not end with a punctuation character.
Throws:
IllegalArgumentException - If i is less than MIN_VALUE or greater than MAX_VALUE.

check

public static void check(int i)
                  throws IllegalArgumentException
Checks the parameter range.

Parameters:
i - The integer to check to be in the range of an unsigned byte integer (8 bits).
Throws:
IllegalArgumentException - If i is less than MIN_VALUE or greater than MAX_VALUE.

TrueZIP 6.8.2

Copyright © 2005-2011 Schlichtherle IT Services. All Rights Reserved.