public byte[] getBytes(String columnName) throws SQLException { return getBytes(findColumn(columnName)); }
public InputStream getBinaryStream(int columnIndex) throws SQLException { checkResultSet( columnIndex ); if (wasNullFlag) return null; if (connection.haveMinimumCompatibleVersion("7.2")) { //Version 7.2 supports BinaryStream for all PG bytea type //As the spec/javadoc for this method indicate this is to be used for //large binary values (i.e. LONGVARBINARY) PG doesn't have a separate //long binary datatype, but with toast the bytea datatype is capable of //handling very large values. Thus the implementation ends up calling //getBytes() since there is no current way to stream the value from the server byte b[] = getBytes(columnIndex); if (b != null) return new ByteArrayInputStream(b); } else { // In 7.1 Handle as BLOBS so return the LargeObject input stream if ( fields[columnIndex - 1].getOID() == Oid.OID) { LargeObjectManager lom = connection.getLargeObjectAPI(); LargeObject lob = lom.open(getLong(columnIndex)); return lob.getInputStream(); } } return null; }
case Types.VARBINARY: case Types.LONGVARBINARY: return getBytes(columnIndex); case Types.ARRAY: return getArray(columnIndex);
public byte[] getBytes(String columnName) throws SQLException { return getBytes(findColumn(columnName)); }
public byte[] getBytes(String columnName) throws SQLException { return getBytes(findColumn(columnName)); }
public InputStream getBinaryStream(int columnIndex) throws SQLException { checkResultSet( columnIndex ); if (wasNullFlag) return null; if (connection.haveMinimumCompatibleVersion("7.2")) { //Version 7.2 supports BinaryStream for all PG bytea type //As the spec/javadoc for this method indicate this is to be used for //large binary values (i.e. LONGVARBINARY) PG doesn't have a separate //long binary datatype, but with toast the bytea datatype is capable of //handling very large values. Thus the implementation ends up calling //getBytes() since there is no current way to stream the value from the server byte b[] = getBytes(columnIndex); if (b != null) return new ByteArrayInputStream(b); } else { // In 7.1 Handle as BLOBS so return the LargeObject input stream if ( fields[columnIndex - 1].getOID() == Oid.OID) { LargeObjectManager lom = connection.getLargeObjectAPI(); LargeObject lob = lom.open(getLong(columnIndex)); return lob.getInputStream(); } } return null; }
public InputStream getBinaryStream(int columnIndex) throws SQLException { checkResultSet( columnIndex ); if (wasNullFlag) return null; if (connection.haveMinimumCompatibleVersion("7.2")) { //Version 7.2 supports BinaryStream for all PG bytea type //As the spec/javadoc for this method indicate this is to be used for //large binary values (i.e. LONGVARBINARY) PG doesn't have a separate //long binary datatype, but with toast the bytea datatype is capable of //handling very large values. Thus the implementation ends up calling //getBytes() since there is no current way to stream the value from the server byte b[] = getBytes(columnIndex); if (b != null) return new ByteArrayInputStream(b); } else { // In 7.1 Handle as BLOBS so return the LargeObject input stream if ( fields[columnIndex - 1].getOID() == Oid.OID) { LargeObjectManager lom = connection.getLargeObjectAPI(); LargeObject lob = lom.open(getLong(columnIndex)); return lob.getInputStream(); } } return null; }
case Types.VARBINARY: case Types.LONGVARBINARY: return getBytes(columnIndex); case Types.ARRAY: return getArray(columnIndex);
case Types.VARBINARY: case Types.LONGVARBINARY: return getBytes(columnIndex); case Types.ARRAY: return getArray(columnIndex);