All Downloads are FREE. Search and download functionalities are using the official Maven repository.

htsjdk.samtools.cram.encoding.external.ExternalCodec Maven / Gradle / Ivy

There is a newer version: 4.1.3
Show newest version
package htsjdk.samtools.cram.encoding.external;

import htsjdk.samtools.cram.encoding.CRAMCodec;

import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;

/**
 * Superclass of Codecs which operate on External Block byte streams
 * Contrast with {@link htsjdk.samtools.cram.encoding.core.CoreCodec} for Core Block bit streams
 *
 * @param  data series type to be read or written
 */
abstract class ExternalCodec implements CRAMCodec {
    protected final ByteArrayInputStream inputStream;
    protected final ByteArrayOutputStream outputStream;

    /**
     * Create new ExternalCodec with associated input and output byte streams
     *
     * @param inputStream byte stream for reading input
     * @param outputStream byte stream for writing output
     */
    ExternalCodec(final ByteArrayInputStream inputStream, final ByteArrayOutputStream outputStream) {
        this.inputStream = inputStream;
        this.outputStream = outputStream;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy