Class FileInputStreamCache
java.lang.Object
java.io.InputStream
org.apache.camel.converter.stream.FileInputStreamCache
- All Implemented Interfaces:
Closeable,AutoCloseable,org.apache.camel.StreamCache
A
StreamCache for Files.
Important: All the classes from the Camel release that implements StreamCache is NOT intended for end
users to create as instances, but they are part of Camels
stream-caching functionality.-
Field Summary
Fields inherited from interface org.apache.camel.StreamCache
DEFAULT_SPOOL_THRESHOLD -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintvoidclose()org.apache.camel.StreamCachecopy(org.apache.camel.Exchange exchange) booleaninMemory()longlength()longposition()intread()intread(byte[] b) intread(byte[] b, int off, int len) byte[]intreadNBytes(byte[] b, int off, int len) byte[]readNBytes(int len) voidreset()longskip(long n) longtransferTo(OutputStream out) voidwriteTo(OutputStream os) Methods inherited from class java.io.InputStream
mark, markSupported, nullInputStream, skipNBytes
-
Constructor Details
-
FileInputStreamCache
Only for testing purposes.
-
-
Method Details
-
close
public void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classInputStream
-
reset
public void reset()- Specified by:
resetin interfaceorg.apache.camel.StreamCache- Overrides:
resetin classInputStream
-
writeTo
- Specified by:
writeToin interfaceorg.apache.camel.StreamCache- Throws:
IOException
-
copy
- Specified by:
copyin interfaceorg.apache.camel.StreamCache- Throws:
IOException
-
inMemory
public boolean inMemory()- Specified by:
inMemoryin interfaceorg.apache.camel.StreamCache
-
length
public long length()- Specified by:
lengthin interfaceorg.apache.camel.StreamCache
-
position
public long position()- Specified by:
positionin interfaceorg.apache.camel.StreamCache
-
available
- Overrides:
availablein classInputStream- Throws:
IOException
-
read
- Specified by:
readin classInputStream- Throws:
IOException
-
read
- Overrides:
readin classInputStream- Throws:
IOException
-
read
- Overrides:
readin classInputStream- Throws:
IOException
-
skip
- Overrides:
skipin classInputStream- Throws:
IOException
-
readAllBytes
- Overrides:
readAllBytesin classInputStream- Throws:
IOException
-
readNBytes
- Overrides:
readNBytesin classInputStream- Throws:
IOException
-
readNBytes
- Overrides:
readNBytesin classInputStream- Throws:
IOException
-
transferTo
- Overrides:
transferToin classInputStream- Throws:
IOException
-