|
|||||||||
| Home >> All >> org >> ydp >> [ jai overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
org.ydp.jai
Class ForwardSeekableStream

java.lang.Objectjava.io.InputStream
org.ydp.jai.SeekableStream
org.ydp.jai.ForwardSeekableStream
- All Implemented Interfaces:
- java.io.Closeable, java.io.DataInput
- public class ForwardSeekableStream
- extends SeekableStream
A subclass of SeekableStream that may be used
to wrap a regular InputStream efficiently.
Seeking backwards is not supported.
This class is not a committed part of the JAI API. It may be removed or changed in future releases of JAI.
| Field Summary | |
(package private) long |
markPos
The marked position. |
(package private) long |
pointer
The current position. |
private java.io.InputStream |
src
The source InputStream. |
| Fields inherited from class org.ydp.jai.SeekableStream |
|
| Constructor Summary | |
ForwardSeekableStream(java.io.InputStream src)
Constructs a InputStreamForwardSeekableStream from a
regular InputStream. |
|
| Method Summary | |
int |
available()
Forwards the request to the real InputStream. |
boolean |
canSeekBackwards()
Returns false since seking backwards is not supported. |
void |
close()
Forwards the request to the real InputStream. |
long |
getFilePointer()
Returns the current position in the stream (bytes read). |
void |
mark(int readLimit)
Forwards the request to the real InputStream. |
boolean |
markSupported()
Forwards the request to the real InputStream. |
int |
read()
Forwards the request to the real InputStream. |
int |
read(byte[] b,
int off,
int len)
Forwards the request to the real InputStream. |
void |
reset()
Forwards the request to the real InputStream. |
void |
seek(long pos)
Seeks forward to the given position in the stream. |
long |
skip(long n)
Forwards the request to the real InputStream. |
| Methods inherited from class org.ydp.jai.SeekableStream |
finalize, readBoolean, readByte, readChar, readCharLE, readDouble, readDoubleLE, readFloat, readFloatLE, readFully, readFully, readInt, readIntLE, readLine, readLong, readLongLE, readShort, readShortLE, readUnsignedByte, readUnsignedInt, readUnsignedIntLE, readUnsignedShort, readUnsignedShortLE, readUTF, skipBytes, wrapInputStream |
| Methods inherited from class java.io.InputStream |
read |
| Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
src
private java.io.InputStream src
- The source
InputStream.
pointer
long pointer
- The current position.
markPos
long markPos
- The marked position.
| Constructor Detail |
ForwardSeekableStream
public ForwardSeekableStream(java.io.InputStream src)
- Constructs a
InputStreamForwardSeekableStreamfrom a regularInputStream.
| Method Detail |
read
public final int read()
throws java.io.IOException
- Forwards the request to the real
InputStream.- Specified by:
readin classSeekableStream
read
public final int read(byte[] b,
int off,
int len)
throws java.io.IOException
- Forwards the request to the real
InputStream.- Specified by:
readin classSeekableStream
skip
public final long skip(long n)
throws java.io.IOException
- Forwards the request to the real
InputStream.
available
public final int available()
throws java.io.IOException
- Forwards the request to the real
InputStream.
close
public final void close()
throws java.io.IOException
- Forwards the request to the real
InputStream.
mark
public final void mark(int readLimit)
- Forwards the request to the real
InputStream.- Overrides:
markin classSeekableStream
reset
public final void reset()
throws java.io.IOException
- Forwards the request to the real
InputStream.- Overrides:
resetin classSeekableStream
markSupported
public boolean markSupported()
- Forwards the request to the real
InputStream.- Overrides:
markSupportedin classSeekableStream
canSeekBackwards
public final boolean canSeekBackwards()
- Returns
falsesince seking backwards is not supported.- Overrides:
canSeekBackwardsin classSeekableStream
getFilePointer
public final long getFilePointer()
- Returns the current position in the stream (bytes read).
- Specified by:
getFilePointerin classSeekableStream
seek
public final void seek(long pos)
throws java.io.IOException
- Seeks forward to the given position in the stream.
If
posis smaller than the current position as returned bygetFilePointer(), nothing happens.- Specified by:
seekin classSeekableStream
|
|||||||||
| Home >> All >> org >> ydp >> [ jai overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC