Package org.apache.camel.component.file
Class GenericFileDefaultBinding<T>
java.lang.Object
org.apache.camel.component.file.GenericFileDefaultBinding<T>
- All Implemented Interfaces:
GenericFileBinding<T>
Default binding for generic file.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetBody(GenericFile<T> file) Gets the body of the filevoidloadContent(org.apache.camel.Exchange exchange, GenericFile<?> file) Ensures the content is loaded from the file into memoryvoidsetBody(GenericFile<T> file, Object body) Sets the body from the given file
-
Constructor Details
-
GenericFileDefaultBinding
public GenericFileDefaultBinding()
-
-
Method Details
-
getBody
Description copied from interface:GenericFileBindingGets the body of the file- Specified by:
getBodyin interfaceGenericFileBinding<T>- Parameters:
file- the file- Returns:
- the body
-
setBody
Description copied from interface:GenericFileBindingSets the body from the given file- Specified by:
setBodyin interfaceGenericFileBinding<T>- Parameters:
file- the filebody- the body
-
loadContent
Description copied from interface:GenericFileBindingEnsures the content is loaded from the file into memory- Specified by:
loadContentin interfaceGenericFileBinding<T>- Parameters:
exchange- the current exchangefile- the file- Throws:
IOException- is thrown if the content could not be loaded
-