Package java.sql

Examples of java.sql.Blob.truncate()


      ReadStream readStream = file.openRead();

      if (_lob instanceof Blob) {
        Blob blob = (Blob) _lob;
        blob.truncate(0);

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

        _outputStream = blob.setBinaryStream(0);
View Full Code Here


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

   
    try {
      this.rs = this.stmt.executeQuery("SELECT field1 FROM testBug34677");
      this.rs.next();
      Blob blob = this.rs.getBlob(1);
      blob.truncate(0L);
      assertEquals(0, blob.length());
      assertEquals(-1, blob.getBinaryStream().read());
    } finally {
      closeMemberJDBCResources();
    }
View Full Code Here

      ReadStream readStream = file.openRead();

      if (_lob instanceof Blob) {
        Blob blob = (Blob) _lob;
        blob.truncate(0);

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

        _outputStream = blob.setBinaryStream(0);
View Full Code Here

      case OracleModule.OCI_D_FILE:
        break;
      case OracleModule.OCI_D_LOB:
        if (_lob instanceof Blob) {
          Blob blob = (Blob) _lob;
          blob.truncate(length);
        } else if (_lob instanceof Clob) {
          Clob clob = (Clob) _lob;
          clob.truncate(length);
        }
        break;
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.