@Test public void setCharacterStream() throws Exception { String exmplar = "<x>value</x>"; SQLXML pgSQLXML = con.createSQLXML(); Writer writer = pgSQLXML.setCharacterStream(); writer.write(exmplar); PreparedStatement preparedStatement = con.prepareStatement("insert into xmltab values (?)"); preparedStatement.setSQLXML(1, pgSQLXML); preparedStatement.execute(); Statement statement = con.createStatement(); ResultSet rs = statement.executeQuery("select * from xmltab"); assertTrue(rs.next()); SQLXML result = rs.getSQLXML(1); assertNotNull(result); assertEquals(exmplar, result.getString()); }
public synchronized Writer setCharacterStream() throws SQLException { checkFreed(); initialize(); _stringWriter = new StringWriter(); return _stringWriter; }
PgSQLXML implements SQLXML { public synchronized Writer setCharacterStream() throws SQLException { checkFreed(); initialize(); _stringWriter = new StringWriter(); return _stringWriter; } }
PgSQLXML implements SQLXML { public synchronized Writer setCharacterStream() throws SQLException { checkFreed(); initialize(); _stringWriter = new StringWriter(); return _stringWriter; } PgSQLXML(BaseConnection conn);  PgSQLXML(BaseConnection conn, String data); private  PgSQLXML(BaseConnection conn, String data, boolean initialized); }
PgSQLXML implements SQLXML { public synchronized Writer setCharacterStream() throws SQLException { checkFreed(); initialize(); _stringWriter = new StringWriter(); return _stringWriter; } PgSQLXML(BaseConnection conn);  PgSQLXML(BaseConnection conn, String data); private  PgSQLXML(BaseConnection conn, String data, boolean initialized); synchronized void free(); synchronized InputStream getBinaryStream(); synchronized Reader getCharacterStream(); synchronized T getSource(Class<T> sourceClass); synchronized String getString(); synchronized OutputStream setBinaryStream(); synchronized Writer setCharacterStream(); synchronized T setResult(Class<T> resultClass); synchronized void setString(String value); }
PgSQLXML implements SQLXML { public synchronized Writer setCharacterStream() throws SQLException { checkFreed(); initialize(); _stringWriter = new StringWriter(); return _stringWriter; } PgSQLXML(BaseConnection conn);  PgSQLXML(BaseConnection conn, String data); private  PgSQLXML(BaseConnection conn, String data, boolean initialized); synchronized void free(); synchronized InputStream getBinaryStream(); synchronized Reader getCharacterStream(); synchronized T getSource(Class<T> sourceClass); synchronized String getString(); synchronized OutputStream setBinaryStream(); synchronized Writer setCharacterStream(); synchronized T setResult(Class<T> resultClass); synchronized void setString(String value);  }