com.liferay.portal.kernel.io
Class ByteArrayFileInputStream
java.lang.Object
java.io.InputStream
com.liferay.portal.kernel.io.ByteArrayFileInputStream
- All Implemented Interfaces:
- java.io.Closeable
public class ByteArrayFileInputStream
- extends java.io.InputStream
- Author:
- Shuyang Zhou
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
data
protected byte[] data
deleteOnClose
protected boolean deleteOnClose
file
protected java.io.File file
fileInputStream
protected java.io.FileInputStream fileInputStream
fileSize
protected long fileSize
index
protected int index
markIndex
protected int markIndex
threshold
protected int threshold
ByteArrayFileInputStream
public ByteArrayFileInputStream(java.io.File file,
int threshold)
ByteArrayFileInputStream
public ByteArrayFileInputStream(java.io.File file,
int threshold,
boolean deleteOnClose)
available
public int available()
throws java.io.IOException
- Overrides:
available in class java.io.InputStream
- Throws:
java.io.IOException
close
public void close()
throws java.io.IOException
- Specified by:
close in interface java.io.Closeable- Overrides:
close in class java.io.InputStream
- Throws:
java.io.IOException
getFile
public java.io.File getFile()
mark
public void mark(int readLimit)
- Overrides:
mark in class java.io.InputStream
markSupported
public boolean markSupported()
- Overrides:
markSupported in class java.io.InputStream
read
public int read()
throws java.io.IOException
- Specified by:
read in class java.io.InputStream
- Throws:
java.io.IOException
read
public int read(byte[] bytes)
throws java.io.IOException
- Overrides:
read in class java.io.InputStream
- Throws:
java.io.IOException
read
public int read(byte[] bytes,
int offset,
int length)
throws java.io.IOException
- Overrides:
read in class java.io.InputStream
- Throws:
java.io.IOException
reset
public void reset()
throws java.io.IOException
- Overrides:
reset in class java.io.InputStream
- Throws:
java.io.IOException
skip
public long skip(long skip)
throws java.io.IOException
- Overrides:
skip in class java.io.InputStream
- Throws:
java.io.IOException
initData
protected void initData()
throws java.io.IOException
- Throws:
java.io.IOException
initFileInputStream
protected void initFileInputStream()
throws java.io.IOException
- Throws:
java.io.IOException