String data = exchange.getContext().getTypeConverter().convertTo(String.class, source);
return new SourceCache(data);
}
@Converter
public StreamCache convertToStreamCache(InputStream stream, Exchange exchange) throws IOException {
<BUG>CachedOutputStream cos = new CachedOutputStream(exchange.getContext().getProperties());
IOHelper.copyAndCloseInput(stream, cos);</BUG>
return cos.getStreamCache();
}
@Converter

String data = exchange.getContext().getTypeConverter().convertTo(String.class, source);
return new SourceCache(data);
}
@Converter
public StreamCache convertToStreamCache(InputStream stream, Exchange exchange) throws IOException {
CachedOutputStream cos = new CachedOutputStream(exchange);
IOHelper.copyAndCloseInput(stream, cos);
return cos.getStreamCache();
}
@Converter
