Package org.sonews.util.io
Class ArticleWriter
java.lang.Object
org.sonews.util.io.ArticleWriter
Posts an ArticleImpl to a NNTP server using the POST command.
- Since:
- sonews/0.5.0
- Author:
- Christian Lins
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
protected void
protected void
void
writeArticle
(byte[] rawArticle) Writes the raw content of an article to the remote server.void
writeArticle
(Article article) protected void
writeLine
(byte[] buffer, int len) Writes the given buffer to the connect remote server.
-
Constructor Details
-
ArticleWriter
- Throws:
IOException
UnknownHostException
-
-
Method Details
-
close
-
finishPOST
- Throws:
IOException
-
preparePOST
- Throws:
IOException
-
writeArticle
-
writeArticle
Writes the raw content of an article to the remote server. This method does no charset conversion/handling of any kind so its the preferred method for sending an article to remote peers.- Parameters:
rawArticle
-- Throws:
IOException
-
writeLine
Writes the given buffer to the connect remote server.- Parameters:
buffer
-len
-- Throws:
IOException
-