picard.illumina.parser.fakers.BclFileFaker Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of picard Show documentation
Show all versions of picard Show documentation
A set of command line tools (in Java) for manipulating high-throughput sequencing (HTS) data and formats such as SAM/BAM/CRAM and VCF.
package picard.illumina.parser.fakers;
import java.nio.ByteBuffer;
public class BclFileFaker extends FileFaker {
@Override
public void fakeFile(final ByteBuffer buffer) {
// Write the number of elements to the header. The state variable "size" contains
// the number of elements; we've allocated "size" plus the size of the header
// (four bytes) to the buffer.
buffer.putInt(size);
while (size > 0) {
// Fill the file with no calls
buffer.put((byte) 0);
size--;
}
}
@Override
protected boolean addLeadingZeros() {
return false;
}
protected int bufferSize() {
return size + 4;
}
}