Class Checksum
java.lang.Object
ecmwf.common.checksum.Checksum
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Checksum.AlgorithmgetAlgorithm(String name) Gets the algorithm.static ChecksumgetChecksum(Checksum.Algorithm algorithm, InputStream in) Gets the checksum.static ChecksumgetChecksum(Checksum.Algorithm algorithm, OutputStream out) Gets the checksum.static ChecksumgetChecksum(String value, Checksum.Algorithm algorithm, InputStream in) Gets the checksum.static ChecksumgetChecksum(String value, Checksum.Algorithm algorithm, OutputStream out) Gets the checksum.abstract InputStreamGets the input stream.protected abstract InputStreamGets the native input stream.protected abstract OutputStreamGets the native output stream.abstract OutputStreamGets the output stream.abstract StringgetValue()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
-