org.biojava3.sequencing.io.fastq
Class SangerFastqReader

java.lang.Object
  extended by org.biojava3.sequencing.io.fastq.SangerFastqReader
All Implemented Interfaces:
FastqReader

public final class SangerFastqReader
extends java.lang.Object

Reader for FastqVariant.FASTQ_SANGER formatted sequences.

Since:
3.0.3

Constructor Summary
SangerFastqReader()
           
 
Method Summary
protected  FastqVariant getVariant()
          Return the FASTQ sequence format variant for this reader.
<R extends java.lang.Readable & java.io.Closeable>
void
parse( supplier, ParseListener listener)
          Parse the specified input supplier.
 java.lang.Iterable<Fastq> read(java.io.File file)
          Read zero or more FASTQ formatted sequences from the specified file.
 java.lang.Iterable<Fastq> read(java.io.InputStream inputStream)
          Read zero or more FASTQ formatted sequences from the specified input stream.
 java.lang.Iterable<Fastq> read(java.net.URL url)
          Read zero or more FASTQ formatted sequences from the specified url.
<R extends java.lang.Readable & java.io.Closeable>
void
stream( supplier, StreamListener listener)
          Stream the specified input supplier.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SangerFastqReader

public SangerFastqReader()
Method Detail

getVariant

protected FastqVariant getVariant()
Return the FASTQ sequence format variant for this reader.

Returns:
the FASTQ sequence format variant for this reader

parse

public final <R extends java.lang.Readable & java.io.Closeable> void parse( supplier,
                                                                          ParseListener listener)
                 throws java.io.IOException
Parse the specified input supplier.

Specified by:
parse in interface FastqReader
Parameters:
supplier - input supplier, must not be null
listener - low-level event based parser callback, must not be null
Throws:
java.io.IOException - if an I/O error occurs

stream

public final <R extends java.lang.Readable & java.io.Closeable> void stream( supplier,
                                                                           StreamListener listener)
                  throws java.io.IOException
Stream the specified input supplier.

Specified by:
stream in interface FastqReader
Parameters:
supplier - input supplier, must not be null
listener - event based reader callback, must not be null
Throws:
java.io.IOException - if an I/O error occurs

read

public final java.lang.Iterable<Fastq> read(java.io.File file)
                                     throws java.io.IOException
Read zero or more FASTQ formatted sequences from the specified file.

Specified by:
read in interface FastqReader
Parameters:
file - file to read from, must not be null
Returns:
zero or more FASTQ formatted sequences read from the specified file
Throws:
java.io.IOException - if an I/O error occurs

read

public final java.lang.Iterable<Fastq> read(java.net.URL url)
                                     throws java.io.IOException
Read zero or more FASTQ formatted sequences from the specified url.

Specified by:
read in interface FastqReader
Parameters:
url - URL to read from, must not be null
Returns:
zero or more FASTQ formatted sequences read from the specified url
Throws:
java.io.IOException - if an I/O error occurs

read

public final java.lang.Iterable<Fastq> read(java.io.InputStream inputStream)
                                     throws java.io.IOException
Read zero or more FASTQ formatted sequences from the specified input stream.

Specified by:
read in interface FastqReader
Parameters:
inputStream - input stream to read from, must not be null
Returns:
zero or more FASTQ formatted sequences read from the specified input stream
Throws:
java.io.IOException - if an I/O error occurs