org.apache.ignite.internal.jdbc2

## Class JdbcBlob

- java.lang.Object
- - org.apache.ignite.internal.jdbc2.JdbcBlob

All Implemented Interfaces:
  Blob

    public class JdbcBlob
    extends Object
    implements Blob

Simple BLOB implementation. Actually there is no such entity as BLOB in Ignite. So using arrays is preferable way to work with binary objects. This implementation can be useful for reading binary fields of objects through JDBC.

### Constructor Summary

Constructors
Constructor and Description
`JdbcBlob(byte[] arr)`

### Method Summary

All Methods Instance Methods Concrete Methods
`void` `free()`
`InputStream` `getBinaryStream()`
`InputStream` `getBinaryStream(long pos, long len)`
`byte[]` `getBytes(long pos, int len)`
`long` `length()`
`long` `position(Blob ptrn, long start)`
`long` `position(byte[] ptrn, long start)`
`OutputStream` `setBinaryStream(long pos)`
`int` `setBytes(long pos, byte[] bytes)`
`int` `setBytes(long pos, byte[] bytes, int off, 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

#### JdbcBlob

    public JdbcBlob(byte[] arr)

Parameters:
  `arr` - Byte array.

### Method Detail

#### length

    public long length()
                throws SQLException

Specified by:
  `length` in interface `Blob`
Throws:
  `SQLException`

#### getBytes

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

Specified by:
  `getBytes` in interface `Blob`
Throws:
  `SQLException`

#### getBinaryStream

    public InputStream getBinaryStream()
                                throws SQLException

Specified by:
  `getBinaryStream` in interface `Blob`
Throws:
  `SQLException`

#### getBinaryStream

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

Specified by:
  `getBinaryStream` in interface `Blob`
Throws:
  `SQLException`

#### position

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

Specified by:
  `position` in interface `Blob`
Throws:
  `SQLException`

#### position

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

Specified by:
  `position` in interface `Blob`
Throws:
  `SQLException`

#### setBytes

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

Specified by:
  `setBytes` in interface `Blob`
Throws:
  `SQLException`

#### setBytes

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

Specified by:
  `setBytes` in interface `Blob`
Throws:
  `SQLException`

#### setBinaryStream

    public OutputStream setBinaryStream(long pos)
                                 throws SQLException

Specified by:
  `setBinaryStream` in interface `Blob`
Throws:
  `SQLException`

#### truncate

    public void truncate(long len)
                  throws SQLException

Specified by:
  `truncate` in interface `Blob`
Throws:
  `SQLException`

#### free

    public void free()
              throws SQLException

Specified by:
  `free` in interface `Blob`
Throws:
  `SQLException`

2018 Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Fabric | : ver. 2.4.0
Release Date | : March 5 2018