|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectbiz.c24.io.api.presentation.stream.DataReader
public abstract class DataReader
Data reader abstraction layer.
Provides the common API and general functional for an any incoming data reader.
| Nested Class Summary | |
|---|---|
class |
DataReader.Locator
The location representation class. |
| Constructor Summary | |
|---|---|
DataReader()
|
|
| Method Summary | |
|---|---|
int |
available()
Returns the number of bytes that can be read from this input stream without blocking. |
abstract void |
close()
Closes this reader and releases any system resources associated with it. |
boolean |
eof()
|
InputStream |
getDataStream()
Returns the underlied incoming data stream. |
DataReader.Locator |
getLocator()
Current locator getter. |
int |
getLookAhead()
Returns the look ahead limit. |
int |
getLookBehind()
Returns the look behind limit. |
DataReader.Locator |
mark()
Returns the snapshot of current location within data stream that can be used on rollback. |
void |
rollback(DataReader.Locator locator)
Rollback on specified location. |
void |
setLookAhead(int lookAhead)
Sets the look ahead limit. |
void |
setLookBehind(int lookBehind)
Sets the look behind limit. |
int |
skip(int n)
See the general contract of the skip method of
InputStream. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DataReader()
| Method Detail |
|---|
public final int getLookAhead()
public final int getLookBehind()
public final void setLookAhead(int lookAhead)
lookAhead - the new look ahead limit.public final void setLookBehind(int lookBehind)
lookBehind - the new look behind limit.public final DataReader.Locator getLocator()
locator instance. Returnad
instance shouldn't be changed.
public int skip(int n)
throws IOException
skip method of
InputStream.
n - the number of bytes to be skipped.
IOException - if an I/O error occurs.public final DataReader.Locator mark()
rollback(biz.c24.io.api.presentation.stream.DataReader.Locator)public void rollback(DataReader.Locator locator)
limit the exception is throwned.
locator - the location of point within data stream to where location should be rolled back.
IllegalStateException - If location is out from allowed range.mark()public int available()
available method of BufferedInputStream
returns the sum of the the number of bytes remaining to be read in the
buffer (count - pos) and the result of calling the
available method of the underlying input stream.
FilterInputStream.inpublic InputStream getDataStream()
exception.
incoming data stream.
UnsupportedOperationException - If implementation doesn't provided that ability.
public abstract void close()
throws IOException
IOException - if an I/O error occurs.public final boolean eof()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||