TrueZIP 6.8.3

de.schlichtherle.util.zip
Class UInt

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

final class UInt
extends Object

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

This class is safe for multithreading.

Since:
TrueZIP 6.7
Author:
Christian Schlichtherle

Field Summary
static long MAX_VALUE
          The maximum value of an unsigned integer, which is 4294967295L.
static long MIN_VALUE
          The minimum value of an unsigned integer, which is 0L.
static int SIZE
          The number of bits used to represent an unsigned integer in binary form, which is 32.
 
Constructor Summary
private UInt()
          This class cannot get instantiated.
 
Method Summary
static void check(long l)
          Checks the parameter range.
static void check(long l, 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 long MIN_VALUE
The minimum value of an unsigned integer, which is 0L.

See Also:
Constant Field Values

MAX_VALUE

public static final long MAX_VALUE
The maximum value of an unsigned integer, which is 4294967295L.

See Also:
Constant Field Values

SIZE

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

See Also:
Constant Field Values
Constructor Detail

UInt

private UInt()
This class cannot get instantiated.

Method Detail

check

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

Parameters:
l - The long integer to check to be in the range of an unsigned integer (32 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 l is less than MIN_VALUE or greater than MAX_VALUE.

check

public static void check(long l)
                  throws IllegalArgumentException
Checks the parameter range.

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

TrueZIP 6.8.3

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