Package org.apache.camel.component.file
Interface GenericFileBinding<T>
- All Known Implementing Classes:
FileBinding
,GenericFileDefaultBinding
public interface GenericFileBinding<T>
Binding between the generic file and the body content.
-
Method Summary
Modifier and TypeMethodDescriptiongetBody
(GenericFile<T> 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<T> file, Object body) Sets the body from the given file
-
Method Details
-
getBody
Gets the body of the file- Parameters:
file
- the file- Returns:
- the body
-
setBody
Sets the body from the given file- Parameters:
file
- the filebody
- the body
-
loadContent
Ensures the content is loaded from the file into memory- Parameters:
exchange
- the current exchangefile
- the file- Throws:
IOException
- is thrown if the content could not be loaded
-