Additional top-level class in compilation unit: Response.
| Modifier and Type | Field and Description |
|---|---|
| private String | |
| private Map | |
| private static final String | |
| private static char[] | |
| private String | |
| private BufferedReader | |
| private MailLogger | |
| private boolean | |
| private PrintWriter | |
| private boolean | |
| private static final int | |
| private String | |
| private Properties | |
| private static final int | |
| private Socket | |
| private TraceInputStream | |
| private MailLogger | |
| private TraceOutputStream | |
| private boolean |
| Access | Constructor and Description |
|---|---|
| pack-priv | Protocol(String host, int port, MailLogger logger, Properties props, String prefix, boolean isSSL)
Open a connection to the POP3 server. |
| Modifier and Type | Method and Description |
|---|---|
| private void | |
| private void | |
| private void | |
| pack-priv synchronized InputStream | |
| private static IOException | |
| pack-priv void | |
| pack-priv synchronized boolean | |
| protected void | finalize()
Overrides java. |
| private final synchronized boolean | |
| pack-priv synchronized Map | |
| private String | |
| pack-priv synchronized boolean | |
| private void | |
| private static boolean | |
| pack-priv synchronized boolean | |
| private void | |
| protected boolean | |
| pack-priv synchronized int | |
| pack-priv synchronized InputStream | |
| pack-priv synchronized String | |
| private Response | |
| private void | |
| private void | |
| pack-priv synchronized boolean | |
| pack-priv synchronized boolean | |
| private InputStream | |
| private Response | |
| private void | |
| pack-priv synchronized InputStream | |
| pack-priv synchronized boolean | retr(int msg, OutputStream os)
Retrieve the specified message and stream the content to the specified OutputStream. |
| pack-priv synchronized boolean | |
| pack-priv synchronized void | |
| private Response | |
| private void | |
| private void | |
| pack-priv synchronized Status | |
| pack-priv synchronized boolean | |
| private void | suspendTracing()
Temporarily turn off protocol tracing, e.g., to prevent tracing the authentication sequence, including the password. |
| private static String | |
| pack-priv synchronized InputStream | |
| pack-priv synchronized String | |
| pack-priv synchronized boolean |
| apopChallenge | back to summary |
|---|---|
| private String apopChallenge | |
| capabilities | back to summary |
|---|---|
| private Map<String, String> capabilities | |
| CRLF | back to summary |
|---|---|
| private static final String CRLF | |
| digits | back to summary |
|---|---|
| private static char[] digits | |
| host | back to summary |
|---|---|
| private String host | |
| input | back to summary |
|---|---|
| private BufferedReader input | |
| logger | back to summary |
|---|---|
| private MailLogger logger | |
| noauthdebug | back to summary |
|---|---|
| private boolean noauthdebug | |
| output | back to summary |
|---|---|
| private PrintWriter output | |
| pipelining | back to summary |
|---|---|
| private boolean pipelining | |
| POP3_PORT | back to summary |
|---|---|
| private static final int POP3_PORT | |
| prefix | back to summary |
|---|---|
| private String prefix | |
| props | back to summary |
|---|---|
| private Properties props | |
| SLOP | back to summary |
|---|---|
| private static final int SLOP | |
| socket | back to summary |
|---|---|
| private Socket socket | |
| traceInput | back to summary |
|---|---|
| private TraceInputStream traceInput | |
| traceLogger | back to summary |
|---|---|
| private MailLogger traceLogger | |
| traceOutput | back to summary |
|---|---|
| private TraceOutputStream traceOutput | |
| traceSuspended | back to summary |
|---|---|
| private boolean traceSuspended | |
| Protocol | back to summary |
|---|---|
| pack-priv Protocol(String host, int port, MailLogger logger, Properties props, String prefix, boolean isSSL) throws IOException Open a connection to the POP3 server. | |
| batchCommandContinue | back to summary |
|---|---|
| private void batchCommandContinue(String command) | |
| batchCommandEnd | back to summary |
|---|---|
| private void batchCommandEnd() | |
| batchCommandStart | back to summary |
|---|---|
| private void batchCommandStart(String command) | |
| capa | back to summary |
|---|---|
| pack-priv synchronized InputStream capa() throws IOException Get server capabilities using CAPA command specified by RFC 2449. Returns null if not supported. | |
| cleanupAndThrow | back to summary |
|---|---|
| private static IOException cleanupAndThrow(Socket socket, IOException ife) | |
| close | back to summary |
|---|---|
| pack-priv void close() Close the connection without sending any commands. | |
| dele | back to summary |
|---|---|
| pack-priv synchronized boolean dele(int msg) throws IOException Delete (permanently) the specified message. | |
| finalize | back to summary |
|---|---|
| protected void finalize() throws Throwable Overrides java. Doc from java. Called by the garbage collector on an object when garbage collection
determines that there are no more references to the object.
A subclass overrides the
When running in a Java virtual machine in which finalization has been
disabled or removed, the garbage collector will never call
The general contract of
The
The Java programming language does not guarantee which thread will
invoke the
After the
The
Any exception thrown by the | |
| getBoolProp | back to summary |
|---|---|
| private final synchronized boolean getBoolProp(Properties props, String prop) Get the value of a boolean property. Print out the value if logging is enabled. | |
| getCapabilities | back to summary |
|---|---|
| pack-priv synchronized Map Return the map of capabilities returned by the server. | |
| getDigest | back to summary |
|---|---|
| private String getDigest(String password) Gets the APOP message digest. From RFC 1939: The 'digest' parameter is calculated by applying the MD5 algorithm [RFC1321] to a string consisting of the timestamp (including angle-brackets) followed by a shared secret. The 'digest' parameter itself is a 16-octet value which is sent in hexadecimal format, using lower-case ASCII characters. | |
| hasCapability | back to summary |
|---|---|
| pack-priv synchronized boolean hasCapability(String c) Check whether the given capability is supported by
this server. Returns | |
| initStreams | back to summary |
|---|---|
| private void initStreams() throws IOException | |
| isRecoverable | back to summary |
|---|---|
| private static boolean isRecoverable(Throwable t) | |
| isSSL | back to summary |
|---|---|
| pack-priv synchronized boolean isSSL() Is this connection using SSL? | |
| issueCommand | back to summary |
|---|---|
| private void issueCommand(String cmd) throws IOException Send the specified command. | |
| isTracing | back to summary |
|---|---|
| protected boolean isTracing() Is protocol tracing enabled? | |
| list | back to summary |
|---|---|
| pack-priv synchronized int list(int msg) throws IOException Return the size of the message using the LIST command. | |
| list | back to summary |
|---|---|
| pack-priv synchronized InputStream list() throws IOException Return the size of all messages using the LIST command. | |
| login | back to summary |
|---|---|
| pack-priv synchronized String login(String user, String password) throws IOException Login to the server, using the USER and PASS commands. | |
| multilineCommand | back to summary |
|---|---|
| private Response multilineCommand(String cmd, int size) throws IOException Issue a POP3 command that expects a multi-line response.
| |
| multilineCommandEnd | back to summary |
|---|---|
| private void multilineCommandEnd() | |
| multilineCommandStart | back to summary |
|---|---|
| private void multilineCommandStart(String command) | |
| noop | back to summary |
|---|---|
| pack-priv synchronized boolean noop() throws IOException Do a NOOP. | |
| quit | back to summary |
|---|---|
| pack-priv synchronized boolean quit() throws IOException Close down the connection, sending the QUIT command. | |
| readMultilineResponse | back to summary |
|---|---|
| private InputStream readMultilineResponse(int size) throws IOException Read the response to a multiline command after the command response. The size parameter indicates the expected size of the response; the actual size can be different. Returns an InputStream to the response bytes. | |
| readResponse | back to summary |
|---|---|
| private Response readResponse() throws IOException Read the response to a command. | |
| resumeTracing | back to summary |
|---|---|
| private void resumeTracing() Resume protocol tracing, if it was enabled to begin with. | |
| retr | back to summary |
|---|---|
| pack-priv synchronized InputStream retr(int msg, int size) throws IOException Retrieve the specified message. Given an estimate of the message's size we can be more efficient, preallocating the array and returning a SharedInputStream to allow us to share the array. | |
| retr | back to summary |
|---|---|
| pack-priv synchronized boolean retr(int msg, OutputStream os) throws IOException Retrieve the specified message and stream the content to the specified OutputStream. Return true on success. | |
| rset | back to summary |
|---|---|
| pack-priv synchronized boolean rset() throws IOException Do an RSET. | |
| setCapabilities | back to summary |
|---|---|
| pack-priv synchronized void setCapabilities(InputStream in) Parse the capabilities from a CAPA response. | |
| simpleCommand | back to summary |
|---|---|
| private Response simpleCommand(String cmd) throws IOException Issue a simple POP3 command and return the response. | |
| simpleCommandEnd | back to summary |
|---|---|
| private void simpleCommandEnd() | |
| simpleCommandStart | back to summary |
|---|---|
| private void simpleCommandStart(String command) | |
| stat | back to summary |
|---|---|
| pack-priv synchronized Status stat() throws IOException Return the total number of messages and mailbox size, using the STAT command. | |
| stls | back to summary |
|---|---|
| pack-priv synchronized boolean stls() throws IOException Start TLS using STLS command specified by RFC 2595. If already using SSL, this is a nop and the STLS command is not issued. | |
| suspendTracing | back to summary |
|---|---|
| private void suspendTracing() Temporarily turn off protocol tracing, e.g., to prevent tracing the authentication sequence, including the password. | |
| toHex | back to summary |
|---|---|
| private static String toHex(byte[] bytes) Convert a byte array to a string of hex digits representing the bytes. | |
| top | back to summary |
|---|---|
| pack-priv synchronized InputStream top(int msg, int n) throws IOException Return the message header and the first n lines of the message. | |
| uidl | back to summary |
|---|---|
| pack-priv synchronized String uidl(int msg) throws IOException Return the UIDL string for the message. | |
| uidl | back to summary |
|---|---|
| pack-priv synchronized boolean uidl(String[] uids) throws IOException Return the UIDL strings for all messages. The UID for msg #N is returned in uids[N-1]. | |