org.springframework.integration.adapter.file
Class ByteArrayFileMapper

java.lang.Object
  extended by org.springframework.integration.message.AbstractMessageMapper<T,java.io.File>
      extended by org.springframework.integration.adapter.file.AbstractFileMapper<byte[]>
          extended by org.springframework.integration.adapter.file.ByteArrayFileMapper
All Implemented Interfaces:
org.springframework.integration.message.MessageMapper<byte[],java.io.File>

public class ByteArrayFileMapper
extends AbstractFileMapper<byte[]>

A MessageMapper implementation for messages with a byte array payload.

Author:
Mark Fisher

Field Summary
 
Fields inherited from class org.springframework.integration.adapter.file.AbstractFileMapper
logger
 
Constructor Summary
ByteArrayFileMapper(java.io.File parentDirectory)
           
 
Method Summary
protected  byte[] readMessagePayload(java.io.File file)
           
protected  void writeToFile(java.io.File file, byte[] payload)
           
 
Methods inherited from class org.springframework.integration.adapter.file.AbstractFileMapper
fromMessage, setBackupDirectory, setFileNameGenerator, toMessage
 
Methods inherited from class org.springframework.integration.message.AbstractMessageMapper
getIdGenerator, setIdGenerator
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ByteArrayFileMapper

public ByteArrayFileMapper(java.io.File parentDirectory)
Method Detail

readMessagePayload

protected byte[] readMessagePayload(java.io.File file)
                             throws java.lang.Exception
Specified by:
readMessagePayload in class AbstractFileMapper<byte[]>
Throws:
java.lang.Exception

writeToFile

protected void writeToFile(java.io.File file,
                           byte[] payload)
                    throws java.lang.Exception
Specified by:
writeToFile in class AbstractFileMapper<byte[]>
Throws:
java.lang.Exception