|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.io.InputStream
com.lizardtech.djvu.DataPool.CachedInputStream
public class DataPool.CachedInputStream
This class is an input stream which spans the accessable data in a DataPool object.
Constructor Summary | |
---|---|
DataPool.CachedInputStream()
Creates a new CachedInputStream object. |
Method Summary | |
---|---|
int |
available()
Query how much data is available without blocking. |
DataPool |
createDataPool(int size)
Create a DataPool representing this input stream. |
void |
mark(int readLimit)
Marks the current location for a reset() later. |
boolean |
markSuppoted()
Query if mark is supported. |
int |
read()
Read the next byte of data ranged 0 to 255. |
int |
read(byte[] b,
int off,
int len)
Read data into an array of bytes. |
int |
read16()
Read the next two bytes as a posative integer. |
int |
read24()
Read the next three bytes as a posative integer. |
int |
read8()
Read the next bytes as a posative integer. |
java.lang.String |
readUTF(int size)
Read up to the specified number of bytes as a String. |
void |
reset()
Restore the marked position |
long |
skip(long n)
Skip bytes without reading. |
Methods inherited from class java.io.InputStream |
---|
close, markSupported, read |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DataPool.CachedInputStream()
Method Detail |
---|
public int available()
available
in class java.io.InputStream
public DataPool createDataPool(int size)
size
- the amount of data in the DataPool
public void mark(int readLimit)
mark
in class java.io.InputStream
readLimit
- ignoredpublic boolean markSuppoted()
public int read() throws java.io.IOException
read
in class java.io.InputStream
java.io.IOException
- if an error occurspublic int read(byte[] b, int off, int len) throws java.io.IOException
read
in class java.io.InputStream
b
- byte array to copy data tooff
- byte array offset to start copying tolen
- maximum number of bytes to copy
java.io.IOException
public int read16()
public int read24()
public int read8()
public java.lang.String readUTF(int size) throws java.io.IOException
size
- maximum number of bytes to read
java.io.IOException
- if an error occurspublic void reset() throws java.io.IOException
reset
in class java.io.InputStream
java.io.IOException
- if an error occurspublic long skip(long n) throws java.io.IOException
skip
in class java.io.InputStream
n
- number of bytes to skip
java.io.IOException
- if an error occurs
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |