public void setContentType(String contentType) {
this.contentType = contentType;
}
public void readMessage(MessageExchange exchange, NormalizedMessage message, InputStream in, String path) throws IOException, JBIException {
DataSource ds = new StreamDataSource(in, contentType);
DataHandler handler = new DataHandler(ds);
message.addAttachment(attachment, handler);
message.setProperty(FILE_NAME_PROPERTY, new File(path).getName());
message.setProperty(FILE_PATH_PROPERTY, path);
}