public byte[] getBlobAsBytes(ResultSet rs, int columnIndex) throws SQLException { logger.debug("Returning Oracle BLOB as bytes"); Blob blob = rs.getBlob(columnIndex); initializeResourcesBeforeRead(rs.getStatement().getConnection(), blob); byte[] retVal = (blob != null ? blob.getBytes(1, (int) blob.length()) : null); releaseResourcesAfterRead(rs.getStatement().getConnection(), blob); return retVal; }
@Override public InputStream getBlobAsBinaryStream(ResultSet rs, int columnIndex) throws SQLException { logger.debug("Returning Oracle BLOB as binary stream"); Blob blob = rs.getBlob(columnIndex); initializeResourcesBeforeRead(rs.getStatement().getConnection(), blob); InputStream retVal = (blob != null ? blob.getBinaryStream() : null); releaseResourcesAfterRead(rs.getStatement().getConnection(), blob); return retVal; }
public Reader getClobAsCharacterStream(ResultSet rs, int columnIndex) throws SQLException { logger.debug("Returning Oracle CLOB as character stream"); Clob clob = rs.getClob(columnIndex); initializeResourcesBeforeRead(rs.getStatement().getConnection(), clob); Reader retVal = (clob != null ? clob.getCharacterStream() : null); releaseResourcesAfterRead(rs.getStatement().getConnection(), clob); return retVal; }
public String getClobAsString(ResultSet rs, int columnIndex) throws SQLException { logger.debug("Returning Oracle CLOB as string"); Clob clob = rs.getClob(columnIndex); initializeResourcesBeforeRead(rs.getStatement().getConnection(), clob); String retVal = (clob != null ? clob.getSubString(1, (int) clob.length()) : null); releaseResourcesAfterRead(rs.getStatement().getConnection(), clob); return retVal; }
@Override public byte[] getBlobAsBytes(ResultSet rs, int columnIndex) throws SQLException { logger.debug("Returning Oracle BLOB as bytes"); Blob blob = rs.getBlob(columnIndex); initializeResourcesBeforeRead(rs.getStatement().getConnection(), blob); byte[] retVal = (blob != null ? blob.getBytes(1, (int) blob.length()) : null); releaseResourcesAfterRead(rs.getStatement().getConnection(), blob); return retVal; }
@Override public String getClobAsString(ResultSet rs, int columnIndex) throws SQLException { logger.debug("Returning Oracle CLOB as string"); Clob clob = rs.getClob(columnIndex); initializeResourcesBeforeRead(rs.getStatement().getConnection(), clob); String retVal = (clob != null ? clob.getSubString(1, (int) clob.length()) : null); releaseResourcesAfterRead(rs.getStatement().getConnection(), clob); return retVal; }
public InputStream getBlobAsBinaryStream(ResultSet rs, int columnIndex) throws SQLException { logger.debug("Returning Oracle BLOB as binary stream"); Blob blob = rs.getBlob(columnIndex); initializeResourcesBeforeRead(rs.getStatement().getConnection(), blob); InputStream retVal = (blob != null ? blob.getBinaryStream() : null); releaseResourcesAfterRead(rs.getStatement().getConnection(), blob); return retVal; }
@Override public Reader getClobAsCharacterStream(ResultSet rs, int columnIndex) throws SQLException { logger.debug("Returning Oracle CLOB as character stream"); Clob clob = rs.getClob(columnIndex); initializeResourcesBeforeRead(rs.getStatement().getConnection(), clob); Reader retVal = (clob != null ? clob.getCharacterStream() : null); releaseResourcesAfterRead(rs.getStatement().getConnection(), clob); return retVal; }
public InputStream getClobAsAsciiStream(ResultSet rs, int columnIndex) throws SQLException { logger.debug("Returning Oracle CLOB as ASCII stream"); Clob clob = rs.getClob(columnIndex); initializeResourcesBeforeRead(rs.getStatement().getConnection(), clob); InputStream retVal = (clob != null ? clob.getAsciiStream() : null); releaseResourcesAfterRead(rs.getStatement().getConnection(), clob); return retVal; }
@Override public InputStream getClobAsAsciiStream(ResultSet rs, int columnIndex) throws SQLException { logger.debug("Returning Oracle CLOB as ASCII stream"); Clob clob = rs.getClob(columnIndex); initializeResourcesBeforeRead(rs.getStatement().getConnection(), clob); InputStream retVal = (clob != null ? clob.getAsciiStream() : null); releaseResourcesAfterRead(rs.getStatement().getConnection(), clob); return retVal; }