"writing the text/plain version of the parsed content",e);
}
final Writer plainTextWriter = new OutputStreamWriter(plainTextSink.getOutputStream(), UTF8);
final ContentHandler textHandler = new BodyContentHandler( //only the Body
new PlainTextHandler(plainTextWriter, false,skipLinebreaks)); //skip ignoreable
final ToXMLContentHandler xhtmlHandler;
final ContentHandler mainHandler;
ContentSink xhtmlSink = null;
try {
if(!plainMediaType.equals(XHTML)){ //do not parse XHTML from XHTML
try {
xhtmlSink = ciFactory.createContentSink(XHTML +"; charset="+UTF8.name());
} catch (IOException e) {
throw new EngineException("Error while initialising Blob for" +
"writing the application/xhtml+xml version of the parsed content",e);
}
try {
xhtmlHandler = new ToXMLContentHandler(xhtmlSink.getOutputStream(),UTF8.name());
} catch (UnsupportedEncodingException e) {
throw new EngineException("This system does not support the encoding "+UTF8,e);
}
mainHandler = new MultiHandler(textHandler,xhtmlHandler);
} else {