uk.org.ogsadai.activity.transform
Class ChecksumConverter
java.lang.Object
|
+--uk.org.ogsadai.activity.transform.ChecksumConverter
- public class ChecksumConverter
- extends java.lang.Object
A helper class to convert Checksum
objects into String
representations. This could be rewritten in a far more generalised form.
- Author:
- The OGSA-DAI Project Team
Field Summary |
static java.lang.String |
ADLER_32
String representation of the Adler32 checksum type. |
private static java.lang.String |
COPYRIGHT_NOTICE
Copyright statement |
static java.lang.String |
CRC_32
String representation of the CRC32 checksum type. |
static java.lang.String |
NONE
String representing no checksum. |
Method Summary |
static java.lang.String |
convert(java.util.zip.Checksum checksum)
Converts the specified Checksum into a corresponding String . |
static java.util.zip.Checksum |
convert(java.lang.String checksumName)
Converts the specified String representation of a checksum into a corresponding Checksum type. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
COPYRIGHT_NOTICE
private static final java.lang.String COPYRIGHT_NOTICE
-
Copyright statement
- See Also:
- Constant Field Values
ADLER_32
public static final java.lang.String ADLER_32
-
String representation of the Adler32 checksum type.
- See Also:
- Constant Field Values
CRC_32
public static final java.lang.String CRC_32
-
String representation of the CRC32 checksum type.
- See Also:
- Constant Field Values
NONE
public static final java.lang.String NONE
-
String representing no checksum.
- See Also:
- Constant Field Values
ChecksumConverter
public ChecksumConverter()
convert
public static java.lang.String convert(java.util.zip.Checksum checksum)
-
Converts the specified
Checksum
into a corresponding String
.
-
- Parameters:
checksum
- The Checksum
to convert.
- Returns:
- a
String
representation or null
if there is no known representation.
convert
public static java.util.zip.Checksum convert(java.lang.String checksumName)
-
Converts the specified
String
representation of a checksum into a corresponding Checksum
type.
-
- Parameters:
checksumName
- The String
representation of the checksum.
- Returns:
- a
Checksum
object or null
if there is no corresponding object.