Interface CopyInParser (0.8.0)

public interface CopyInParser

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

Static Methods

create(CopyTreeParser.CopyOptions.Format format, CSVFormat csvFormat, PipedOutputStream payload, int pipeBufferSize, boolean hasHeader)

public static CopyInParser create(CopyTreeParser.CopyOptions.Format format, CSVFormat csvFormat, PipedOutputStream payload, int pipeBufferSize, boolean hasHeader)

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

Parameters
Name Description
format CopyTreeParser.CopyOptions.Format
csvFormat org.apache.commons.csv.CSVFormat
payload PipedOutputStream
pipeBufferSize int
hasHeader boolean
Returns
Type Description
CopyInParser
Exceptions
Type Description
IOException

Methods

close()

public abstract void close()

Closes this parser and releases any resources associated with it.

Exceptions
Type Description
IOException

iterator()

public abstract Iterator<CopyRecord> iterator()

Returns an iterator of COPY records.

Returns
Type Description
Iterator<CopyRecord>