Copyright (C) 2003,2004 dr. Cristiano Sadun

org.sadun.text.ffp
Interface FFPFactory.FFPStreamParser

Enclosing interface:
FFPFactory

public static interface FFPFactory.FFPStreamParser

This interface allows users to define their own syntax for conditionsand line formatspecifications.

Version:
1.0
Author:
Cristiano Sadun

Method Summary
 LineFormat getLineFormat(FlatFileParser.Condition condition)
          Given a condition, return the associated line format.
 FlatFileParser.Condition[] parseStream(java.io.InputStream is)
          Interpret the stream and extract conditions and associated line formats, storing them.
 void reset()
          Reset the parser so that a new parsing can occur.
 

Method Detail

parseStream

public FlatFileParser.Condition[] parseStream(java.io.InputStream is)
                                       throws java.io.IOException,
                                              FFPStreamParseException
Interpret the stream and extract conditions and associated line formats, storing them. Return an array of parsed conditions.

Parameters:
is - the stream from which to read.
Returns:
an array of parsed conditions.
Throws:
ParseException - if an error occurs during parsing
java.io.IOException
FFPStreamParseException

getLineFormat

public LineFormat getLineFormat(FlatFileParser.Condition condition)
Given a condition, return the associated line format.

Parameters:
condition - the key FlatFileParser.Condition
Returns:
the associated LineFormat.

reset

public void reset()
Reset the parser so that a new parsing can occur.


Copyright (C) 2003,2004 dr. Cristiano Sadun