public class FileBinding extends Object implements GenericFileBinding<File>
File
type.Constructor and Description |
---|
FileBinding() |
Modifier and Type | Method and Description |
---|---|
Object |
getBody(GenericFile<File> file)
Gets the body of the file
|
void |
loadContent(Exchange exchange,
GenericFile<?> file)
Ensures the content is loaded from the file into memory
|
void |
setBody(GenericFile<File> file,
Object body)
Sets the body from the given file
|
public FileBinding()
public Object getBody(GenericFile<File> file)
GenericFileBinding
getBody
in interface GenericFileBinding<File>
file
- the filepublic void setBody(GenericFile<File> file, Object body)
GenericFileBinding
setBody
in interface GenericFileBinding<File>
file
- the filebody
- the bodypublic void loadContent(Exchange exchange, GenericFile<?> file) throws IOException
GenericFileBinding
loadContent
in interface GenericFileBinding<File>
exchange
- the current exchangefile
- the fileIOException
- is thrown if the content could not be loadedApache Camel