|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.io.InputStream
java.io.FilterInputStream
org.apache.commons.io.input.ProxyInputStream
org.apache.commons.io.input.AutoCloseInputStream
org.apache.jackrabbit.core.data.db.TempFileInputStream
public class TempFileInputStream
An input stream from a temporary file. The file is deleted when the stream is closed, fully read, or garbage collected.
This class does not support mark/reset. It is always to be wrapped using a BufferedInputStream.
| Field Summary |
|---|
| Fields inherited from class java.io.FilterInputStream |
|---|
in |
| Constructor Summary | |
|---|---|
TempFileInputStream(File file)
Construct a new temporary file input stream. |
|
| Method Summary | |
|---|---|
int |
available()
|
void |
close()
|
void |
mark(int readlimit)
This method does nothing. |
boolean |
markSupported()
Check whether mark and reset are supported. |
int |
read()
|
int |
read(byte[] b)
|
int |
read(byte[] b,
int off,
int len)
|
void |
reset()
|
long |
skip(long n)
|
static long |
writeToFileAndClose(InputStream in,
File file)
Copy the data to a file and close the input stream afterwards. |
| Methods inherited from class org.apache.commons.io.input.AutoCloseInputStream |
|---|
finalize |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public TempFileInputStream(File file)
throws FileNotFoundException
file - the temporary file
FileNotFoundException| Method Detail |
|---|
public static long writeToFileAndClose(InputStream in,
File file)
throws IOException
in - the input streamfile - the target file
IOException
public void close()
throws IOException
close in interface Closeableclose in class org.apache.commons.io.input.AutoCloseInputStreamIOException
public int available()
throws IOException
available in class org.apache.commons.io.input.ProxyInputStreamIOExceptionpublic void mark(int readlimit)
mark in class org.apache.commons.io.input.ProxyInputStreampublic boolean markSupported()
markSupported in class org.apache.commons.io.input.ProxyInputStream
public long skip(long n)
throws IOException
skip in class org.apache.commons.io.input.ProxyInputStreamIOException
public void reset()
throws IOException
reset in class org.apache.commons.io.input.ProxyInputStreamIOException
public int read(byte[] b,
int off,
int len)
throws IOException
read in class org.apache.commons.io.input.AutoCloseInputStreamIOException
public int read(byte[] b)
throws IOException
read in class org.apache.commons.io.input.AutoCloseInputStreamIOException
public int read()
throws IOException
read in class org.apache.commons.io.input.AutoCloseInputStreamIOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||