org.genepattern.io.expr
Interface IExpressionDataParser

All Known Implementing Classes:
CdtParser, GctParser, ResParser

public interface IExpressionDataParser

Interface for reading expression data documents using callbacks.


Method Summary
 boolean canDecode(java.io.InputStream is)
          Returns true if this parser can claims to be able to decode the given stream upon brief examination, false otherwise
 void parse(java.io.InputStream is)
          Parse a document.
 void setHandler(IExpressionDataHandler h)
          Sets the handler that will receive events
 

Method Detail

setHandler

public void setHandler(IExpressionDataHandler h)
Sets the handler that will receive events

Parameters:
h - The new handler value

canDecode

public boolean canDecode(java.io.InputStream is)
                  throws java.io.IOException
Returns true if this parser can claims to be able to decode the given stream upon brief examination, false otherwise

Parameters:
is - The input stream
Returns:
Whether this parser can decode the given stream
Throws:
java.io.IOException - If an error occurs while reading from the stream

parse

public void parse(java.io.InputStream is)
           throws ParseException,
                  java.io.IOException
Parse a document. The application can use this method to instruct the parser to begin parsing a document from any valid input source. Applications may not invoke this method while a parse is in progress (they should create a new parser instead). Once a parse is complete, an application may reuse the same parser object, possibly with a different input source. During the parse, the parser will provide information about the document through the registered event handler. This method is synchronous: it will not return until parsing has ended. If a client application wants to terminate parsing early, it should throw an exception.

Parameters:
is - The input stream
Throws:
ParseException - - Any parse exception, possibly wrapping another exception.
java.io.IOException - - An IO exception from the parser, possibly from a byte stream or character stream supplied by the application.


Hosted by docs.bugaco.com