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

htsjdk.samtools.cram.encoding.external.ExternalEncoding 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.CRAMEncoding;
import htsjdk.samtools.cram.io.ITF8;
import htsjdk.samtools.cram.structure.EncodingID;

public abstract class ExternalEncoding extends CRAMEncoding {
    protected final int externalBlockContentId;

    protected ExternalEncoding(final int externalBlockContentId) {
        super(EncodingID.EXTERNAL);
        this.externalBlockContentId = externalBlockContentId;
    }

    @Override
    public byte[] toSerializedEncodingParams() {
        return ITF8.writeUnsignedITF8(externalBlockContentId);
    }

    @Override
    public String toString() {
        return String.format("Content ID: %d", externalBlockContentId);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy