public class FileInputStreamCache extends InputStream implements StreamCache
Constructor and Description |
---|
FileInputStreamCache(File file) |
Modifier and Type | Method and Description |
---|---|
int |
available() |
void |
close() |
protected InputStream |
getInputStream() |
int |
read() |
void |
reset()
Resets the StreamCache for a new stream consumption.
|
void |
writeTo(OutputStream os)
Writes the stream to the given output
|
mark, markSupported, read, read, skip
public FileInputStreamCache(File file) throws FileNotFoundException
FileNotFoundException
public void close()
close
in interface Closeable
close
in interface AutoCloseable
close
in class InputStream
public void reset()
StreamCache
reset
in interface StreamCache
reset
in class InputStream
public void writeTo(OutputStream os) throws IOException
StreamCache
writeTo
in interface StreamCache
os
- the destination to write toIOException
- is thrown if write failspublic int available() throws IOException
available
in class InputStream
IOException
public int read() throws IOException
read
in class InputStream
IOException
protected InputStream getInputStream() throws IOException
IOException
Apache Camel