Class Checksum
java.lang.Object
ecmwf.common.checksum.Checksum
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Checksum.Algorithm
getAlgorithm
(String name) Gets the algorithm.static Checksum
getChecksum
(Checksum.Algorithm algorithm, InputStream in) Gets the checksum.static Checksum
getChecksum
(Checksum.Algorithm algorithm, OutputStream out) Gets the checksum.static Checksum
getChecksum
(String value, Checksum.Algorithm algorithm, InputStream in) Gets the checksum.static Checksum
getChecksum
(String value, Checksum.Algorithm algorithm, OutputStream out) Gets the checksum.abstract InputStream
Gets the input stream.protected abstract InputStream
Gets the native input stream.protected abstract OutputStream
Gets the native output stream.abstract OutputStream
Gets the output stream.abstract String
getValue()
Gets the value.
-
Constructor Details
-
Checksum
public Checksum()
-
-
Method Details
-
getAlgorithm
Gets the algorithm.- Parameters:
name
- the name- Returns:
- the algorithm
- Throws:
NoSuchAlgorithmException
- the no such algorithm exception
-
getChecksum
public static Checksum getChecksum(Checksum.Algorithm algorithm, InputStream in) throws NoSuchAlgorithmException Gets the checksum.- Parameters:
algorithm
- the algorithmin
- the in- Returns:
- the checksum
- Throws:
NoSuchAlgorithmException
- the no such algorithm exception
-
getChecksum
public static Checksum getChecksum(Checksum.Algorithm algorithm, OutputStream out) throws NoSuchAlgorithmException Gets the checksum.- Parameters:
algorithm
- the algorithmout
- the out- Returns:
- the checksum
- Throws:
NoSuchAlgorithmException
- the no such algorithm exception
-
getChecksum
public static Checksum getChecksum(String value, Checksum.Algorithm algorithm, InputStream in) throws NoSuchAlgorithmException Gets the checksum.- Parameters:
value
- the valuealgorithm
- the algorithmin
- the in- Returns:
- the checksum
- Throws:
NoSuchAlgorithmException
- the no such algorithm exception
-
getChecksum
public static Checksum getChecksum(String value, Checksum.Algorithm algorithm, OutputStream out) throws NoSuchAlgorithmException Gets the checksum.- Parameters:
value
- the valuealgorithm
- the algorithmout
- the out- Returns:
- the checksum
- Throws:
NoSuchAlgorithmException
- the no such algorithm exception
-
getNativeInputStream
Gets the native input stream.- Returns:
- the native input stream
-
getInputStream
-
getNativeOutputStream
Gets the native output stream.- Returns:
- the native output stream
-
getOutputStream
-
getValue
-