Package java.sql

Examples of java.sql.Blob.free()


        finally
        {
          Resources.close(ps);
        }
        c.commit();
        blob.free();
 
        validate(c1, expected);
        validate(c2, expected);
       
        ps = c.prepareStatement("SELECT lob FROM test WHERE id = ?", ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_UPDATABLE);
View Full Code Here


            blob.setBytes(1, expected.getBytes());
           
            results.updateRow();
            Assert.assertFalse(results.next());
            c.commit();
            blob.free();
          }
          finally
          {
            Resources.close(results);
          }
View Full Code Here

    Clob nclob = lobCreator.createNClob( "Hi" );
    assertTrue( nclob instanceof JdbcNClob );
    nclob = lobCreator.wrap( nclob );
    assertTrue( nclob instanceof WrappedClob );

    blob.free();
    clob.free();
    nclob.free();
    connection.close();
  }
View Full Code Here

    assertTrue( nclob instanceof ClobImplementer );
    assertTrue( nclob instanceof NClobImplementer );
    nclob = lobCreator.wrap( nclob );
    assertTrue( nclob instanceof WrappedClob );

    blob.free();
    clob.free();
    nclob.free();
    connection.close();
  }
View Full Code Here

    assertTrue( nclob instanceof NClobImplementer );
    assertTrue( NClob.class.isInstance( nclob ) );
    nclob = lobCreator.wrap( nclob );
    assertTrue( nclob instanceof WrappedClob );

    blob.free();
    clob.free();
    nclob.free();
  }

  private interface JdbcLobBuilder {
View Full Code Here

        finally
        {
          Resources.close(ps);
        }
        c.commit();
        blob.free();
 
        this.validate(c1, expected);
        this.validate(c2, expected);
       
        ps = c.prepareStatement("SELECT lob FROM test WHERE id = ?", ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_UPDATABLE);
View Full Code Here

            blob.setBytes(1, expected.getBytes());
           
            results.updateRow();
            Assert.assertFalse(results.next());
            c.commit();
            blob.free();
          }
          finally
          {
            Resources.close(results);
          }
View Full Code Here

            message.payload = rs.getBytes("payload_bytes");
          } else {
            Blob blob = rs.getBlob("payload_bytes");
            int length = Math.min(payloadLength, (int) blob.length());
            message.payload = blob.getBytes(1, length);
            blob.free();
          }
         
          if (message.payload == null) {
            message.payload = new byte[0];
          }
View Full Code Here

        while (rs.next())
        {
            Blob blob = rs.getBlob(3);
            verifyBlob(blob.getBinaryStream(), rs.getInt(2), rs.getInt(1));
            if (freelob)
                blob.free();
            if (commitAfterLobVerify)
                commit();
        }
        rs.close();
        rollback();
View Full Code Here

      Blob blob = rs.getBlob("content");
      int length = (int) blob.length();
      InputStream in = blob.getBinaryStream();
      ba = blob.getBytes(1, length);
      in.close();
      blob.free();
    }
    rs.close();
    s.close();
    return ba;
  }
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.