TrueZIP 6.8.3

de.schlichtherle.util.zip
Class UShort

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

final class UShort
extends Object

Provides constants and static utility methods for unsigned short integer values (16 bits).

This class is safe for multithreading.

Since:
TrueZIP 6.7
Author:
Christian Schlichtherle

Field Summary
static int MAX_VALUE
          The maximum value of an unsigned short integer, which is 65535.
static int MIN_VALUE
          The minimum value of an unsigned short integer, which is 0.
static int SIZE
          The number of bits used to represent an unsigned short integer in binary form, which is 16.
 
Constructor Summary
private UShort()
          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 int MIN_VALUE
The minimum value of an unsigned short integer, which is 0.

See Also:
Constant Field Values

MAX_VALUE

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

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 16.

See Also:
Constant Field Values
Constructor Detail

UShort

private UShort()
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 short integer (16 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 short integer (16 bits).
Throws:
IllegalArgumentException - If i is less than MIN_VALUE or greater than MAX_VALUE.

TrueZIP 6.8.3

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