com.croftsoft.core.net.news
Class UsenetMessage

java.lang.Object
  extended by com.croftsoft.core.net.news.UsenetMessage
All Implemented Interfaces:
Serializable

public final class UsenetMessage
extends Object
implements Serializable

USENET message (RFC 1036).

Since:
2001-07-27
Version:
2001-08-18
See Also:
RFC 1036: Standard for Interchange of USENET Messages, Serialized Form
Author:
David Wallace Croft

Field Summary
static String HEADER_APPROVED
           
static String HEADER_CONTROL
           
static String HEADER_DATE
           
static String HEADER_DISTRIBUTION
           
static String HEADER_EXPIRES
           
static String HEADER_FOLLOWUP_TO
           
static String HEADER_FROM
           
static String HEADER_KEYWORDS
           
static String HEADER_LINES
           
static String HEADER_MESSAGE_ID
           
static String HEADER_NEWSGROUPS
           
static String HEADER_ORGANIZATION
           
static String HEADER_PATH
           
static String HEADER_REFERENCES
           
static String HEADER_REPLY_TO
           
static String HEADER_SENDER
           
static String HEADER_SUBJECT
           
static String HEADER_SUMMARY
           
static String HEADER_XREF
           
static String[] HEADERS
           
 
Constructor Summary
UsenetMessage()
           
UsenetMessage(String from, String newsgroup, String subject, String messageBody)
           
 
Method Summary
 String getBody()
           
 String getHeader(String name)
           
static UsenetMessage parse(BufferedReader bufferedReader)
           
static String parseBody(BufferedReader bufferedReader)
           
static Pair parseHeaderLine(String headerLine)
           
 void setBody(String body)
           
 void setHeader(String name, String value)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

HEADER_FROM

public static final String HEADER_FROM
See Also:
Constant Field Values

HEADER_DATE

public static final String HEADER_DATE
See Also:
Constant Field Values

HEADER_NEWSGROUPS

public static final String HEADER_NEWSGROUPS
See Also:
Constant Field Values

HEADER_SUBJECT

public static final String HEADER_SUBJECT
See Also:
Constant Field Values

HEADER_MESSAGE_ID

public static final String HEADER_MESSAGE_ID
See Also:
Constant Field Values

HEADER_PATH

public static final String HEADER_PATH
See Also:
Constant Field Values

HEADER_FOLLOWUP_TO

public static final String HEADER_FOLLOWUP_TO
See Also:
Constant Field Values

HEADER_EXPIRES

public static final String HEADER_EXPIRES
See Also:
Constant Field Values

HEADER_REPLY_TO

public static final String HEADER_REPLY_TO
See Also:
Constant Field Values

HEADER_SENDER

public static final String HEADER_SENDER
See Also:
Constant Field Values

HEADER_REFERENCES

public static final String HEADER_REFERENCES
See Also:
Constant Field Values

HEADER_CONTROL

public static final String HEADER_CONTROL
See Also:
Constant Field Values

HEADER_DISTRIBUTION

public static final String HEADER_DISTRIBUTION
See Also:
Constant Field Values

HEADER_KEYWORDS

public static final String HEADER_KEYWORDS
See Also:
Constant Field Values

HEADER_SUMMARY

public static final String HEADER_SUMMARY
See Also:
Constant Field Values

HEADER_APPROVED

public static final String HEADER_APPROVED
See Also:
Constant Field Values

HEADER_LINES

public static final String HEADER_LINES
See Also:
Constant Field Values

HEADER_XREF

public static final String HEADER_XREF
See Also:
Constant Field Values

HEADER_ORGANIZATION

public static final String HEADER_ORGANIZATION
See Also:
Constant Field Values

HEADERS

public static final String[] HEADERS
Constructor Detail

UsenetMessage

public UsenetMessage()

UsenetMessage

public UsenetMessage(String from,
                     String newsgroup,
                     String subject,
                     String messageBody)
Method Detail

parse

public static UsenetMessage parse(BufferedReader bufferedReader)
                           throws IOException
Throws:
IOException

parseBody

public static String parseBody(BufferedReader bufferedReader)
                        throws IOException
Throws:
IOException

parseHeaderLine

public static Pair parseHeaderLine(String headerLine)

getHeader

public String getHeader(String name)

getBody

public String getBody()

setHeader

public void setHeader(String name,
                      String value)

setBody

public void setBody(String body)

toString

public String toString()
Overrides:
toString in class Object

CroftSoft Javadoc

CroftSoft Core Javadoc (2008-09-28 20:58:02)