Package htsjdk.samtools.cram.io
Class CRC32OutputStream
- java.lang.Object
-
- java.io.OutputStream
-
- java.io.FilterOutputStream
-
- htsjdk.samtools.cram.io.CRC32OutputStream
-
- All Implemented Interfaces:
Closeable
,Flushable
,AutoCloseable
public class CRC32OutputStream extends FilterOutputStream
An output stream that calculates CRC32 checksum of all the bytes written through the stream. The javaCRC32
class is used to internally.
-
-
Field Summary
-
Fields inherited from class java.io.FilterOutputStream
out
-
-
Constructor Summary
Constructors Constructor Description CRC32OutputStream(OutputStream out)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description byte[]
getCrc32_BigEndian()
byte[]
getCrc32_LittleEndian()
long
getLongCrc32()
void
write(byte[] b)
void
write(byte[] b, int off, int length)
void
write(int b)
-
Methods inherited from class java.io.FilterOutputStream
close, flush
-
Methods inherited from class java.io.OutputStream
nullOutputStream
-
-
-
-
Constructor Detail
-
CRC32OutputStream
public CRC32OutputStream(OutputStream out)
-
-
Method Detail
-
write
public void write(byte[] b, int off, int length) throws IOException
- Overrides:
write
in classFilterOutputStream
- Throws:
IOException
-
write
public void write(int b) throws IOException
- Overrides:
write
in classFilterOutputStream
- Throws:
IOException
-
write
public void write(byte[] b) throws IOException
- Overrides:
write
in classFilterOutputStream
- Throws:
IOException
-
getLongCrc32
public long getLongCrc32()
-
getCrc32_BigEndian
public byte[] getCrc32_BigEndian()
-
getCrc32_LittleEndian
public byte[] getCrc32_LittleEndian()
-
-