com.google.clearsilver.jsilver.data
Interface Parser

All Known Implementing Classes:
DefaultHdfParser, NewHdfParser

public interface Parser

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


Nested Class Summary
static interface Parser.ErrorHandler
          Called whenever an error occurs.
 
Method Summary
 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.
 

Method Detail

parse

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

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.


Copyright © 2010-2012 Google. All Rights Reserved.