Copyright (C) 2003,2004 dr. Cristiano Sadun

org.sadun.text.ffp
Class FFPFactory

java.lang.Object
  extended byorg.sadun.text.ffp.FFPFactory

public class FFPFactory
extends java.lang.Object

This class creates FlatFileParserobjects by loading conditions and line format definitions from properly formatted stream, URL or file.

Version:
1.0
Author:
Cristiano Sadun

Nested Class Summary
static interface FFPFactory.FFPStreamParser
          This interface allows users to define their own syntax for conditionsand line formatspecifications.
 
Constructor Summary
FFPFactory()
           
FFPFactory(FFPFactory.FFPStreamParser parser)
           
 
Method Summary
 FlatFileParser createFFP(java.io.InputStream is)
          Create a single FlatFileParserreading the given stream.
 FlatFileParser createFFP(java.net.URL url)
           
static void main(java.lang.String[] args)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FFPFactory

public FFPFactory()

FFPFactory

public FFPFactory(FFPFactory.FFPStreamParser parser)
Method Detail

createFFP

public FlatFileParser createFFP(java.io.InputStream is)
                         throws FFPStreamParseException,
                                java.io.IOException
Create a single FlatFileParserreading the given stream.

Parameters:
is - the input stream containing the condition/format definitions
Returns:
a FlatFileParserinitialized accordingly.
Throws:
ParseException - if a problem occurs parsing the stream
java.io.IOException - if a problem occurs reading or closing the stream.
FFPStreamParseException

createFFP

public FlatFileParser createFFP(java.net.URL url)
                         throws FFPStreamParseException,
                                java.io.IOException
Throws:
FFPStreamParseException
java.io.IOException

main

public static void main(java.lang.String[] args)
                 throws java.lang.Exception
Throws:
java.lang.Exception

Copyright (C) 2003,2004 dr. Cristiano Sadun