|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.io.InputStream
java.io.FilterInputStream
org.entityfs.util.io.RandomAccessToInputStreamAdapter
public class RandomAccessToInputStreamAdapter
This adapter treats a RandomAccess object as an
InputStream.
| Field Summary |
|---|
| Fields inherited from class java.io.FilterInputStream |
|---|
in |
| Constructor Summary | |
|---|---|
RandomAccessToInputStreamAdapter(RandomAccess ra)
Create an adapter between a RandomAccess and an
InputStream. |
|
RandomAccessToInputStreamAdapter(RandomAccess ra,
boolean closeRandomAccessWhenClosingStream)
Create an adapter between a RandomAccess and an
InputStream. |
|
| Method Summary | |
|---|---|
int |
available()
|
void |
close()
|
void |
mark(int readLimit)
This method does nothing. |
boolean |
markSupported()
|
int |
read()
|
int |
read(byte[] barr)
|
int |
read(byte[] barr,
int off,
int len)
|
void |
reset()
This method does nothing. |
long |
skip(long n)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public RandomAccessToInputStreamAdapter(RandomAccess ra)
RandomAccess and an
InputStream.
When this adapter is closed, it closes the underlying RandomAccess object. See
RandomAccessToInputStreamAdapter(RandomAccess, boolean)
ra - The RandomAccess to adapt.
public RandomAccessToInputStreamAdapter(RandomAccess ra,
boolean closeRandomAccessWhenClosingStream)
RandomAccess and an
InputStream.
ra - The RandomAccess to adapt.closeRandomAccessWhenClosingStream - Should the RandomAccess
be closed when this stream is closed?| Method Detail |
|---|
public int available()
throws IOException
available in class FilterInputStreamIOExceptionpublic void mark(int readLimit)
mark in class FilterInputStreampublic void reset()
reset in class FilterInputStreampublic boolean markSupported()
markSupported in class FilterInputStreamfalse.
public int read()
throws IOException
read in class FilterInputStreamIOException
public int read(byte[] barr)
throws IOException
read in class FilterInputStreamIOException
public int read(byte[] barr,
int off,
int len)
throws IOException
read in class FilterInputStreamIOException
public long skip(long n)
throws IOException
skip in class FilterInputStreamIOException
public void close()
throws IOException
close in interface Closeableclose in class FilterInputStreamIOException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||