|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.abstracthorizon.mercury.imap.response.Response
org.abstracthorizon.mercury.imap.response.NumberResponse
org.abstracthorizon.mercury.imap.response.FetchResponse
public class FetchResponse
Fetch response
Field Summary | |
---|---|
static byte[] |
empty
Empty buffer |
protected static org.slf4j.Logger |
logger
Logger |
Fields inherited from class org.abstracthorizon.mercury.imap.response.NumberResponse |
---|
mnemonic, number |
Fields inherited from class org.abstracthorizon.mercury.imap.response.Response |
---|
CONTINUATION_RESPONSE, session, TAGGED_RESPONSE, UNTAGGED_RESPONSE |
Constructor Summary | |
---|---|
FetchResponse(IMAPSession session,
int num)
Constructor |
Method Summary | |
---|---|
FetchResponse |
append(Body b,
javax.mail.internet.MimeMessage msg)
Append message to response |
protected void |
appendAddress(javax.mail.Address[] a)
Appends addresses |
protected void |
appendAddress(String[] ss)
Appends addresses |
void |
appendCloseP()
Appends ) |
protected void |
appendDate(Date d)
Appends date. |
protected void |
appendDisposition(javax.mail.internet.MimePart part)
Appends disposition or NIL |
void |
appendNil()
Appends NIL |
protected void |
appendNString(String s)
Appends NSTRING. |
protected void |
appendObject(Object o)
Appends object calling toString method |
void |
appendOpenP()
Appends ( |
protected String |
appendParameter(String param)
Appends parameter |
protected void |
appendParameters(String type)
Appends parameters |
void |
appendQuote()
Appends quotation marks |
void |
appendSpace()
Appends space |
protected void |
appendString(String s)
Appends string escaping all offending characters |
protected void |
appendString(String[] s)
Appends strings separated with spaces |
protected int |
countLines(javax.mail.Part part)
Counts lines in given part |
void |
createBodyStructure(javax.mail.internet.MimePart p,
boolean extensible)
Creates body structore and appends it to response |
void |
createEnvelope(javax.mail.internet.MimeMessage m)
Creates envelope and appends it to response |
protected String |
getSubtype(String type)
Returns mime sub type |
protected String |
getType(String type)
Returns mime type |
javax.mail.Address[] |
safeFrom(javax.mail.internet.MimeMessage m)
Returns from addresses or null in case of an error) |
javax.mail.Address[] |
safeRecipients(javax.mail.internet.MimeMessage m,
javax.mail.Message.RecipientType type)
Returns list of recipients or null |
javax.mail.Address[] |
safeSender(javax.mail.internet.MimeMessage m)
Returns sender addresses or null in case of an error) |
Methods inherited from class org.abstracthorizon.mercury.imap.response.Response |
---|
append, append, append, append, append, append, append, append, commit, submit |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final org.slf4j.Logger logger
public static final byte[] empty
Constructor Detail |
---|
public FetchResponse(IMAPSession session, int num)
session
- imap sessionnum
- numberMethod Detail |
---|
public FetchResponse append(Body b, javax.mail.internet.MimeMessage msg) throws IOException, javax.mail.MessagingException
b
- body requestmsg
- message
IOException
javax.mail.MessagingException
public void createEnvelope(javax.mail.internet.MimeMessage m) throws javax.mail.MessagingException
m
- message
javax.mail.MessagingException
public javax.mail.Address[] safeRecipients(javax.mail.internet.MimeMessage m, javax.mail.Message.RecipientType type)
null
m
- messagetype
- type of recipients
null
(in case of an error)public javax.mail.Address[] safeFrom(javax.mail.internet.MimeMessage m)
null
in case of an error)
m
- message
null
public javax.mail.Address[] safeSender(javax.mail.internet.MimeMessage m)
null
in case of an error)
m
- message
null
public void createBodyStructure(javax.mail.internet.MimePart p, boolean extensible) throws IOException, javax.mail.MessagingException
p
- mime partextensible
- is extensible
IOException
javax.mail.MessagingException
public void appendNil()
public void appendSpace()
public void appendOpenP()
public void appendCloseP()
public void appendQuote()
protected void appendDate(Date d)
d
- date. Maybe null (and it will append NIL then)protected void appendString(String s)
s
- stringprotected void appendNString(String s)
s
- string. Maybe null (and it will append NIL then)protected void appendString(String[] s)
s
- strings. Maybe null (and it will append NIL then)protected void appendAddress(String[] ss)
ss
- addresses as stringsprotected void appendAddress(javax.mail.Address[] a)
a
- addresses. May be null and it will append NIL then.protected void appendObject(Object o)
o
- object. May be null and it will append NIL thenprotected void appendParameters(String type)
type
- type of parametersprotected String appendParameter(String param)
param
- existing parameters
protected void appendDisposition(javax.mail.internet.MimePart part) throws javax.mail.MessagingException
part
- mime part
javax.mail.MessagingException
protected String getType(String type)
type
- mime type
protected String getSubtype(String type)
type
- mime type
protected int countLines(javax.mail.Part part) throws javax.mail.MessagingException
part
- part
javax.mail.MessagingException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |