public class NewHdfParser extends Object implements Parser
Parser.ErrorHandler
Constructor and Description |
---|
NewHdfParser(StringInternStrategy internPool)
Constructor for
NewHdfParser . |
Modifier and Type | Method and Description |
---|---|
static ParserFactory |
newFactory(StringInternStrategy stringInternStrategy)
Creates a
ParserFactory instance. |
void |
parse(Reader reader,
Data output,
Parser.ErrorHandler errorHandler,
ResourceLoader resourceLoader,
String dataFileName,
boolean ignoreAttributes)
Reads in a stream of characters and parses data from it, putting it into the given Data object.
|
public NewHdfParser(StringInternStrategy internPool)
NewHdfParser
.internPool
- - StringInternStrategy
instance used to optimize the HDF parsing.public static ParserFactory newFactory(StringInternStrategy stringInternStrategy)
ParserFactory
instance.
Provided stringInternStrategy
instance will be used by shared all Parser
objects created by the factory and used to optimize the HDF parsing process by reusing the
String for keys and values.
stringInternStrategy
- - StringInternStrategy
instance used to optimize the HDF
parsing.ParserFactory
implementation.public void parse(Reader reader, Data output, Parser.ErrorHandler errorHandler, ResourceLoader resourceLoader, String dataFileName, boolean ignoreAttributes) throws IOException
Parser
parse
in interface Parser
reader
- Reader used to read in the formatted data.output
- Data object that the read data structure will be dumped into.errorHandler
- Error callback to be called on any error.resourceLoader
- ResourceLoader to use to read in included files.dataFileName
- Name of a file that is read with reader. It is needed for the purpose of
handling include loops and error messages.ignoreAttributes
- whether to store parsed HDF attributes in the Data object or not.IOException
- when errors occur reading input.Copyright © 2010–2013 Google. All rights reserved.