com.caucho.vfs
Class Crc64InputStream

java.lang.Object
  extended by java.io.InputStream
      extended by com.caucho.vfs.Crc64InputStream
All Implemented Interfaces:
java.io.Closeable

public class Crc64InputStream
extends java.io.InputStream


Constructor Summary
Crc64InputStream(java.io.InputStream next)
           
 
Method Summary
 void close()
          Closes the stream output.
 long getDigest()
          Returns the CRC value.
 long getLength()
           
 int read()
           
 int read(byte[] buffer, int offset, int length)
          Writes a buffer to the underlying stream.
 
Methods inherited from class java.io.InputStream
available, mark, markSupported, read, reset, skip
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Crc64InputStream

public Crc64InputStream(java.io.InputStream next)
Method Detail

getDigest

public long getDigest()
Returns the CRC value.


getLength

public long getLength()

read

public int read()
         throws java.io.IOException
Specified by:
read in class java.io.InputStream
Throws:
java.io.IOException

read

public int read(byte[] buffer,
                int offset,
                int length)
         throws java.io.IOException
Writes a buffer to the underlying stream.

Overrides:
read in class java.io.InputStream
Parameters:
buffer - the byte array to write.
offset - the offset into the byte array.
length - the number of bytes to write.
-
Throws:
java.io.IOException

close

public void close()
           throws java.io.IOException
Closes the stream output.

Specified by:
close in interface java.io.Closeable
Overrides:
close in class java.io.InputStream
Throws:
java.io.IOException