com.google.clearsilver.jsilver.data
Class DefaultHdfParser

java.lang.Object
  extended by com.google.clearsilver.jsilver.data.DefaultHdfParser
All Implemented Interfaces:
Parser

public class DefaultHdfParser
extends Object
implements Parser

Parses data in HierachicalDataFormat (HDF), generating callbacks for data encountered in the stream.


Nested Class Summary
 
Nested classes/interfaces inherited from interface com.google.clearsilver.jsilver.data.Parser
Parser.ErrorHandler
 
Constructor Summary
DefaultHdfParser()
           
 
Method Summary
static ParserFactory newFactory()
          Returns a factory object that constructs DefaultHdfParser objects.
 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultHdfParser

public DefaultHdfParser()
Method Detail

parse

public void parse(Reader reader,
                  Data output,
                  Parser.ErrorHandler errorHandler,
                  ResourceLoader resourceLoader,
                  String dataFileName,
                  boolean ignoreAttributes)
           throws IOException
Description copied from interface: Parser
Reads in a stream of characters and parses data from it, putting it into the given Data object.

Specified by:
parse in interface Parser
Parameters:
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.
Throws:
IOException - when errors occur reading input.

newFactory

public static ParserFactory newFactory()
Returns a factory object that constructs DefaultHdfParser objects.



Copyright © 2010-2012 Google. All Rights Reserved.