in cxf/cxf-transport-nmr/src/main/java/org/apache/servicemix/cxf/transport/nmr/NMRMessageHelper.java [40:56]
public static InputStream convertMessageToInputStream(Source src) throws IOException {
CachedOutputStream cos = new CachedOutputStream();
try {
StaxUtils.copy(src, cos);
return cos.getInputStream();
} catch (XMLStreamException e) {
IOException ioe = new IOException(e.getMessage());
ioe.initCause(e);
throw ioe;
} finally {
try {
cos.close();
} catch (Exception ex) {
//ignore
}
}
}