/** * Updates a column in the current or insert row. * * @param columnIndex (1,2,...) * @param x the value * @param length the number of characters * @throws SQLException if the result set is closed or not updatable */ @Override public void updateAsciiStream(int columnIndex, InputStream x, long length) throws SQLException { try { if (isDebugEnabled()) { debugCode("updateAsciiStream("+columnIndex+", x, "+length+"L);"); } checkClosed(); Value v = conn.createClob(IOUtils.getAsciiReader(x), length); update(columnIndex, v); } catch (Exception e) { throw logAndConvert(e); } }
/** * Updates a column in the current or insert row. * * @param columnLabel the column label * @param x the value * @param length the number of characters * @throws SQLException if the result set is closed or not updatable */ @Override public void updateAsciiStream(String columnLabel, InputStream x, long length) throws SQLException { try { if (isDebugEnabled()) { debugCode("updateAsciiStream("+quote(columnLabel)+", x, "+length+"L);"); } checkClosed(); Value v = conn.createClob(IOUtils.getAsciiReader(x), length); update(columnLabel, v); } catch (Exception e) { throw logAndConvert(e); } }
/** * Sets the value of a parameter as an ASCII stream. * This method does not close the stream. * The stream may be closed after executing the statement. * * @param parameterIndex the parameter index (1, 2, ...) * @param x the value * @param length the maximum number of bytes * @throws SQLException if this object is closed */ @Override public void setAsciiStream(int parameterIndex, InputStream x, long length) throws SQLException { try { if (isDebugEnabled()) { debugCode("setAsciiStream("+parameterIndex+", x, "+length+"L);"); } checkClosedForWrite(); try { Value v = conn.createClob(IOUtils.getAsciiReader(x), length); setParameter(parameterIndex, v); } finally { afterWriting(); } } catch (Exception e) { throw logAndConvert(e); } }
/** * Sets the value of a parameter as an ASCII stream. * * @param parameterIndex the parameter index (1, 2, ...) * @param x the value * @param length the number of bytes * @throws SQLException if this object is closed */ public void setAsciiStream(int parameterIndex, InputStream x, long length) throws SQLException { try { if (debug()) { debugCode("setAsciiStream("+parameterIndex+", x, "+length+"L);"); } checkClosed(); Value v = conn.createClob(IOUtils.getAsciiReader(x), length); setParameter(parameterIndex, v); } catch (Throwable e) { throw logAndConvert(e); } }
/** * Updates a column in the current or insert row. * * @param columnIndex (1,2,...) * @param x the value * @param length the number of characters * @throws SQLException if the result set is closed or not updatable */ @Override public void updateAsciiStream(int columnIndex, InputStream x, long length) throws SQLException { try { if (isDebugEnabled()) { debugCode("updateAsciiStream("+columnIndex+", x, "+length+"L);"); } checkClosed(); Value v = conn.createClob(IOUtils.getAsciiReader(x), length); update(columnIndex, v); } catch (Exception e) { throw logAndConvert(e); } }
/** * Updates a column in the current or insert row. * * @param columnIndex (1,2,...) * @param x the value * @param length the number of characters * @throws SQLException if the result set is closed */ public void updateAsciiStream(int columnIndex, InputStream x, long length) throws SQLException { try { if (debug()) { debugCode("updateAsciiStream("+columnIndex+", x, "+length+"L);"); } checkClosed(); Value v = conn.createClob(IOUtils.getAsciiReader(x), length); update(columnIndex, v); } catch (Throwable e) { throw logAndConvert(e); } }
/** * Updates a column in the current or insert row. * * @param columnIndex (1,2,...) * @param x the value * @param length the number of characters * @throws SQLException if the result set is closed or not updatable */ @Override public void updateAsciiStream(int columnIndex, InputStream x, long length) throws SQLException { try { if (isDebugEnabled()) { debugCode("updateAsciiStream("+columnIndex+", x, "+length+"L);"); } checkClosed(); Value v = conn.createClob(IOUtils.getAsciiReader(x), length); update(columnIndex, v); } catch (Exception e) { throw logAndConvert(e); } }
/** * Updates a column in the current or insert row. * * @param columnName the name of the column label * @param x the value * @param length the number of characters * @throws SQLException if the result set is closed */ public void updateAsciiStream(String columnName, InputStream x, long length) throws SQLException { try { if (debug()) { debugCode("updateAsciiStream("+quote(columnName)+", x, "+length+"L);"); } checkClosed(); Value v = conn.createClob(IOUtils.getAsciiReader(x), length); update(columnName, v); } catch (Throwable e) { throw logAndConvert(e); } }
/** * Updates a column in the current or insert row. * * @param columnLabel the column label * @param x the value * @param length the number of characters * @throws SQLException if the result set is closed or not updatable */ @Override public void updateAsciiStream(String columnLabel, InputStream x, long length) throws SQLException { try { if (isDebugEnabled()) { debugCode("updateAsciiStream("+quote(columnLabel)+", x, "+length+"L);"); } checkClosed(); Value v = conn.createClob(IOUtils.getAsciiReader(x), length); update(columnLabel, v); } catch (Exception e) { throw logAndConvert(e); } }
/** * Updates a column in the current or insert row. * * @param columnLabel the column label * @param x the value * @param length the number of characters * @throws SQLException if the result set is closed or not updatable */ @Override public void updateAsciiStream(String columnLabel, InputStream x, long length) throws SQLException { try { if (isDebugEnabled()) { debugCode("updateAsciiStream("+quote(columnLabel)+", x, "+length+"L);"); } checkClosed(); Value v = conn.createClob(IOUtils.getAsciiReader(x), length); update(columnLabel, v); } catch (Exception e) { throw logAndConvert(e); } }
/** * Sets the value of a parameter as an ASCII stream. * This method does not close the stream. * The stream may be closed after executing the statement. * * @param parameterIndex the parameter index (1, 2, ...) * @param x the value * @param length the maximum number of bytes * @throws SQLException if this object is closed */ @Override public void setAsciiStream(int parameterIndex, InputStream x, long length) throws SQLException { try { if (isDebugEnabled()) { debugCode("setAsciiStream("+parameterIndex+", x, "+length+"L);"); } checkClosedForWrite(); try { Value v = conn.createClob(IOUtils.getAsciiReader(x), length); setParameter(parameterIndex, v); } finally { afterWriting(); } } catch (Exception e) { throw logAndConvert(e); } }
/** * Sets the value of a parameter as an ASCII stream. * This method does not close the stream. * The stream may be closed after executing the statement. * * @param parameterIndex the parameter index (1, 2, ...) * @param x the value * @param length the maximum number of bytes * @throws SQLException if this object is closed */ @Override public void setAsciiStream(int parameterIndex, InputStream x, long length) throws SQLException { try { if (isDebugEnabled()) { debugCode("setAsciiStream("+parameterIndex+", x, "+length+"L);"); } checkClosedForWrite(); try { Value v = conn.createClob(IOUtils.getAsciiReader(x), length); setParameter(parameterIndex, v); } finally { afterWriting(); } } catch (Exception e) { throw logAndConvert(e); } }