org.apache.james.nntpserver.repository
Interface NNTPArticle


public interface NNTPArticle

Contract exposed by a NewsGroup Article


Method Summary
 int getArticleNumber()
          Gets the article number for this article.
 NNTPGroup getGroup()
          Gets the group containing this article.
 java.lang.String getHeader(java.lang.String headerName)
          Gets the header with the specified headerName.
 java.lang.String getUniqueID()
          Gets the unique message id for this article.
 void writeArticle(java.io.OutputStream wrt)
          Writes the whole article to a writer.
 void writeBody(java.io.OutputStream wrt)
          Writes the article body to a writer.
 void writeHead(java.io.OutputStream wrt)
          Writes the article headers to a writer.
 void writeOverview(java.io.OutputStream wrt)
          Writes the article overview to a writer.
 

Method Detail

getGroup

NNTPGroup getGroup()
Gets the group containing this article.

Returns:
the group

getArticleNumber

int getArticleNumber()
Gets the article number for this article.

Returns:
the article number

getUniqueID

java.lang.String getUniqueID()
Gets the unique message id for this article.

Returns:
the message id

writeArticle

void writeArticle(java.io.OutputStream wrt)
Writes the whole article to a writer.

Parameters:
wrt - the OutputStream to which the article is written.

writeHead

void writeHead(java.io.OutputStream wrt)
Writes the article headers to a writer.

Parameters:
wrt - the OutputStream to which the article is written.

writeBody

void writeBody(java.io.OutputStream wrt)
Writes the article body to a writer.

Parameters:
wrt - the OutputStream to which the article is written.

writeOverview

void writeOverview(java.io.OutputStream wrt)
Writes the article overview to a writer.

Parameters:
wrt - the OutputStream to which the article is written.

getHeader

java.lang.String getHeader(java.lang.String headerName)
Gets the header with the specified headerName. Returns null if the header doesn't exist.

Parameters:
headerName - the name of the header being retrieved.


Copyright © 2002-2007 The Apache Software Foundation. All Rights Reserved.