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 File
s.
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 TypeMethodDescriptionint
void
close()
org.apache.camel.StreamCache
copy
(org.apache.camel.Exchange exchange) boolean
inMemory()
long
length()
long
position()
int
read()
int
read
(byte[] b) int
read
(byte[] b, int off, int len) byte[]
int
readNBytes
(byte[] b, int off, int len) byte[]
readNBytes
(int len) void
reset()
long
skip
(long n) long
transferTo
(OutputStream out) void
writeTo
(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:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Overrides:
close
in classInputStream
-
reset
public void reset()- Specified by:
reset
in interfaceorg.apache.camel.StreamCache
- Overrides:
reset
in classInputStream
-
writeTo
- Specified by:
writeTo
in interfaceorg.apache.camel.StreamCache
- Throws:
IOException
-
copy
- Specified by:
copy
in interfaceorg.apache.camel.StreamCache
- Throws:
IOException
-
inMemory
public boolean inMemory()- Specified by:
inMemory
in interfaceorg.apache.camel.StreamCache
-
length
public long length()- Specified by:
length
in interfaceorg.apache.camel.StreamCache
-
position
public long position()- Specified by:
position
in interfaceorg.apache.camel.StreamCache
-
available
- Overrides:
available
in classInputStream
- Throws:
IOException
-
read
- Specified by:
read
in classInputStream
- Throws:
IOException
-
read
- Overrides:
read
in classInputStream
- Throws:
IOException
-
read
- Overrides:
read
in classInputStream
- Throws:
IOException
-
skip
- Overrides:
skip
in classInputStream
- Throws:
IOException
-
readAllBytes
- Overrides:
readAllBytes
in classInputStream
- Throws:
IOException
-
readNBytes
- Overrides:
readNBytes
in classInputStream
- Throws:
IOException
-
readNBytes
- Overrides:
readNBytes
in classInputStream
- Throws:
IOException
-
transferTo
- Overrides:
transferTo
in classInputStream
- Throws:
IOException
-