try {
canon.setOutputStream(getOutputStream());
} catch (XMLSecurityException e) {
throw new XMLStreamException(e);
}
canon.transform(inputStream);
} else if (lowerCaseMimeType != null && lowerCaseMimeType.startsWith("text/")) {
CRLFOutputStream crlfOutputStream = new CRLFOutputStream(getOutputStream());
try {
setOutputStream(crlfOutputStream);