uk.ac.sanger.npg.illumina.file.reader
Class BCLFileReader

java.lang.Object
  extended by uk.ac.sanger.npg.illumina.file.reader.IlluminaFileReader
      extended by uk.ac.sanger.npg.illumina.file.reader.BCLFileReader
All Implemented Interfaces:
java.io.Closeable, java.util.Iterator<java.lang.Object>

public class BCLFileReader
extends IlluminaFileReader

This class is a reader of a bcl file


Field Summary
 
Fields inherited from class uk.ac.sanger.npg.illumina.file.reader.IlluminaFileReader
fileName, inputStream
 
Constructor Summary
BCLFileReader(java.lang.String bclFileName)
          constructor to generate bcl file input stream and read the number of clusters
 
Method Summary
 int getCurrentCluster()
           
 int getTotalClusters()
           
 boolean hasNext()
          check any more clusters in the file stream
static void main(java.lang.String[] args)
           
 byte[] next()
          get base and quality for next cluster
 
Methods inherited from class uk.ac.sanger.npg.illumina.file.reader.IlluminaFileReader
close, getFileName, readFourBytes, readFourBytes, remove
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BCLFileReader

public BCLFileReader(java.lang.String bclFileName)
              throws java.lang.Exception
constructor to generate bcl file input stream and read the number of clusters

Parameters:
bclFileName - bcl file name
Throws:
java.lang.Exception
Method Detail

hasNext

public boolean hasNext()
check any more clusters in the file stream

Specified by:
hasNext in interface java.util.Iterator<java.lang.Object>
Overrides:
hasNext in class IlluminaFileReader
Returns:
true if there is next cluster available

next

public byte[] next()
get base and quality for next cluster

Specified by:
next in interface java.util.Iterator<java.lang.Object>
Overrides:
next in class IlluminaFileReader
Returns:
byte [] base byte for the first element and quality byte as the second element

getCurrentCluster

public int getCurrentCluster()
Returns:
the currentCluster

getTotalClusters

public int getTotalClusters()
Returns:
the totalClusters

main

public static void main(java.lang.String[] args)
                 throws java.lang.Exception
Parameters:
args -
Throws:
java.lang.Exception