public class SimpleBlob extends Object implements Blob, Serializable
| Constructor and Description |
|---|
SimpleBlob() |
SimpleBlob(File f)
如果数据已经是byte[],请使用javax.sql.rowset.serial.SerialBlob
|
| Modifier and Type | Method and Description |
|---|---|
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 |
setFile(File file) |
void |
truncate(long len) |
protected File file
public SimpleBlob()
public SimpleBlob(File f)
public long length()
throws SQLException
length in interface BlobSQLExceptionpublic byte[] getBytes(long pos,
int length)
throws SQLException
getBytes in interface BlobSQLExceptionpublic InputStream getBinaryStream() throws SQLException
getBinaryStream in interface BlobSQLExceptionpublic long position(byte[] pattern,
long start)
throws SQLException
position in interface BlobSQLExceptionpublic long position(Blob pattern, long start) throws SQLException
position in interface BlobSQLExceptionpublic int setBytes(long pos,
byte[] bytes)
throws SQLException
setBytes in interface BlobSQLExceptionpublic int setBytes(long pos,
byte[] bytes,
int offset,
int len)
throws SQLException
setBytes in interface BlobSQLExceptionpublic OutputStream setBinaryStream(long pos) throws SQLException
setBinaryStream in interface BlobSQLExceptionpublic void truncate(long len)
throws SQLException
truncate in interface BlobSQLExceptionpublic void free()
throws SQLException
free in interface BlobSQLExceptionpublic InputStream getBinaryStream(long pos, long length) throws SQLException
getBinaryStream in interface BlobSQLExceptionpublic void setFile(File file)
Copyright © 2017. All rights reserved.