Liferay 6.1.2-ce-ga3

com.liferay.portal.kernel.util
Class RandomAccessInputStream

java.lang.Object
  extended by java.io.InputStream
      extended by com.liferay.portal.kernel.util.RandomAccessInputStream
All Implemented Interfaces:
Closeable

public class RandomAccessInputStream
extends InputStream

This class enables any InputStream to be seekable by caching its data in a temporary RandomAccessFile.


Constructor Summary
RandomAccessInputStream(InputStream inputStream)
           
 
Method Summary
 void close()
           
protected  void finalize()
           
 void mark(int readLimit)
           
 boolean markSupported()
           
 int read()
           
 int read(byte[] bytes, int offset, int length)
           
protected  long readUntil(long position)
           
 void reset()
           
 void seek(long position)
           
 
Methods inherited from class java.io.InputStream
available, read, skip
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RandomAccessInputStream

public RandomAccessInputStream(InputStream inputStream)
                        throws IOException
Throws:
IOException
Method Detail

close

public void close()
           throws IOException
Specified by:
close in interface Closeable
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

Liferay 6.1.2-ce-ga3