} catch (IOException e) {
log.log(Level.SEVERE, "WSS1002.error.canonicalizing.textplain",
new Object[] {e.getMessage()});
throw new javax.xml.crypto.dsig.TransformException(e);
}
CRLFOutputStream crlfOutStream = null;
ByteArrayOutputStream bout = null;
if(outputStream == null){
bout = new ByteArrayOutputStream();
crlfOutStream = new CRLFOutputStream(bout);
}else{
crlfOutStream = new CRLFOutputStream(outputStream);
}
while(len > 0){
try {
crlfOutStream.write(data,0,len);
len = input.read(data);
} catch (IOException e) {
log.log(Level.SEVERE, "WSS1002.error.canonicalizing.textplain",
new Object[] {e.getMessage()});
throw new javax.xml.crypto.dsig.TransformException(e);