public SQLXML getSQLXML(int columnIndex) throws SQLException { String data = getString(columnIndex); if (data == null) return null; return new Jdbc4SQLXML(connection, data); }
public synchronized void setString(String value) throws SQLException { checkFreed(); initialize(); _data = value; }
public synchronized String getString() throws SQLException { checkFreed(); ensureInitialized(); return _data; }
public synchronized OutputStream setBinaryStream() throws SQLException { checkFreed(); initialize(); _active = true; _byteArrayOutputStream = new ByteArrayOutputStream(); return _byteArrayOutputStream; }
public synchronized Reader getCharacterStream() throws SQLException { checkFreed(); ensureInitialized(); if (_data == null) return null; return new StringReader(_data); }
public SQLXML createSQLXML() throws SQLException { checkClosed(); return new Jdbc4SQLXML(this); }
public synchronized Writer setCharacterStream() throws SQLException { checkFreed(); initialize(); _stringWriter = new StringWriter(); return _stringWriter; }
public synchronized InputStream getBinaryStream() throws SQLException { checkFreed(); ensureInitialized(); if (_data == null) return null; try { return new ByteArrayInputStream(_conn.getEncoding().encode(_data)); } catch (IOException ioe) { // This should be a can't happen exception. We just // decoded this data, so it would be surprising that // we couldn't encode it. // For this reason don't make it translatable. throw new PSQLException("Failed to re-encode xml data.", PSQLState.DATA_ERROR, ioe); } }
public void setObject(int parameterIndex, Object x, int targetSqlType, int scale) throws SQLException { checkClosed(); if (x == null) { setNull(parameterIndex, targetSqlType); return; } switch (targetSqlType) { case Types.SQLXML: if (x instanceof SQLXML) { setSQLXML(parameterIndex, (SQLXML)x); } else { setSQLXML(parameterIndex, new Jdbc4SQLXML(connection, x.toString())); } break; default: super.setObject(parameterIndex, x, targetSqlType, scale); } }
public synchronized Result setResult(Class resultClass) throws SQLException checkFreed(); initialize();
public synchronized Source getSource(Class sourceClass) throws SQLException checkFreed(); ensureInitialized();
public SQLXML createSQLXML() throws SQLException { return new Jdbc4SQLXML(this); }
public synchronized void setString(String value) throws SQLException { checkFreed(); initialize(); _data = value; }
public synchronized String getString() throws SQLException { checkFreed(); ensureInitialized(); return _data; }
public SQLXML createSQLXML() throws SQLException { checkClosed(); return new Jdbc4SQLXML(this); }
public synchronized void setString(String value) throws SQLException { checkFreed(); initialize(); _data = value; }
public synchronized String getString() throws SQLException { checkFreed(); ensureInitialized(); return _data; }
public SQLXML getSQLXML(int columnIndex) throws SQLException { String data = getString(columnIndex); if (data == null) return null; return new Jdbc4SQLXML(connection, data); }
public synchronized OutputStream setBinaryStream() throws SQLException { checkFreed(); initialize(); _active = true; _byteArrayOutputStream = new ByteArrayOutputStream(); return _byteArrayOutputStream; }
public synchronized Reader getCharacterStream() throws SQLException { checkFreed(); ensureInitialized(); if (_data == null) return null; return new StringReader(_data); }