Package java.sql

Examples of java.sql.Clob.truncate()


    this.rs = this.stmt.executeQuery("SELECT * FROM testClobTruncate");
    this.rs.next();

    Clob clob = this.rs.getClob(1);
    clob.truncate(3);

    Reader reader = clob.getCharacterStream();
    char[] buf = new char[8];
    int charsRead = reader.read(buf);

View Full Code Here


        _outputStream.close();
        _outputStream = null;
      } else if (_lob instanceof Clob) {
        Clob clob = (Clob) _lob;
        clob.truncate(0);

        if (_writer != null)
          _writer.close();

        _writer = clob.setCharacterStream(0);
View Full Code Here

        if (_lob instanceof Blob) {
          Blob blob = (Blob) _lob;
          blob.truncate(length);
        } else if (_lob instanceof Clob) {
          Clob clob = (Clob) _lob;
          clob.truncate(length);
        }
        break;
      case OracleModule.OCI_D_ROWID:
        break;
      }
View Full Code Here

        this.rs = utf8Conn.createStatement().executeQuery(
            "SELECT `text` FROM testBug11614 WHERE id=1");
        assertTrue(this.rs.next());

        Clob c = this.rs.getClob(1);
        c.truncate(0);
        int blockSize = 8192;
        int sizeToTest = blockSize + 100;

        StringBuffer blockBuf = new StringBuffer(sizeToTest);
View Full Code Here

      this.rs = this.stmt.executeQuery("SELECT * FROM testClobTruncate");
      this.rs.next();

      Clob clob = this.rs.getClob(1);
      clob.truncate(3);

      Reader reader = clob.getCharacterStream();
      char[] buf = new char[8];
      int charsRead = reader.read(buf);

View Full Code Here

                readClob.position("abc", 1);
                readClob.getCharacterStream().close();
                readClob.getAsciiStream().close();
                readClob.getCharacterStream(1, 1).close();
                readClob.getSubString(1, 2);
                readClob.truncate(2);
                readClob.free();
            }
            JdbcUtils.close(rs);

            rs = stmt.executeQuery("SELECT ID, DATA FROM T_CLOB");
View Full Code Here

    this.rs = this.stmt.executeQuery("SELECT * FROM testClobTruncate");
    this.rs.next();

    Clob clob = this.rs.getClob(1);
    clob.truncate(3);

    Reader reader = clob.getCharacterStream();
    char[] buf = new char[8];
    int charsRead = reader.read(buf);

View Full Code Here

        _outputStream.close();
        _outputStream = null;
      } else if (_lob instanceof Clob) {
        Clob clob = (Clob) _lob;
        clob.truncate(0);

        if (_writer != null)
          _writer.close();

        _writer = clob.setCharacterStream(0);
View Full Code Here

        if (_lob instanceof Blob) {
          Blob blob = (Blob) _lob;
          blob.truncate(length);
        } else if (_lob instanceof Clob) {
          Clob clob = (Clob) _lob;
          clob.truncate(length);
        }
        break;
      case OracleModule.OCI_D_ROWID:
        break;
      }
View Full Code Here

        this.rs = utf8Conn.createStatement().executeQuery(
            "SELECT `text` FROM testBug11614 WHERE id=1");
        assertTrue(this.rs.next());

        Clob c = this.rs.getClob(1);
        c.truncate(0);
        int blockSize = 8192;
        int sizeToTest = blockSize + 100;

        StringBuffer blockBuf = new StringBuffer(sizeToTest);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.