java.lang.Object
java.io.InputStream
org.postgresql.pljava.jdbc.BlobValue
- All Implemented Interfaces:
Closeable
,AutoCloseable
,Blob
Implementation of
Blob
for the SPI connection.- Author:
- Thomas Hallgren
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
void
free()
getBinaryStream
(long pos, long length) byte[]
getBytes
(long pos, int length) void
getContents
(ByteBuffer buf) Called from within...static int
getStreamLength
(InputStream value) long
length()
void
mark
(int readLimit) boolean
long
position
(byte[] pattern, long start) Not supported.long
Not supported.int
read()
int
read
(byte[] b) int
read
(byte[] b, int off, int len) void
reset()
setBinaryStream
(long pos) In this method is not supported byBlobValue
int
setBytes
(long pos, byte[] bytes) In this method is not supported byBlobValue
int
setBytes
(long pos, byte[] bytes, int offset, int len) In this method is not supported byBlobValue
long
skip
(long nBytes) void
truncate
(long len) In this method is not supported byBlobValue
Methods inherited from class java.io.InputStream
close, nullInputStream, readAllBytes, readNBytes, readNBytes, skipNBytes, transferTo
-
Constructor Details
-
BlobValue
public BlobValue(byte[] bytes) -
BlobValue
-
-
Method Details
-
getStreamLength
- Throws:
SQLException
-
available
- Overrides:
available
in classInputStream
- Throws:
IOException
-
getBinaryStream
- Specified by:
getBinaryStream
in interfaceBlob
-
getBytes
- Specified by:
getBytes
in interfaceBlob
- Throws:
SQLException
-
getContents
Called from within...- Parameters:
buf
- a buffer that reflects the internally allocated bytea buffer. This size of this buffer will be exactly the size returned by a call tolength()
.- Throws:
IOException
-
length
public long length() -
mark
public void mark(int readLimit) - Overrides:
mark
in classInputStream
-
markSupported
public boolean markSupported()- Overrides:
markSupported
in classInputStream
-
position
Not supported. -
position
public long position(byte[] pattern, long start) Not supported. -
read
- Specified by:
read
in classInputStream
- Throws:
IOException
-
read
- Overrides:
read
in classInputStream
- Throws:
IOException
-
read
- Overrides:
read
in classInputStream
- Throws:
IOException
-
reset
- Overrides:
reset
in classInputStream
- Throws:
IOException
-
setBinaryStream
In this method is not supported byBlobValue
- Specified by:
setBinaryStream
in interfaceBlob
-
setBytes
public int setBytes(long pos, byte[] bytes) In this method is not supported byBlobValue
-
setBytes
public int setBytes(long pos, byte[] bytes, int offset, int len) In this method is not supported byBlobValue
-
skip
- Overrides:
skip
in classInputStream
- Throws:
IOException
-
truncate
public void truncate(long len) In this method is not supported byBlobValue
-
getBinaryStream
- Specified by:
getBinaryStream
in interfaceBlob
- Throws:
SQLException
-
free
- Specified by:
free
in interfaceBlob
- Throws:
SQLException
-