public class FSDigestInputStream extends FSInputStream
FSInputStream implementation that can verify a
MessageDigest and will count the number of bytes read for use in progress status.| Constructor and Description |
|---|
FSDigestInputStream(java.io.InputStream inputStream,
java.security.MessageDigest messageDigest,
java.lang.String digestHex)
Constructor FSDigestInputStream creates a new FSDigestInputStream instance.
|
FSDigestInputStream(java.io.InputStream inputStream,
java.lang.String digestHex)
Constructor FSDigestInputStream creates a new FSDigestInputStream instance.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
long |
getPos() |
int |
read() |
int |
read(byte[] b,
int off,
int len) |
void |
seek(long pos) |
boolean |
seekToNewSource(long targetPos) |
public FSDigestInputStream(java.io.InputStream inputStream, java.lang.String digestHex) throws java.io.IOException
inputStream - of type InputStreamdigestHex - of type Stringjava.io.IOException - if unable to get md5 digestpublic FSDigestInputStream(java.io.InputStream inputStream, java.security.MessageDigest messageDigest, java.lang.String digestHex)
inputStream - of type InputStreammessageDigest - of type MessageDigestdigestHex - of type Stringpublic int read() throws java.io.IOException
java.io.IOExceptionpublic int read(byte[] b, int off, int len) throws java.io.IOException
java.io.IOExceptionpublic void close() throws java.io.IOException
java.io.IOExceptionpublic void seek(long pos) throws java.io.IOException
java.io.IOExceptionpublic long getPos() throws java.io.IOException
java.io.IOExceptionpublic boolean seekToNewSource(long targetPos) throws java.io.IOException
java.io.IOExceptionCopyright © 2007-2021 Cascading Maintainers. All Rights Reserved.