|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.flatpack.brparse.BuffReaderParseFactory
public class BuffReaderParseFactory
Provides a PZParser which obtains records directly from a BufferedReader as an alternative to reading the entire file into memory. Database column mappings are not supported by this factory at the present time. This class is meant to mimic the LargeDataSet class of pre 3.0 versions, which did not support database mappings either. A RuntimeExcpetion will be thrown if trying to obtain a parser for a database map.
Constructor Summary | |
---|---|
BuffReaderParseFactory()
|
Method Summary | |
---|---|
static ParserFactory |
getInstance()
|
Parser |
newDelimitedParser(java.sql.Connection con,
java.io.InputStream dataSourceStream,
java.lang.String dataDefinition,
char delimiter,
char qualifier,
boolean ignoreFirstRecord)
Not supported at this time. |
Parser |
newDelimitedParser(java.sql.Connection con,
java.io.Reader dataSource,
java.lang.String dataDefinition,
char delimiter,
char qualifier,
boolean ignoreFirstRecord)
Not supported at this time. |
Parser |
newDelimitedParser(java.io.File dataSource,
char delimiter,
char qualifier)
Constructs a new DataSet using the first line of data found in the text file as the column names. |
Parser |
newDelimitedParser(java.io.File pzmapXML,
java.io.File dataSource,
char delimiter,
char qualifier,
boolean ignoreFirstRecord)
Constructs a new DataSet using the PZMAP XML file layout method. |
Parser |
newDelimitedParser(java.io.InputStream dataSourceStream,
char delimiter,
char qualifier)
Constructs a new DataSet using the first line of data found in the text file as the column names. |
Parser |
newDelimitedParser(java.io.InputStream pzmapXMLStream,
java.io.InputStream dataSourceStream,
char delimiter,
char qualifier,
boolean ignoreFirstRecord)
New constructor based on InputStream. |
Parser |
newDelimitedParser(java.io.Reader dataSource,
char delimiter,
char qualifier)
Constructs a new DataSet using the first line of data found in the text file as the column names. |
Parser |
newDelimitedParser(java.io.Reader pzmapXML,
java.io.Reader dataSource,
char delimiter,
char qualifier,
boolean ignoreFirstRecord)
Constructs a new DataSet using the PZMAP XML file layout method. |
Parser |
newFixedLengthParser(java.sql.Connection con,
java.io.File dataSource,
java.lang.String dataDefinition)
Not supported at this time. |
Parser |
newFixedLengthParser(java.sql.Connection con,
java.io.InputStream dataSourceStream,
java.lang.String dataDefinition)
Not supported at this time. |
Parser |
newFixedLengthParser(java.sql.Connection con,
java.io.Reader dataSource,
java.lang.String dataDefinition)
Not supported at this time. |
Parser |
newFixedLengthParser(java.io.File pzmapXML,
java.io.File dataSource)
Constructs a new DataSet using the PZMAP XML file layout method. |
Parser |
newFixedLengthParser(java.io.InputStream pzmapXMLStream,
java.io.InputStream dataSourceStream)
New constructor based on InputStream. |
Parser |
newFixedLengthParser(java.io.Reader pzmapXMLStream,
java.io.Reader dataSource)
New constructor based on Reader. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public BuffReaderParseFactory()
Method Detail |
---|
public static ParserFactory getInstance()
public Parser newFixedLengthParser(java.sql.Connection con, java.io.File dataSource, java.lang.String dataDefinition)
newFixedLengthParser
in interface ParserFactory
con
- -
Connection to database with DATAFILE and DATASTRUCTURE tables,
user is responsible for closing it.dataSource
- -
Fixed length file to read fromdataDefinition
- -
Name of dataDefinition in the DATAFILE table DATAFILE_DESC
column
public Parser newFixedLengthParser(java.sql.Connection con, java.io.InputStream dataSourceStream, java.lang.String dataDefinition)
newFixedLengthParser
in interface ParserFactory
con
- -
Connection to database with DATAFILE and DATASTRUCTURE tables,
user is responsible for closing it.dataSourceStream
- -
text file datasource InputStream to read fromdataDefinition
- -
Name of dataDefinition in the DATAFILE table DATAFILE_DESC
column
public Parser newFixedLengthParser(java.io.File pzmapXML, java.io.File dataSource)
ParserFactory
newFixedLengthParser
in interface ParserFactory
pzmapXML
- -
Reference to the xml file holding the pzmapdataSource
- -
Delimited file to read from
public Parser newFixedLengthParser(java.sql.Connection con, java.io.Reader dataSource, java.lang.String dataDefinition)
newFixedLengthParser
in interface ParserFactory
con
- -
Connection to database with DATAFILE and DATASTRUCTURE tables,
user is responsible for closing it.dataSource
- -
Fixed length file to read fromdataDefinition
- -
Name of dataDefinition in the DATAFILE table DATAFILE_DESC
column
public Parser newFixedLengthParser(java.io.Reader pzmapXMLStream, java.io.Reader dataSource)
ParserFactory
newFixedLengthParser
in interface ParserFactory
pzmapXMLStream
- -
Reference to the xml Reader holding the pzmap, user
must close them after use.dataSource
- -
Delimited file Reader to read from, user must close them
after use.
public Parser newFixedLengthParser(java.io.InputStream pzmapXMLStream, java.io.InputStream dataSourceStream)
ParserFactory
newFixedLengthParser
in interface ParserFactory
pzmapXMLStream
- -
Reference to the xml file InputStream holding the pzmap, user
must close them after use.dataSourceStream
- -
Delimited file InputStream to read from, user must close them
after use.
public Parser newDelimitedParser(java.sql.Connection con, java.io.InputStream dataSourceStream, java.lang.String dataDefinition, char delimiter, char qualifier, boolean ignoreFirstRecord)
newDelimitedParser
in interface ParserFactory
con
- -
Connection to database with DATAFILE and DATASTRUCTURE tables,
user must close it when done.dataSourceStream
- -
text file datasource InputStream to read from, user must close
it when done.dataDefinition
- -
Name of dataDefinition in the DATAFILE table DATAFILE_DESC
columndelimiter
- -
Char the file is delimited Byqualifier
- -
Char text is qualified byignoreFirstRecord
- -
skips the first line that contains data in the file
public Parser newDelimitedParser(java.io.File pzmapXML, java.io.File dataSource, char delimiter, char qualifier, boolean ignoreFirstRecord)
ParserFactory
newDelimitedParser
in interface ParserFactory
pzmapXML
- -
Reference to the xml file holding the pzmapdataSource
- -
text file datasource to read fromdelimiter
- -
Char the file is delimited Byqualifier
- -
Char text is qualified byignoreFirstRecord
- -
skips the first line that contains data in the file
public Parser newDelimitedParser(java.io.InputStream pzmapXMLStream, java.io.InputStream dataSourceStream, char delimiter, char qualifier, boolean ignoreFirstRecord)
ParserFactory
newDelimitedParser
in interface ParserFactory
pzmapXMLStream
- -
Reference to the xml file holding the pzmap, user must close
it when done.dataSourceStream
- -
text file datasource InputStream to read from, user must close
it when done.delimiter
- -
Char the file is delimited Byqualifier
- -
Char text is qualified byignoreFirstRecord
- -
skips the first line that contains data in the file
public Parser newDelimitedParser(java.io.File dataSource, char delimiter, char qualifier)
ParserFactory
newDelimitedParser
in interface ParserFactory
dataSource
- -
text file datasource to read fromdelimiter
- -
Char the file is delimited Byqualifier
- -
Char text is qualified by
public Parser newDelimitedParser(java.io.InputStream dataSourceStream, char delimiter, char qualifier)
ParserFactory
newDelimitedParser
in interface ParserFactory
dataSourceStream
- -
text file InputStream to read from, user must close it when
done.delimiter
- -
Char the file is delimited Byqualifier
- -
Char text is qualified by
public Parser newDelimitedParser(java.sql.Connection con, java.io.Reader dataSource, java.lang.String dataDefinition, char delimiter, char qualifier, boolean ignoreFirstRecord)
newDelimitedParser
in interface ParserFactory
con
- -
Connection to database with DATAFILE and DATASTRUCTURE tables,
user must close it when done.dataSource
- -
text file datasource InputStream to read from, user must close
it when done.dataDefinition
- -
Name of dataDefinition in the DATAFILE table DATAFILE_DESC
columndelimiter
- -
Char the file is delimited Byqualifier
- -
Char text is qualified byignoreFirstRecord
- -
skips the first line that contains data in the file
public Parser newDelimitedParser(java.io.Reader dataSource, char delimiter, char qualifier)
ParserFactory
newDelimitedParser
in interface ParserFactory
dataSource
- -
text file datasource to read fromdelimiter
- -
Char the file is delimited Byqualifier
- -
Char text is qualified by
public Parser newDelimitedParser(java.io.Reader pzmapXML, java.io.Reader dataSource, char delimiter, char qualifier, boolean ignoreFirstRecord)
ParserFactory
newDelimitedParser
in interface ParserFactory
pzmapXML
- -
Reference to the xml file holding the pzmapdataSource
- -
text file datasource to read fromdelimiter
- -
Char the file is delimited Byqualifier
- -
Char text is qualified byignoreFirstRecord
- -
skips the first line that contains data in the file
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |