public class BinaryFileMarshaler extends DefaultFileMarshaler
FILE_CONTENT, FILE_CONTENT_EXPRESSION, FILE_NAME_EXPRESSION, FILE_NAME_PROPERTY, FILE_PATH_PROPERTY, TEMP_FILE_NAME_EXPRESSION, TEMP_FILE_NAME_PROPERTY| Constructor and Description |
|---|
BinaryFileMarshaler() |
| Modifier and Type | Method and Description |
|---|---|
protected static void |
copyInputStream(java.io.InputStream in,
java.io.OutputStream out)
Copy in stream to an out stream
|
java.lang.String |
getAttachment()
returns the key used to add the attachment to the message
|
java.lang.String |
getContentType()
returns the content type to use / expect
|
void |
readMessage(javax.jbi.messaging.MessageExchange exchange,
javax.jbi.messaging.NormalizedMessage message,
java.io.InputStream in,
java.lang.String path)
Converts the file stream to a normalized message.
|
void |
setAttachment(java.lang.String attachment)
sets the key of the attachment to use for adding a attachment to the
normalized message
|
void |
setContentType(java.lang.String contentType)
sets the content type to use / expect
|
void |
writeMessage(javax.jbi.messaging.MessageExchange exchange,
javax.jbi.messaging.NormalizedMessage message,
java.io.OutputStream out,
java.lang.String path)
Writes the inbound message to the destination stream of the given name
|
getContent, getEncoding, getFileName, getOutputName, getTempOutputName, setContent, setEncoding, setFileName, writeMessageContent, writeValueasString, getTransformer, setTransformerpublic java.lang.String getAttachment()
public void setAttachment(java.lang.String attachment)
attachment - the new key to usepublic java.lang.String getContentType()
public void setContentType(java.lang.String contentType)
contentType - the new content typepublic void readMessage(javax.jbi.messaging.MessageExchange exchange,
javax.jbi.messaging.NormalizedMessage message,
java.io.InputStream in,
java.lang.String path)
throws java.io.IOException,
javax.jbi.JBIException
FileMarshalerreadMessage in interface FileMarshalerreadMessage in class DefaultFileMarshalerexchange - the message exchangemessage - the message to populatein - the input streampath - the name of the file, URI or URLjava.io.IOExceptionjavax.jbi.JBIExceptionpublic void writeMessage(javax.jbi.messaging.MessageExchange exchange,
javax.jbi.messaging.NormalizedMessage message,
java.io.OutputStream out,
java.lang.String path)
throws java.io.IOException,
javax.jbi.JBIException
FileMarshalerwriteMessage in interface FileMarshalerwriteMessage in class DefaultFileMarshalerexchange - the inbound message exchangemessage - the inbound messageout - the output stream to write tojava.io.IOExceptionjavax.jbi.JBIExceptionprotected static void copyInputStream(java.io.InputStream in,
java.io.OutputStream out)
throws java.io.IOException
in - out - java.io.IOExceptionCopyright © 2005-2014 FuseSource. All Rights Reserved.