jdk/src/share/classes/javax/sql/rowset/serial/SerialClob.java
changeset 10323 48d695d1e966
parent 9035 1255eb81cc2f
child 14337 a003c6a54cb6
equal deleted inserted replaced
10322:82436f404b9d 10323:48d695d1e966
   434      *     <code>CLOB</code> value
   434      *     <code>CLOB</code> value
   435      * @see #getAsciiStream
   435      * @see #getAsciiStream
   436      */
   436      */
   437     public java.io.OutputStream setAsciiStream(long pos)
   437     public java.io.OutputStream setAsciiStream(long pos)
   438         throws SerialException, SQLException {
   438         throws SerialException, SQLException {
   439          if (this.clob.setAsciiStream(pos) != null) {
   439          if (this.clob != null) {
   440              return this.clob.setAsciiStream(pos);
   440              return this.clob.setAsciiStream(pos);
   441          } else {
   441          } else {
   442              throw new SerialException("Unsupported operation. SerialClob cannot " +
   442              throw new SerialException("Unsupported operation. SerialClob cannot " +
   443                 "return a writable ascii stream\n unless instantiated with a Clob object " +
   443                 "return a writable ascii stream\n unless instantiated with a Clob object " +
   444                 "that has a setAsciiStream() implementation");
   444                 "that has a setAsciiStream() implementation");
   464      *            <code>CLOB</code> value
   464      *            <code>CLOB</code> value
   465      * @see #getCharacterStream
   465      * @see #getCharacterStream
   466      */
   466      */
   467     public java.io.Writer setCharacterStream(long pos)
   467     public java.io.Writer setCharacterStream(long pos)
   468         throws SerialException, SQLException {
   468         throws SerialException, SQLException {
   469         if (this.clob.setCharacterStream(pos) != null) {
   469         if (this.clob != null) {
   470             return this.clob.setCharacterStream(pos);
   470             return this.clob.setCharacterStream(pos);
   471         } else {
   471         } else {
   472             throw new SerialException("Unsupported operation. SerialClob cannot " +
   472             throw new SerialException("Unsupported operation. SerialClob cannot " +
   473                 "return a writable character stream\n unless instantiated with a Clob object " +
   473                 "return a writable character stream\n unless instantiated with a Clob object " +
   474                 "that has a setCharacterStream implementation");
   474                 "that has a setCharacterStream implementation");