| Modifier and Type | Field and Description |
|---|---|
| private int | |
| private @Nullable byte[] | |
| private int | |
| private @Nullable CopyOut |
| Access | Constructor and Description |
|---|---|
| public | PGCopyInputStream(PGConnection
database connection to use for copying (protocol version 3 required) connection, String COPY TO STDOUT statement sql)Uses given connection for specified COPY TO STDOUT operation. |
| public |
| Modifier and Type | Method and Description |
|---|---|
| public int | available()
Overrides java. Returns an estimate of the number of bytes that can be read (or skipped over) from this input stream without blocking, which may be 0, or 0 when end of stream is detected. |
| public void | cancelCopy()
Implements org. Cancels this copy operation, discarding any exchanged data. |
| private void | |
| public void | close()
Overrides java. Implements java. Closes this input stream and releases any system resources associated with the stream. |
| private @Nullable byte[] | |
| public int | |
| public int | getFieldFormat(int
number of field (0..fieldCount()-1) field)Implements org.
|
| public int | |
| public long | getHandledRowCount()
Implements org. After successful end of copy, returns the number of database records handled in that operation. |
| private CopyOut | |
| public boolean | |
| public int | read()
Implements abstract java. Reads the next byte of data from the input stream. |
| public int | read(byte[]
the buffer into which the data is read. buf)Overrides java. Reads some number of bytes from the input stream and stores them into
the buffer array |
| public int | read(byte[]
the buffer into which the data is read. buf, int the start offset in array off, int b
at which the data is written.the maximum number of bytes to read. siz)Overrides java. Reads up to |
| public @Nullable byte[] | readFromCopy()
Implements org. Blocks wait for a row of data to be received from server on an active copy operation. |
| public @Nullable byte[] | readFromCopy(boolean
true if need wait data from server otherwise false and will read
pending message from serverImplements org. Wait for a row of data to be received from server on an active copy operation. |
| at | back to summary |
|---|---|
| private int at | |
| buf | back to summary |
|---|---|
| private @Nullable byte[] buf | |
| len | back to summary |
|---|---|
| private int len | |
| op | back to summary |
|---|---|
| private @Nullable CopyOut op | |
| PGCopyInputStream | back to summary |
|---|---|
| public PGCopyInputStream(PGConnection connection, String sql) throws SQLException Uses given connection for specified COPY TO STDOUT operation.
| |
| PGCopyInputStream | back to summary |
|---|---|
| public PGCopyInputStream(CopyOut op) Use given CopyOut operation for reading.
| |
| available | back to summary |
|---|---|
| public int available() throws IOException Overrides java. Doc from java. Returns an estimate of the number of bytes that can be read (or skipped over) from this input stream without blocking, which may be 0, or 0 when end of stream is detected. The read might be on the same thread or another thread. A single read or skip of this many bytes will not block, but may read or skip fewer bytes. Note that while some implementations of A subclass's implementation of this method may choose to throw an
| |
| cancelCopy | back to summary |
|---|---|
| public void cancelCopy() throws SQLException Implements org. Doc from org. Cancels this copy operation, discarding any exchanged data.
| |
| checkClosed | back to summary |
|---|---|
| private void checkClosed() throws IOException | |
| close | back to summary |
|---|---|
| public void close() throws IOException Overrides java. Implements java. Doc from java. Closes this input stream and releases any system resources associated with the stream.
| |
| fillBuffer | back to summary |
|---|---|
| private @Nullable byte[] fillBuffer() throws IOException | |
| getFieldCount | back to summary |
|---|---|
| public int getFieldCount() Implements org.
| |
| getFieldFormat | back to summary |
|---|---|
| public int getFieldFormat(int field) Implements org.
| |
| getFormat | back to summary |
|---|---|
| public int getFormat() Implements org.
| |
| getHandledRowCount | back to summary |
|---|---|
| public long getHandledRowCount() Implements org. Doc from org. After successful end of copy, returns the number of database records handled in that operation. Only implemented in PostgreSQL server version 8.2 and up. Otherwise, returns -1.
| |
| getOp | back to summary |
|---|---|
| private CopyOut getOp() | |
| isActive | back to summary |
|---|---|
| public boolean isActive() Implements org.
| |
| read | back to summary |
|---|---|
| public int read() throws IOException Implements abstract java. Doc from java. Reads the next byte of data from the input stream. The value byte is
returned as an
| |
| read | back to summary |
|---|---|
| public int read(byte[] buf) throws IOException Overrides java. Doc from java. Reads some number of bytes from the input stream and stores them into
the buffer array If the length of The first byte read is stored into element
| |
| read | back to summary |
|---|---|
| public int read(byte[] buf, int off, int siz) throws IOException Overrides java. Doc from java. Reads up to This method blocks until input data is available, end of file is detected, or an exception is thrown. If The first byte read is stored into element In every case, elements
| |
| readFromCopy | back to summary |
|---|---|
| public @Nullable byte[] readFromCopy() throws SQLException Implements org. Doc from org. Blocks wait for a row of data to be received from server on an active copy operation.
| |
| readFromCopy | back to summary |
|---|---|
| public @Nullable byte[] readFromCopy(boolean block) throws SQLException Implements org. Doc from org. Wait for a row of data to be received from server on an active copy operation.
| |