uk.org.ogsadai.client.toolkit.activity.transform
Class ZIPChecksum

java.lang.Object
  |
  +--uk.org.ogsadai.client.toolkit.activity.transform.ZIPChecksum

public class ZIPChecksum
extends java.lang.Object

An enumerated type representing a ZIP checksum type - Adler or CRC.

Author:
The OGSA-DAI Project Team

Field Summary
static ZIPChecksum ADLER
          Adler checksum.
private static java.lang.String COPYRIGHT_NOTICE
          Copyright statement
static ZIPChecksum CRC
          CRC checksum.
private  java.lang.String mType
          The current checksum type.
 
Constructor Summary
private ZIPChecksum(java.lang.String type)
          Create a ZIPChecksum of the specified type.
 
Method Summary
 java.lang.String getAsString()
          Return the checksum type as a string - either adler32 or crc32.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

COPYRIGHT_NOTICE

private static final java.lang.String COPYRIGHT_NOTICE
Copyright statement

See Also:
Constant Field Values

ADLER

public static final ZIPChecksum ADLER
Adler checksum.


CRC

public static final ZIPChecksum CRC
CRC checksum.


mType

private final java.lang.String mType
The current checksum type.

Constructor Detail

ZIPChecksum

private ZIPChecksum(java.lang.String type)
Create a ZIPChecksum of the specified type.

Parameters:
type - Either ZIPChecksum.ADLER for Adler or ZIPChecksum.CRC for CRC.
Throws:
java.lang.IllegalArgumentException - If type is neither of the two alternatives above.
Method Detail

getAsString

public java.lang.String getAsString()
Return the checksum type as a string - either adler32 or crc32.

Returns:
type

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object