Package org.postgresql.copy
Interface CopyOut
-
- All Superinterfaces:
CopyOperation
- All Known Subinterfaces:
CopyDual
- All Known Implementing Classes:
CopyDualImpl
,CopyOutImpl
,PGCopyInputStream
public interface CopyOut extends CopyOperation
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description byte[]
readFromCopy()
Blocks wait for a row of data to be received from server on an active copy operation.byte[]
readFromCopy(boolean block)
Wait for a row of data to be received from server on an active copy operation.-
Methods inherited from interface org.postgresql.copy.CopyOperation
cancelCopy, getFieldCount, getFieldFormat, getFormat, getHandledRowCount, isActive
-
-
-
-
Method Detail
-
readFromCopy
byte[] readFromCopy() throws java.sql.SQLException
Blocks wait for a row of data to be received from server on an active copy operation.- Returns:
- byte array received from server, null if server complete copy operation
- Throws:
java.sql.SQLException
- if something goes wrong for example socket timeout
-
readFromCopy
byte[] readFromCopy(boolean block) throws java.sql.SQLException
Wait for a row of data to be received from server on an active copy operation.- Parameters:
block
-true
if need wait data from server otherwisefalse
and will read pending message from server- Returns:
- byte array received from server, if pending message from server absent and use no blocking mode return null
- Throws:
java.sql.SQLException
- if something goes wrong for example socket timeout
-
-