|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.io.Reader
com.intersys.objects.CacheReader
A CacheReader
obtains input bytes from a Cache
Database. Usually it is mapped to some global in Cache. This is a
wrapper class around CharacterStream
. Note, that if
you use this wrapper class it is not reommended to use direct calls
to CharacterStream
.
BinaryStream
in Cache ,
GlobalCharacterStream
,
Serialized FormConstructor Summary | |
CacheReader(CharacterStream stream)
|
Method Summary | |
void |
close()
|
void |
mark(int readlimit)
Marks the current position in this input stream. |
boolean |
markSupported()
|
int |
read()
|
int |
read(char[] b,
int off,
int len)
|
String |
read(int len)
|
boolean |
ready()
|
void |
reset()
Repositions this stream to the position at the time the mark method was last called on this input stream. |
void |
rewind()
Rewinds stream, so the next char will be the first char stored in this Cache Stream (the first char stored in global). |
void |
seek(long pos)
Repositions this stream to the given position. |
long |
skip(long n)
Skips over and discards n chars of data from this input
stream. |
long |
tell()
Returns the current position in the stream. |
Methods inherited from class java.io.Reader |
read |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public CacheReader(CharacterStream stream) throws CacheException
Method Detail |
public int read(char[] b, int off, int len) throws IOException
IOException
public int read() throws IOException
IOException
public void rewind() throws CacheException
CacheException
public long tell()
Note, this method works only if all calls to the underlying
GlobalCharacterStream
goes through this
CacheReader
object.
seek(long)
,
rewind()
,
mark(int)
,
reset()
,
GlobalCharacterStream
public boolean markSupported()
public void mark(int readlimit) throws IOException
reset
method repositions this stream at the last marked
position so that subsequent reads re-read the same chars.
Note, this method works only if all calls to the underlying
GlobalCharacterStream
goes through this
CacheReader
object.
readlimit
- Ignored.
IOException
seek(long)
,
rewind()
,
tell()
,
reset()
public void reset() throws IOException
mark
method was last called on this input stream.
Note, this method works only if all calls to the underlying
GlobalCharacterStream
goes through this
CacheReader
object.
IOException
mark(int)
,
seek(long)
,
rewind()
,
tell()
public void seek(long pos) throws IOException
Note, this method works only if all calls to the underlying
GlobalCharacterStream
goes through this
CacheReader
object.
pos
- New postition for the stream.
IOException
mark(int)
,
seek(long)
,
rewind()
,
tell()
public long skip(long n) throws IOException
n
chars of data from this input
stream. The skip
method may, for a variety of reasons, end
up skipping over some smaller number of chars, possibly 0
.
This may result from any of a number of conditions; reaching end of file
before n
chars have been skipped is only one possibility.
The actual number of chars skipped is returned. If n
is
negative, no chars are skipped.
n
- the number of chars to be skipped.
IOException
- if an I/O error occurs.public String read(int len) throws IOException
IOException
public boolean ready() throws IOException
IOException
public void close() throws IOException
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |