org.abstracthorizon.mercury.imap.response
Class Response

java.lang.Object
  extended by org.abstracthorizon.mercury.imap.response.Response
Direct Known Subclasses:
ByeResponse, ContinuationResponse, MnemonicResponse, NumberResponse

public abstract class Response
extends Object

IMAP response

Author:
Daniel Sendula

Field Summary
static int CONTINUATION_RESPONSE
           
protected  IMAPSession session
          IMAP session
static int TAGGED_RESPONSE
           
static int UNTAGGED_RESPONSE
           
 
Constructor Summary
Response(IMAPSession session, int type)
          Response
Response(IMAPSession session, int type, String msg)
          Response with message
 
Method Summary
 void append(byte[] buf)
          Sends directly buffer to output
 void append(byte[] buf, int off, int len)
          Appends buffer
 Response append(char c)
          Appends char
 Response append(int i)
          Appends integer
 Response append(long l)
          Appends long number
 Response append(Object object)
          Appends object
 Response append(String string)
          Appends string to response
 Response append(StringBuffer sbuf)
          Appends content string buffer
protected  void commit()
          Commits response
 void submit()
          Submits response
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TAGGED_RESPONSE

public static final int TAGGED_RESPONSE
See Also:
Constant Field Values

UNTAGGED_RESPONSE

public static final int UNTAGGED_RESPONSE
See Also:
Constant Field Values

CONTINUATION_RESPONSE

public static final int CONTINUATION_RESPONSE
See Also:
Constant Field Values

session

protected IMAPSession session
IMAP session

Constructor Detail

Response

public Response(IMAPSession session,
                int type)
Response

Parameters:
session - session
type - type of response

Response

public Response(IMAPSession session,
                int type,
                String msg)
Response with message

Parameters:
session - session
type - type of response
msg - message
Method Detail

append

public Response append(String string)
Appends string to response

Parameters:
string - string to be appended
Returns:
this response

append

public Response append(StringBuffer sbuf)
Appends content string buffer

Parameters:
sbuf - string buffer
Returns:
this response

append

public Response append(int i)
Appends integer

Parameters:
i - integer
Returns:
this response

append

public Response append(long l)
Appends long number

Parameters:
l - long
Returns:
this response

append

public Response append(char c)
Appends char

Parameters:
c - char
Returns:
this response

append

public Response append(Object object)
Appends object

Parameters:
object - object
Returns:
this response

append

public void append(byte[] buf)
            throws IOException
Sends directly buffer to output

Parameters:
buf - buffer
Throws:
IOException

append

public void append(byte[] buf,
                   int off,
                   int len)
            throws IOException
Appends buffer

Parameters:
buf - buffer
off - offset
len - lebgth
Throws:
IOException

commit

protected void commit()
               throws IOException
Commits response

Throws:
IOException

submit

public void submit()
            throws IOException
Submits response

Throws:
IOException


Copyright © 2005-2009 Abstract Horizon. All Rights Reserved.