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

picard.illumina.parser.fakers.BclFileFaker Maven / Gradle / Ivy

Go to download

A set of command line tools (in Java) for manipulating high-throughput sequencing (HTS) data and formats such as SAM/BAM/CRAM and VCF.

There is a newer version: 3.2.0
Show newest version
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;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy