|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.servicemix.components.util.MarshalerSupport
org.apache.servicemix.components.util.DefaultFileMarshaler
org.apache.servicemix.components.util.BinaryFileMarshaler
public class BinaryFileMarshaler
A FileMarshaler that converts the given input stream into a binary attachment.
Field Summary |
---|
Fields inherited from class org.apache.servicemix.components.util.DefaultFileMarshaler |
---|
FILE_CONTENT, FILE_CONTENT_EXPRESSION, FILE_NAME_EXPRESSION, FILE_NAME_PROPERTY, FILE_PATH_PROPERTY, TEMP_FILE_NAME_EXPRESSION, TEMP_FILE_NAME_PROPERTY |
Constructor Summary | |
---|---|
BinaryFileMarshaler()
|
Method Summary | |
---|---|
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 |
Methods inherited from class org.apache.servicemix.components.util.DefaultFileMarshaler |
---|
getContent, getEncoding, getFileName, getOutputName, getTempOutputName, setContent, setEncoding, setFileName, writeMessageContent, writeValue |
Methods inherited from class org.apache.servicemix.components.util.MarshalerSupport |
---|
asString, getTransformer, setTransformer |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public BinaryFileMarshaler()
Method Detail |
---|
public 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
FileMarshaler
readMessage
in interface FileMarshaler
readMessage
in class DefaultFileMarshaler
exchange
- the message exchangemessage
- the message to populatein
- the input streampath
- the name of the file, URI or URL
java.io.IOException
javax.jbi.JBIException
public 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
FileMarshaler
writeMessage
in interface FileMarshaler
writeMessage
in class DefaultFileMarshaler
exchange
- the inbound message exchangemessage
- the inbound messageout
- the output stream to write to
java.io.IOException
javax.jbi.JBIException
protected static void copyInputStream(java.io.InputStream in, java.io.OutputStream out) throws java.io.IOException
in
- out
-
java.io.IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |