return this.convertLinesToStream(message, in, path);
}
protected String convertLinesToString(NormalizedMessage message,
InputStream in, String path) throws IOException {
LineIterator lines = IOUtils.lineIterator(in, this.encoding);
StringBuffer aBuffer = new StringBuffer(1024);
if (this.xmlDeclaration) {
aBuffer.append(XMLDECLARATION_LINE);
}
aBuffer.append(XML_OPEN + this.docElementname);
if (this.docElementNamespace != null) {
aBuffer.append("xmlns=\"");
aBuffer.append(this.docElementNamespace);
aBuffer.append("\"");
}
aBuffer.append(" name=\"");
aBuffer.append(new File(path).getName());
aBuffer.append("\"");
aBuffer.append(" location=\"");
aBuffer.append(path);
aBuffer.append(XML_CLOSE_ATTR_NEWLINE);
this.processHeaderLines(aBuffer, lines);
int lineNumber = 1;
while (lines.hasNext()) {
String lineText = lines.nextLine();
aBuffer.append(XML_OPEN + this.lineElementname);
if (this.insertLineNumbers || this.insertRawData) {
if (this.insertLineNumbers) {
aBuffer.append(" number=\"");