public class SQLiteBlob
extends java.lang.Object
implements java.sql.Blob
| Constructor and Description |
|---|
SQLiteBlob(byte[] bytes)
Construtor aceita array de bytes
|
SQLiteBlob(java.io.InputStream stream)
Construtor aceita InputStream
|
SQLiteBlob(java.lang.Object obj)
Construtor aceita qualquer objeto que possa ser serializado
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
checkFreed() |
void |
free() |
java.io.InputStream |
getBinaryStream() |
java.io.InputStream |
getBinaryStream(long pos,
long length)
Returna um InputStream contendo parte do valor do Blob, iniciando da
posição inicial até o tamanho especificado.
|
byte[] |
getBytes(long pos,
int length) |
java.lang.Object |
getObject() |
long |
length() |
long |
position(java.sql.Blob pattern,
long start) |
long |
position(byte[] pattern,
long start) |
java.io.OutputStream |
setBinaryStream(long value) |
int |
setBytes(long value,
byte[] bytes) |
int |
setBytes(long value,
byte[] bytes,
int pos,
int length) |
void |
truncate(long value) |
public SQLiteBlob(java.lang.Object obj)
throws java.io.IOException
obj - Objetojava.io.IOExceptionpublic SQLiteBlob(byte[] bytes)
bytes - Array de bytespublic SQLiteBlob(java.io.InputStream stream)
stream - InputStreampublic java.lang.Object getObject()
throws java.lang.Exception
java.lang.Exceptionpublic long length()
throws java.sql.SQLException
length in interface java.sql.Blobjava.sql.SQLExceptionpublic byte[] getBytes(long pos,
int length)
throws java.sql.SQLException
getBytes in interface java.sql.Blobjava.sql.SQLExceptionpublic int setBytes(long value,
byte[] bytes,
int pos,
int length)
throws java.sql.SQLException
setBytes in interface java.sql.Blobjava.sql.SQLExceptionpublic void truncate(long value)
throws java.sql.SQLException
truncate in interface java.sql.Blobjava.sql.SQLExceptionpublic int setBytes(long value,
byte[] bytes)
throws java.sql.SQLException
setBytes in interface java.sql.Blobjava.sql.SQLExceptionpublic java.io.InputStream getBinaryStream()
throws java.sql.SQLException
getBinaryStream in interface java.sql.Blobjava.sql.SQLExceptionpublic java.io.InputStream getBinaryStream(long pos,
long length)
throws java.sql.SQLException
getBinaryStream in interface java.sql.Blobpos - Posição iniciallength - Tamanhojava.sql.SQLExceptionpublic java.io.OutputStream setBinaryStream(long value)
throws java.sql.SQLException
setBinaryStream in interface java.sql.Blobjava.sql.SQLExceptionpublic void free()
throws java.sql.SQLException
free in interface java.sql.Blobjava.sql.SQLExceptionpublic long position(byte[] pattern,
long start)
throws java.sql.SQLException
position in interface java.sql.Blobjava.sql.SQLExceptionpublic long position(java.sql.Blob pattern,
long start)
throws java.sql.SQLException
position in interface java.sql.Blobjava.sql.SQLExceptionprotected void checkFreed()
throws java.sql.SQLException
java.sql.SQLException