net.sourceforge.jdbcimporter.parser
Class BinaryDelimiterParserDelegate

java.lang.Object
  extended bynet.sourceforge.jdbcimporter.parser.BinaryDelimiterParserDelegate
All Implemented Interfaces:
BinaryDelimiterParser

public class BinaryDelimiterParserDelegate
extends java.lang.Object
implements BinaryDelimiterParser

The BinaryDelimiterParserDelegate class implements the BinaryDelimiterParser interface by delegating calls to a DelimiterParser.

Version:
0.74
Author:
Chris Nagy

Constructor Summary
BinaryDelimiterParserDelegate(DelimiterParser delegate, java.lang.String encoding)
          Creates a BinaryDelimiterParserDelegate with the given DelimiterParser and input stream encoding.
 
Method Summary
 java.lang.Object getNextRow()
          Returns the next row to be imported as an Object.
 java.lang.String getRowAsString(java.lang.Object nextRow)
          Returns the String representation of the next row.
 ColumnValue[] getValues(java.lang.Object nextRow)
          Returns the column values for the row specified.
 void setInputStream(java.io.InputStream input)
          Sets the input source for the parser.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BinaryDelimiterParserDelegate

public BinaryDelimiterParserDelegate(DelimiterParser delegate,
                                     java.lang.String encoding)
Creates a BinaryDelimiterParserDelegate with the given DelimiterParser and input stream encoding.

Parameters:
delegate - The DelimiterParser that will parse the input stream
encoding - The encoding of the input stream (may be null)
Method Detail

setInputStream

public void setInputStream(java.io.InputStream input)
Description copied from interface: BinaryDelimiterParser
Sets the input source for the parser.

Specified by:
setInputStream in interface BinaryDelimiterParser
See Also:
BinaryDelimiterParser.setInputStream(java.io.InputStream)

getNextRow

public java.lang.Object getNextRow()
                            throws java.io.IOException
Description copied from interface: BinaryDelimiterParser
Returns the next row to be imported as an Object.

Specified by:
getNextRow in interface BinaryDelimiterParser
Returns:
the next row to import
Throws:
java.io.IOException - if an error occurs while retrieving the next row
See Also:
BinaryDelimiterParser.getNextRow()

getValues

public ColumnValue[] getValues(java.lang.Object nextRow)
                        throws MalformedDataException
Description copied from interface: BinaryDelimiterParser
Returns the column values for the row specified.

Specified by:
getValues in interface BinaryDelimiterParser
Returns:
the column values
Throws:
MalformedDataException - if the row is not formatted properly
See Also:
BinaryDelimiterParser.getValues(Object)

getRowAsString

public java.lang.String getRowAsString(java.lang.Object nextRow)
Description copied from interface: BinaryDelimiterParser
Returns the String representation of the next row. The String will be used if the row is written to a log file.

Specified by:
getRowAsString in interface BinaryDelimiterParser
Parameters:
nextRow - the row
Returns:
The String representing the row
See Also:
BinaryDelimiterParser.getRowAsString(Object)