|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
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 FilterInputStream
IOException
public void mark(int readLimit)
mark
in class FilterInputStream
public void reset()
reset
in class FilterInputStream
public boolean markSupported()
markSupported
in class FilterInputStream
false
.public int read() throws IOException
read
in class FilterInputStream
IOException
public int read(byte[] barr) throws IOException
read
in class FilterInputStream
IOException
public int read(byte[] barr, int off, int len) throws IOException
read
in class FilterInputStream
IOException
public long skip(long n) throws IOException
skip
in class FilterInputStream
IOException
public void close() throws IOException
close
in interface Closeable
close
in class FilterInputStream
IOException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |