Class ExternalByteArrayCodec
- java.lang.Object
-
- htsjdk.samtools.cram.encoding.external.ExternalCodec<byte[]>
-
- htsjdk.samtools.cram.encoding.external.ExternalByteArrayCodec
-
- All Implemented Interfaces:
CRAMCodec<byte[]>
public class ExternalByteArrayCodec extends ExternalCodec<byte[]>
Encode Byte Arrays using an External Data Block
-
-
Field Summary
-
Fields inherited from class htsjdk.samtools.cram.encoding.external.ExternalCodec
inputStream, outputStream
-
-
Constructor Summary
Constructors Constructor Description ExternalByteArrayCodec(ByteArrayInputStream inputStream, ByteArrayOutputStream outputStream)Construct an External Codec for Byte Arrays
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description byte[]read()Read a single object from the streambyte[]read(int length)Read a array of specified length from the streamvoidwrite(byte[] object)Write an object to the stream
-
-
-
Constructor Detail
-
ExternalByteArrayCodec
public ExternalByteArrayCodec(ByteArrayInputStream inputStream, ByteArrayOutputStream outputStream)
Construct an External Codec for Byte Arrays- Parameters:
inputStream- the input bytestream to read fromoutputStream- the output bytestream to write to
-
-
Method Detail
-
read
public byte[] read(int length)
Description copied from interface:CRAMCodecRead a array of specified length from the stream- Parameters:
length- the number of elements to read- Returns:
- an object from the stream
-
write
public void write(byte[] object)
Description copied from interface:CRAMCodecWrite an object to the stream- Parameters:
object- the object to write
-
read
public byte[] read()
Description copied from interface:CRAMCodecRead a single object from the stream- Returns:
- an object from the stream
-
-