Package org.apache.camel.component.file
Class FileBinding
java.lang.Object
org.apache.camel.component.file.FileBinding
- All Implemented Interfaces:
GenericFileBinding<File>
File binding with the
File
type.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetBody
(GenericFile<File> file) Gets the body of the filevoid
loadContent
(org.apache.camel.Exchange exchange, GenericFile<?> file) Ensures the content is loaded from the file into memoryvoid
setBody
(GenericFile<File> file, Object body) Sets the body from the given file
-
Constructor Details
-
FileBinding
public FileBinding()
-
-
Method Details
-
getBody
Description copied from interface:GenericFileBinding
Gets the body of the file- Specified by:
getBody
in interfaceGenericFileBinding<File>
- Parameters:
file
- the file- Returns:
- the body
-
setBody
Description copied from interface:GenericFileBinding
Sets the body from the given file- Specified by:
setBody
in interfaceGenericFileBinding<File>
- Parameters:
file
- the filebody
- the body
-
loadContent
Description copied from interface:GenericFileBinding
Ensures the content is loaded from the file into memory- Specified by:
loadContent
in interfaceGenericFileBinding<File>
- Parameters:
exchange
- the current exchangefile
- the file- Throws:
IOException
- is thrown if the content could not be loaded
-