|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.io.InputStream
org.postgresql.largeobject.BlobInputStream
public class BlobInputStream
This is an implementation of an InputStream from a large object.
Constructor Summary | |
---|---|
BlobInputStream(LargeObject lo)
|
|
BlobInputStream(LargeObject lo,
int bsize)
|
Method Summary | |
---|---|
void |
close()
Closes this input stream and releases any system resources associated with the stream. |
void |
mark(int readlimit)
Marks the current position in this input stream. |
boolean |
markSupported()
Tests if this input stream supports the mark and
reset methods. |
int |
read()
The minimum required to implement input stream |
void |
reset()
Repositions this stream to the position at the time the mark method was last called on this input stream. |
Methods inherited from class java.io.InputStream |
---|
available, read, read, skip |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public BlobInputStream(LargeObject lo)
lo
- LargeObject to read frompublic BlobInputStream(LargeObject lo, int bsize)
lo
- LargeObject to read frombsize
- buffer sizeMethod Detail |
---|
public int read() throws java.io.IOException
read
in class java.io.InputStream
java.io.IOException
public void close() throws java.io.IOException
The close
method of InputStream
does
nothing.
close
in interface java.io.Closeable
close
in class java.io.InputStream
java.io.IOException
- if an I/O error occurs.public void mark(int readlimit)
reset
method repositions this stream at the last marked
position so that subsequent reads re-read the same bytes.
The readlimit
arguments tells this input stream to
allow that many bytes to be read before the mark position gets
invalidated.
The general contract of mark
is that, if the method
markSupported
returns true
, the stream somehow
remembers all the bytes read after the call to mark
and
stands ready to supply those same bytes again if and whenever the method
reset
is called. However, the stream is not required to
remember any data at all if more than readlimit
bytes are
read from the stream before reset
is called.
Marking a closed stream should not have any effect on the stream.
mark
in class java.io.InputStream
readlimit
- the maximum limit of bytes that can be read before
the mark position becomes invalid.InputStream.reset()
public void reset() throws java.io.IOException
mark
method was last called on this input stream.
NB: If mark is not called we move to the begining.
reset
in class java.io.InputStream
java.io.IOException
InputStream.mark(int)
,
IOException
public boolean markSupported()
mark
and
reset
methods. The markSupported
method of
InputStream
returns false
.
markSupported
in class java.io.InputStream
true
if this true type supports the mark and reset
method; false
otherwise.InputStream.mark(int)
,
InputStream.reset()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |