org.genepattern.io.expr.gct
Class GctParser
java.lang.Object
org.genepattern.io.expr.gct.GctParser
- All Implemented Interfaces:
- IExpressionDataParser
- public class GctParser
- extends java.lang.Object
- implements IExpressionDataParser
Class for reading a gct document 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 gct 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 |
GctParser
public GctParser()
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 gct document. The application can use this method to instruct the
gct reader to begin parsing an gct document from any valid input source.
Applications may not invoke this method while a parse is in proggcts
(they should create a new GctParser instead ). Once a parse is complete,
an application may reuse the same GctParser object, possibly with a
different input source. During the parse, the GctParser will provide
information about the gct 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
|
|