cascading.tap.hadoop
Class FSDigestInputStream

java.lang.Object
  extended by FSInputStream
      extended by cascading.tap.hadoop.FSDigestInputStream

public class FSDigestInputStream
extends FSInputStream

Class FSDigestInputStream is an FSInputStream implementation that can verify a MessageDigest and will count the number of bytes read for use in progress status.


Constructor Summary
FSDigestInputStream(InputStream inputStream, MessageDigest messageDigest, String digestHex)
          Constructor FSDigestInputStream creates a new FSDigestInputStream instance.
FSDigestInputStream(InputStream inputStream, String digestHex)
          Constructor FSDigestInputStream creates a new FSDigestInputStream instance.
 
Method Summary
 void close()
           
 long getPos()
           
 int read()
           
 int read(byte[] b, int off, int len)
           
 void seek(long pos)
           
 boolean seekToNewSource(long targetPos)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FSDigestInputStream

public FSDigestInputStream(InputStream inputStream,
                           String digestHex)
                    throws IOException
Constructor FSDigestInputStream creates a new FSDigestInputStream instance.

Parameters:
inputStream - of type InputStream
digestHex - of type String
Throws:
IOException - when

FSDigestInputStream

public FSDigestInputStream(InputStream inputStream,
                           MessageDigest messageDigest,
                           String digestHex)
Constructor FSDigestInputStream creates a new FSDigestInputStream instance.

Parameters:
inputStream - of type InputStream
messageDigest - of type MessageDigest
digestHex - of type String
Method Detail

read

public int read()
         throws IOException
Throws:
IOException

read

public int read(byte[] b,
                int off,
                int len)
         throws IOException
Throws:
IOException

close

public void close()
           throws IOException
Throws:
IOException

seek

public void seek(long pos)
          throws IOException
Throws:
IOException

getPos

public long getPos()
            throws IOException
Throws:
IOException

seekToNewSource

public boolean seekToNewSource(long targetPos)
                        throws IOException
Throws:
IOException


Copyright © 2007-2008 Concurrent, Inc. All Rights Reserved.