1.1 --- a/org/sonews/util/io/ArticleInputStream.java Wed Jul 01 10:48:22 2009 +0200
1.2 +++ b/org/sonews/util/io/ArticleInputStream.java Wed Jul 22 14:04:05 2009 +0200
1.3 @@ -20,9 +20,9 @@
1.4
1.5 import java.io.ByteArrayOutputStream;
1.6 import java.io.IOException;
1.7 -import org.sonews.daemon.storage.*;
1.8 import java.io.InputStream;
1.9 import java.io.UnsupportedEncodingException;
1.10 +import org.sonews.storage.Article;
1.11
1.12 /**
1.13 * Capsulates an Article to provide a raw InputStream.
1.14 @@ -41,11 +41,12 @@
1.15 final ByteArrayOutputStream out = new ByteArrayOutputStream();
1.16 out.write(art.getHeaderSource().getBytes("UTF-8"));
1.17 out.write("\r\n\r\n".getBytes());
1.18 - out.write(art.getBody().getBytes(art.getBodyCharset()));
1.19 + out.write(art.getBody()); // Without CRLF
1.20 out.flush();
1.21 this.buffer = out.toByteArray();
1.22 }
1.23 -
1.24 +
1.25 + @Override
1.26 public int read()
1.27 {
1.28 if(offset >= buffer.length)