org.apache.camel.component.file
Class FileBinding

java.lang.Object
  extended by org.apache.camel.component.file.FileBinding
All Implemented Interfaces:
Serializable, GenericFileBinding<File>

public class FileBinding
extends Object
implements GenericFileBinding<File>, Serializable

File binding with the File type.

See Also:
Serialized Form

Constructor Summary
FileBinding()
           
 
Method Summary
 Object getBody(GenericFile<File> file)
          Gets the body of the file
 void loadContent(Exchange exchange, GenericFile<File> file)
          Loads the content from the file into memory
 void setBody(GenericFile<File> file, Object body)
          Sets the body from the given file
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileBinding

public FileBinding()
Method Detail

getBody

public Object getBody(GenericFile<File> file)
Description copied from interface: GenericFileBinding
Gets the body of the file

Specified by:
getBody in interface GenericFileBinding<File>
Parameters:
file - the file
Returns:
the body

setBody

public void setBody(GenericFile<File> file,
                    Object body)
Description copied from interface: GenericFileBinding
Sets the body from the given file

Specified by:
setBody in interface GenericFileBinding<File>
Parameters:
file - the file
body - the body

loadContent

public void loadContent(Exchange exchange,
                        GenericFile<File> file)
                 throws IOException
Description copied from interface: GenericFileBinding
Loads the content from the file into memory

Specified by:
loadContent in interface GenericFileBinding<File>
Parameters:
exchange - the current exchange
file - the file
Throws:
IOException - is thrown if the content could not be loaded


Apache CAMEL