org.genepattern.io.expr.res
Class ResParser

java.lang.Object
  extended byorg.genepattern.io.expr.res.ResParser
All Implemented Interfaces:
IExpressionDataParser

public class ResParser
extends java.lang.Object
implements IExpressionDataParser

Class for reading a res document using callbacks.


Constructor Summary
ResParser()
           
 
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 res document.
 void setHandler(IExpressionDataHandler handler)
          Sets the handler that will receive events
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ResParser

public ResParser()
Method Detail

canDecode

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

Specified by:
canDecode in interface IExpressionDataParser
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 res document. The application can use this method to instruct the res reader to begin parsing an res document from any valid input source. Applications may not invoke this method while a parse is in progress (they should create a new ResParser instead ). Once a parse is complete, an application may reuse the same ResParser object, possibly with a different input source. During the parse, the ResParser will provide information about the res 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.

Specified by:
parse in interface IExpressionDataParser
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.

setHandler

public void setHandler(IExpressionDataHandler handler)
Description copied from interface: IExpressionDataParser
Sets the handler that will receive events

Specified by:
setHandler in interface IExpressionDataParser
Parameters:
handler - The new handler value


Hosted by docs.bugaco.com