net.sf.cb2java.copybook
Class CopybookParser

java.lang.Object
  extended bynet.sf.cb2java.copybook.CopybookParser

public class CopybookParser
extends java.lang.Object

This class is the starting point for parsing copybooks

To parse or create data, you need to first parse the copybook. The returned CopyBook instance will allow for working with data.

Author:
James Watson

Constructor Summary
CopybookParser()
           
 
Method Summary
static Copybook parse(java.lang.String name, java.io.InputStream stream)
          Parses a copybook defintion and returns a Copybook instance
static Copybook parse(java.lang.String name, java.io.Reader reader)
          Parses a copybook defintion and returns a Copybook instance
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CopybookParser

public CopybookParser()
Method Detail

parse

public static Copybook parse(java.lang.String name,
                             java.io.InputStream stream)
Parses a copybook defintion and returns a Copybook instance

Parameters:
name - the name of the copybook. For future use.
stream - the copybook definiton's source stream
Returns:
a copybook instance containg the parse tree for the definition

parse

public static Copybook parse(java.lang.String name,
                             java.io.Reader reader)
Parses a copybook defintion and returns a Copybook instance

Parameters:
name - the name of the copybook. For future use.
reader - the copybook definiton's source reader
Returns:
a copybook instance containg the parse tree for the definition