@Test public void testGetString1() throws Exception { SQLXMLImpl clob = new SQLXMLImpl() { public java.io.Reader getCharacterStream() throws java.sql.SQLException { return new Reader() { int pos = 0; @Override public void close() throws IOException { } @Override public int read(char[] cbuf, int off, int len) throws IOException { if (pos < 5) { cbuf[off] = 'a'; pos++; return 1; } return -1; } }; } }; assertEquals("aaaaa", clob.getString()); }
public String getString() throws SQLException { try { return ObjectConverterUtil.convertToString(getCharacterStream()); } catch (IOException e) { SQLException ex = new SQLException(e.getMessage()); ex.initCause(e); throw ex; } }
SQLXMLImpl extends BaseLob implements SQLXML { public String getString() throws SQLException { try { return ObjectConverterUtil.convertToString(getCharacterStream()); } catch (IOException e) { SQLException ex = new SQLException(e.getMessage()); ex.initCause(e); throw ex; } } }
SQLXMLImpl extends BaseLob implements SQLXML { public String getString() throws SQLException { try { return ObjectConverterUtil.convertToString(getCharacterStream()); } catch (IOException e) { SQLException ex = new SQLException(e.getMessage()); ex.initCause(e); throw ex; } } SQLXMLImpl();  SQLXMLImpl(final byte[] bytes);  SQLXMLImpl(final String str);  SQLXMLImpl(InputStreamFactory factory); }
SQLXMLImpl extends BaseLob implements SQLXML { public String getString() throws SQLException { try { return ObjectConverterUtil.convertToString(getCharacterStream()); } catch (IOException e) { SQLException ex = new SQLException(e.getMessage()); ex.initCause(e); throw ex; } } SQLXMLImpl();  SQLXMLImpl(final byte[] bytes);  SQLXMLImpl(final String str);  SQLXMLImpl(InputStreamFactory factory); @Override Charset getCharset(); @SuppressWarnings("unchecked") T getSource(Class<T> sourceClass); String getString(); OutputStream setBinaryStream(); Writer setCharacterStream(); void setString(String value); T setResult(Class<T> resultClass); static long quickLength(SQLXML xml); }
SQLXMLImpl extends BaseLob implements SQLXML { public String getString() throws SQLException { try { return ObjectConverterUtil.convertToString(getCharacterStream()); } catch (IOException e) { SQLException ex = new SQLException(e.getMessage()); ex.initCause(e); throw ex; } } SQLXMLImpl();  SQLXMLImpl(final byte[] bytes);  SQLXMLImpl(final String str);  SQLXMLImpl(InputStreamFactory factory); @Override Charset getCharset(); @SuppressWarnings("unchecked") T getSource(Class<T> sourceClass); String getString(); OutputStream setBinaryStream(); Writer setCharacterStream(); void setString(String value); T setResult(Class<T> resultClass); static long quickLength(SQLXML xml);  }