com.liferay.portal.kernel.util
Class RandomAccessInputStream
java.lang.Object
java.io.InputStream
com.liferay.portal.kernel.util.RandomAccessInputStream
- All Implemented Interfaces:
- Closeable, AutoCloseable
public class RandomAccessInputStream
- extends InputStream
This class enables any InputStream to be seekable by caching its data
in a temporary RandomAccessFile.
RandomAccessInputStream
public RandomAccessInputStream(InputStream inputStream)
throws IOException
- Throws:
IOException
close
public void close()
throws IOException
- Specified by:
close in interface Closeable- Specified by:
close in interface AutoCloseable- Overrides:
close in class InputStream
- Throws:
IOException
mark
public void mark(int readLimit)
- Overrides:
mark in class InputStream
markSupported
public boolean markSupported()
- Overrides:
markSupported in class InputStream
read
public int read()
throws IOException
- Specified by:
read in class InputStream
- Throws:
IOException
read
public int read(byte[] bytes,
int offset,
int length)
throws IOException
- Overrides:
read in class InputStream
- Throws:
IOException
reset
public void reset()
throws IOException
- Overrides:
reset in class InputStream
- Throws:
IOException
seek
public void seek(long position)
throws IOException
- Throws:
IOException
finalize
protected void finalize()
throws Throwable
- Overrides:
finalize in class Object
- Throws:
Throwable
readUntil
protected long readUntil(long position)
throws IOException
- Throws:
IOException