public InputStream getClobAsAsciiStream(ResultSet rs, int columnIndex) throws SQLException { Clob clob = rs.getClob(columnIndex); if (clob == null) { return null; } return clob.getAsciiStream(); }
@Override public InputStream getClobAsAsciiStream(ResultSet rs, int columnIndex) throws SQLException { logger.debug("Returning CLOB as ASCII stream"); if (this.wrapAsLob) { Clob clob = rs.getClob(columnIndex); return clob.getAsciiStream(); } else { return rs.getAsciiStream(columnIndex); } }
@Override public java.io.InputStream clob_getAsciiStream(ClobProxy clob) throws SQLException { if (this.pos < filterSize) { return nextFilter().clob_getAsciiStream(this, clob); } return clob.getRawClob().getAsciiStream(); }
if (value instanceof Clob) { Clob clob = (Clob) value; value = IOUtils.toString((clob.getAsciiStream())); doClobFree(clob); } else if (value instanceof BigDecimal) {
InputStream l_inStream = x.getAsciiStream(); int l_length = (int) x.length(); LargeObjectManager lom = connection.getLargeObjectAPI();
@Override public Clob mergeClob(Clob original, Clob target, SharedSessionContractImplementor session) { if ( original != target ) { try { // the CLOB just read during the load phase of merge final OutputStream connectedStream = target.setAsciiStream( 1L ); // the CLOB from the detached state final InputStream detachedStream = original.getAsciiStream(); StreamCopier.copy( detachedStream, connectedStream ); return target; } catch (SQLException e ) { throw session.getFactory().getSQLExceptionHelper().convert( e, "unable to merge CLOB data" ); } } else { return NEW_LOCATOR_LOB_MERGE_STRATEGY.mergeClob( original, target, session ); } }
long numChars = clob.length(); char[] buffer = new char[(int) numChars]; InputStream is = clob.getAsciiStream(); int index = 0; int c = is.read();
public InputStream getClobAsAsciiStream(ResultSet rs, int columnIndex) throws SQLException { Clob clob = rs.getClob(columnIndex); if (clob == null) { return null; } return clob.getAsciiStream(); }
@Override public java.io.InputStream clob_getAsciiStream(ClobProxy clob) throws SQLException { if (this.pos < filterSize) { return nextFilter().clob_getAsciiStream(this, clob); } return clob.getRawClob().getAsciiStream(); }
return null; InputStream in = clob.getAsciiStream(); try { return new WKTReader(factory).read(new InputStreamReader(in));
rdr = new InputStreamReader(clob.getAsciiStream());
/** * {@inheritDoc} */ @Override public InputStream getAsciiStream() throws SQLException { return this.clob.getAsciiStream(); }
/** * {@inheritDoc} */ @Override public InputStream getAsciiStream() throws SQLException { return this.clob.getAsciiStream(); }
protected String getString(Clob clob) { try { InputStream in = clob.getAsciiStream(); ByteArrayOutputStream baos = new ByteArrayOutputStream(); IOUtils.copy(in, baos); return baos.toString(); } catch (Exception e) { throw new RuntimeException("Error reading clob", e); } }
public static void sendFile(HttpServletRequest request, HttpServletResponse response, String filename, Clob clob) throws Exception { if (clob == null) return; sendFile_(request, response, filename, clob.getAsciiStream(), clob.length()); }
public InputStream getClobAsAsciiStream(ResultSet rs, int columnIndex) throws SQLException { logger.debug("Returning CLOB as ASCII stream"); if (this.wrapAsLob) { Clob clob = rs.getClob(columnIndex); return clob.getAsciiStream(); } else { return rs.getAsciiStream(columnIndex); } }
public java.io.InputStream getAsciiStream(int columnIndex) throws SQLException { Clob c = getClob(columnIndex); if (c == null) { return null; } else { return c.getAsciiStream(); } }
public InputStream getAsciiStream(int columnIndex) throws SQLException { Clob clob = getClob(columnIndex); if (clob == null) { return null; } return clob.getAsciiStream(); }
@Override public InputStream toAsciiStream(OptimizedElementArray row, int columnPosition, LobService lobService) throws SQLException { Clob clob = (Clob)row.getObject(columnPosition - 1); return clob.getAsciiStream(); } @Override
@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; }