Liferay 6.2-ce-ga5

com.liferay.portal.kernel.io
Class ByteArrayFileInputStream

java.lang.Object
  extended by java.io.InputStream
      extended by com.liferay.portal.kernel.io.ByteArrayFileInputStream
All Implemented Interfaces:
Closeable, AutoCloseable

public class ByteArrayFileInputStream
extends InputStream


Field Summary
protected  byte[] data
           
protected  boolean deleteOnClose
           
protected  File file
           
protected  FileInputStream fileInputStream
           
protected  long fileSize
           
protected  int index
           
protected  int markIndex
           
protected  int threshold
           
 
Constructor Summary
ByteArrayFileInputStream(File file, int threshold)
           
ByteArrayFileInputStream(File file, int threshold, boolean deleteOnClose)
           
 
Method Summary
 int available()
           
 void close()
           
 File getFile()
           
protected  void initData()
           
protected  void initFileInputStream()
           
 void mark(int readLimit)
           
 boolean markSupported()
           
 int read()
           
 int read(byte[] bytes)
           
 int read(byte[] bytes, int offset, int length)
           
 void reset()
           
 long skip(long skip)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

data

protected byte[] data

deleteOnClose

protected boolean deleteOnClose

file

protected File file

fileInputStream

protected FileInputStream fileInputStream

fileSize

protected long fileSize

index

protected int index

markIndex

protected int markIndex

threshold

protected int threshold
Constructor Detail

ByteArrayFileInputStream

public ByteArrayFileInputStream(File file,
                                int threshold)

ByteArrayFileInputStream

public ByteArrayFileInputStream(File file,
                                int threshold,
                                boolean deleteOnClose)
Method Detail

available

public int available()
              throws IOException
Overrides:
available in class InputStream
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

getFile

public File getFile()

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)
         throws IOException
Overrides:
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

skip

public long skip(long skip)
          throws IOException
Overrides:
skip in class InputStream
Throws:
IOException

initData

protected void initData()
                 throws IOException
Throws:
IOException

initFileInputStream

protected void initFileInputStream()
                            throws IOException
Throws:
IOException

Liferay 6.2-ce-ga5