|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.croftsoft.core.net.news.NntpLib
public final class NntpLib
Static library methods for NNTP (RFC 977).
Field Summary |
---|
Fields inherited from interface com.croftsoft.core.net.news.NntpConstants |
---|
COMMAND_ARTICLE, COMMAND_AUTHINFO, COMMAND_BODY, COMMAND_GROUP, COMMAND_HEAD, COMMAND_HELP, COMMAND_IHAVE, COMMAND_LAST, COMMAND_LIST, COMMAND_NEWGROUPS, COMMAND_NEWNEWS, COMMAND_NEXT, COMMAND_POST, COMMAND_QUIT, COMMAND_SLAVE, COMMAND_STAT, CR_LF, NNTP_PORT |
Method Summary | |
---|---|
static String |
authenticate(NntpSocket nntpSocket,
String username,
String password)
Sends username and password. |
static String |
decodeLine(String line)
Replaces starting ".." with ".". |
static void |
decodeLines(String[] lines)
Replaces lines that start with ".." with ".". |
static String |
encode(String messageBody)
Encodes a message body in preparation for an NNTP POST transmission. |
static StringBuffer |
encodeLines(String[] lines)
Replaces lines that start with "." with "..", appends CR_LF to each line, then adds a final line of "." + CR_LF. |
static void |
main(String[] args)
Posts a test message to a test newsgroup. |
static String |
post(String nntpServer,
Identifier identifier,
UsenetMessage usenetMessage,
Log log)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static void main(String[] args) throws IOException
IOException
public static String authenticate(NntpSocket nntpSocket, String username, String password) throws IOException, SecurityException
IOException
SecurityException
public static StringBuffer encodeLines(String[] lines)
public static String encode(String messageBody)
return encodeLines ( StringLib.toStringArray ( messageBody ) ).toString ( );
public static void decodeLines(String[] lines)
public static String decodeLine(String line)
public static String post(String nntpServer, Identifier identifier, UsenetMessage usenetMessage, Log log) throws IOException
IOException
|
CroftSoft Javadoc | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |