Interface CopyInParser (0.18.2)

public interface CopyInParser

Common interface for parsers that implement one or more of the PostgreSQL COPY formats.

Static Methods

create(SessionState sessionState, CopyStatement.Format format, CSVFormat csvFormat, PipedInputStream inputStream, boolean hasHeader)

public static CopyInParser create(SessionState sessionState, CopyStatement.Format format, CSVFormat csvFormat, PipedInputStream inputStream, boolean hasHeader)

Creates a CopyInParser for the given format. The csvFormat argument is only required for non-binary formats.

Parameters
NameDescription
sessionStateSessionState
formatCopyStatement.Format
csvFormatorg.apache.commons.csv.CSVFormat
inputStreamPipedInputStream
hasHeaderboolean
Returns
TypeDescription
CopyInParser
Exceptions
TypeDescription
IOException

Methods

close()

public abstract void close()

Closes this parser and releases any resources associated with it.

Exceptions
TypeDescription
IOException

iterator()

public abstract Iterator<CopyRecord> iterator()

Returns an iterator of COPY records.

Returns
TypeDescription
Iterator<CopyRecord>