Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.modeshape.jdbc
Class JcrBlob

    java.lang.Object
      org.modeshape.jdbc.JcrBlob

All Implemented Interfaces:
  Blob

    public class JcrBlob

extends Object
implements Blob

The JDBC `Blob` wrapper around a JCR binary `Value` object.

Constructor Summary
`protected` | `JcrBlob(Value value, long length)` Create a JDBC Blob object around the supplied JCR Value, specifying the length.

Method Summary
`void` | `free()`
`InputStream` | `getBinaryStream()`
`InputStream` | `getBinaryStream(long pos, long length)`
`byte[]` | `getBytes(long pos, int length)`
`long` | `length()`
`long` | `position(Blob pattern, long start)`
`long` | `position(byte[] pattern, long start)`
`OutputStream` | `setBinaryStream(long pos)`
`int` | `setBytes(long pos, byte[] bytes)`
`int` | `setBytes(long pos, byte[] bytes, int offset, int len)`
`void` | `truncate(long len)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### JcrBlob

    protected JcrBlob(Value value,
                      long length)

  Create a JDBC Blob object around the supplied JCR Value, specifying the length. Note the length can be determined from the `Property` via `Property.getLength()` or `Property.getLengths()`.

  Parameters:
    `value` - the JCR value; may not be null
    `length` - the length

Method Detail

### free

    public void free()
              throws SQLException

  Specified by:
    `free` in interface `Blob`
  Throws:
    `SQLException`
  See Also:
    `Blob.free()`

### getBinaryStream

    public InputStream getBinaryStream()
                                throws SQLException

  Specified by:
    `getBinaryStream` in interface `Blob`
  Throws:
    `SQLException`
  See Also:
    `Blob.getBinaryStream()`

### getBinaryStream

    public InputStream getBinaryStream(long pos,
                                       long length)
                                throws SQLException

  Specified by:
    `getBinaryStream` in interface `Blob`
  Throws:
    `SQLException`
  See Also:
    `Blob.getBinaryStream(long, long)`

### getBytes

    public byte[] getBytes(long pos,
                           int length)
                    throws SQLException

  Specified by:
    `getBytes` in interface `Blob`
  Throws:
    `SQLException`
  See Also:
    `Blob.getBytes(long, int)`

### length

    public long length()

  Specified by:
    `length` in interface `Blob`
  See Also:
    `Blob.length()`

### position

    public long position(byte[] pattern,
                         long start)
                  throws SQLException

  Specified by:
    `position` in interface `Blob`
  Throws:
    `SQLException`
  See Also:
    `Blob.position(byte[], long)`

### position

    public long position(Blob pattern,
                         long start)
                  throws SQLException

  Specified by:
    `position` in interface `Blob`
  Throws:
    `SQLException`
  See Also:
    `Blob.position(java.sql.Blob, long)`

### setBinaryStream

    public OutputStream setBinaryStream(long pos)
                                 throws SQLException

  Specified by:
    `setBinaryStream` in interface `Blob`
  Throws:
    `SQLException`
  See Also:
    `Blob.setBinaryStream(long)`

### setBytes

    public int setBytes(long pos,
                        byte[] bytes)
                 throws SQLException

  Specified by:
    `setBytes` in interface `Blob`
  Throws:
    `SQLException`
  See Also:
    `Blob.setBytes(long, byte[])`

### setBytes

    public int setBytes(long pos,
                        byte[] bytes,
                        int offset,
                        int len)
                 throws SQLException

  Specified by:
    `setBytes` in interface `Blob`
  Throws:
    `SQLException`
  See Also:
    `Blob.setBytes(long, byte[], int, int)`

### truncate

    public void truncate(long len)
                  throws SQLException

  Specified by:
    `truncate` in interface `Blob`
  Throws:
    `SQLException`
  See Also:
    `Blob.truncate(long)`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2008-2011 JBoss, a division of Red Hat. All Rights Reserved.