public class ContainerIO
extends java.lang.Object
Constructor and Description |
---|
ContainerIO() |
Modifier and Type | Method and Description |
---|---|
static Container |
readContainer(Version version,
CountingInputStream countingInputStream)
Reads a CRAM container from a Counting input stream.
|
static Container |
readContainer(Version version,
SeekableStream seekableInputStream)
Reads a CRAM container from a Seekable input stream.
|
static int |
writeContainer(Version version,
Container container,
java.io.OutputStream outputStream)
Writes a complete
Container with it's header to a OutputStream . |
public static Container readContainer(Version version, SeekableStream seekableInputStream)
version
- CRAM version to expectseekableInputStream
- the SeekableStream
stream to read frompublic static Container readContainer(Version version, CountingInputStream countingInputStream)
version
- CRAM version to expectcountingInputStream
- the CountingInputStream
stream to read frompublic static int writeContainer(Version version, Container container, java.io.OutputStream outputStream)
Container
with it's header to a OutputStream
. The method is aware of file header containers and is
suitable for general purpose use: basically any container is allowed.version
- the CRAM version to assumecontainer
- the container to writeoutputStream
- the stream to write to