Package org.sonews.storage
Interface Article
public interface Article
A news article.
- Author:
- Christian Lins
-
Method Summary
Modifier and TypeMethodDescriptionEnumeration
<?> byte[]
getBody()
Returns the body string.String[]
Convenience method for getHeader(name, false).String[]
Returns the header field with given name.boolean
hasBody()
void
removeHeader
(String headerKey) Removes the header identified by the given key.void
setBody
(byte[] body) void
void
void
setHeaders
(javax.mail.internet.InternetHeaders headers)
-
Method Details
-
getAllHeaders
Enumeration<?> getAllHeaders() -
getBody
byte[] getBody()Returns the body string.- Returns:
- Body string. May be null if only headers were fetched from backend.
-
getGroups
- Returns:
- List of newsgroups this ArticleImpl belongs to.
-
getHeader
Returns the header field with given name.- Parameters:
name
- Name of the header field(s).returnNull
- If set to true, this method will return null instead of an empty array if there is no header field found.- Returns:
- Header values or empty string.
-
getHeader
Convenience method for getHeader(name, false).- Parameters:
name
-- Returns:
-
getHeaderSource
String getHeaderSource() -
getMessageID
String getMessageID() -
hasBody
boolean hasBody()- Returns:
- false if the body was not fetched from the backend
-
removeHeader
Removes the header identified by the given key.- Parameters:
headerKey
-
-
setBody
void setBody(byte[] body) -
setGroup
-
setHeader
-
setHeaders
void setHeaders(javax.mail.internet.InternetHeaders headers)
-