Interface CopyInParser (0.21.0)

publicinterface 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)

publicstaticCopyInParsercreate(SessionStatesessionState,CopyStatement.Formatformat,CSVFormatcsvFormat,PipedInputStreaminputStream,booleanhasHeader)

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

Parameters
Name Description
sessionState SessionState
format CopyStatement.Format
csvFormat org.apache.commons.csv.CSVFormat
inputStream PipedInputStream
hasHeader boolean
Returns
Type Description
CopyInParser
Exceptions
Type Description
IOException

Methods

close()

publicabstractvoidclose()

Closes this parser and releases any resources associated with it.

Exceptions
Type Description
IOException

iterator()

publicabstractIterator<CopyRecord>iterator()

Returns an iterator of COPY records.

Returns
Type Description
Iterator<CopyRecord>

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025年10月30日 UTC.