SPARK-1385

git-svn-id: http://svn.igniterealtime.org/svn/repos/spark/trunk@12512 b35dd754-fafc-0310-a699-88a17e54d16e
This commit is contained in:
Wolf Posdorfer
2011-06-20 11:14:28 +00:00
committed by wolf.posdorfer
parent 43c74186a9
commit 07caa3587a

View File

@ -134,6 +134,15 @@ public final class ChatTranscripts {
// We want to append near the end of the document as the last
// child in the transcript.
final String endTag = " </messages>\n</transcript>";
String line = raf.readLine();
if(line.contains("</messages></transcript>"))
{
// replace the old one with the new one
line = line.replace("</messages></transcript>",endTag);
raf.write(line.getBytes("UTF-8"));
}
builder.append(endTag);
raf.seek(transcriptFile.length() - endTag.length());