com.caucho.vfs
Class Crc64OutputStream
java.lang.Object
java.io.OutputStream
com.caucho.vfs.Crc64OutputStream
- All Implemented Interfaces:
- java.io.Closeable, java.io.Flushable
public class Crc64OutputStream
- extends java.io.OutputStream
Method Summary |
void |
close()
Closes the stream output. |
long |
getDigest()
Returns the CRC value. |
void |
write(byte[] buffer,
int offset,
int length)
Writes a buffer to the underlying stream. |
void |
write(int data)
|
Methods inherited from class java.io.OutputStream |
flush, write |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Crc64OutputStream
public Crc64OutputStream(java.io.OutputStream next)
getDigest
public long getDigest()
- Returns the CRC value.
write
public void write(int data)
throws java.io.IOException
- Specified by:
write
in class java.io.OutputStream
- Throws:
java.io.IOException
write
public void write(byte[] buffer,
int offset,
int length)
throws java.io.IOException
- Writes a buffer to the underlying stream.
- Overrides:
write
in class java.io.OutputStream
- 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.OutputStream
- Throws:
java.io.IOException