⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 com.jthomas.pop.pop3.html

📁 java编写的pop3协议(网络公开代码)
💻 HTML
📖 第 1 页 / 共 2 页
字号:
<dl>
  <dd> Creates the object. No work is done.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> host - a pop3 server host name
    <dd> user - a mailbox user name
    <dd> password - a mailbox password
  </dl></dd>
</dl>
<a name="pop3()"><img src="images/yellow-ball.gif" width=12 height=12 alt=" o "></a>
<b>pop3</b>
<pre>
 public pop3()
</pre>
<dl>
  <dd> Creates the object. No work is done  You will have to supply host, user and password through  connect() and login() methods.
<p>
  <dd><dl>
    <dt> <b>See Also:</b>
    <dd> <a href="#connect(java.lang.String)">connect</a>, <a href="#login(java.lang.String, java.lang.String)">login</a>
  </dl></dd>
</dl>
<a name="methods"></a>
<h2>
  <img src="images/methods.gif" width=151 height=38 alt="Methods">
</h2>
<a name="connect(java.lang.String)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="connect"><b>connect</b></a>
<pre>
 public <a href="com.jthomas.pop.popStatus.html#_top_">popStatus</a> connect(String host)
</pre>
<dl>
  <dd> Makes a socket connection to the specified  host (port 110).
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> host - a pop3 server host name
    <dt> <b>Returns:</b>
    <dd> popStatus:  result of this operation
  </dl></dd>
</dl>
<a name="connect(java.lang.String, int)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="connect"><b>connect</b></a>
<pre>
 public <a href="com.jthomas.pop.popStatus.html#_top_">popStatus</a> connect(String host,
                          int port)
</pre>
<dl>
  <dd> Makes a socket connection to the specified  host and port.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> host - pop3 server host name
    <dd> port - TCP port to connect to
    <dt> <b>Returns:</b>
    <dd> popStatus:  result of this operation
  </dl></dd>
</dl>
<a name="connect()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="connect"><b>connect</b></a>
<pre>
 public synchronized <a href="com.jthomas.pop.popStatus.html#_top_">popStatus</a> connect()
</pre>
<dl>
  <dd> Makes a socket connection to the host specified  in the constructor (port 110).
<p>
  <dd><dl>
    <dt> <b>Returns:</b>
    <dd> popStatus:  result of this operation
  </dl></dd>
</dl>
<a name="login(java.lang.String, java.lang.String)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="login"><b>login</b></a>
<pre>
 public <a href="com.jthomas.pop.popStatus.html#_top_">popStatus</a> login(String user,
                        String password)
</pre>
<dl>
  <dd> Login the specified user with the specified password.<br>  If the login is successful, a "STAT" command is issued  to get the current number of messages.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> user - a mailbox user name
    <dd> password - a mailbox password
    <dt> <b>Returns:</b>
    <dd> popStatus: result of this operation
  </dl></dd>
</dl>
<a name="login()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="login"><b>login</b></a>
<pre>
 public synchronized <a href="com.jthomas.pop.popStatus.html#_top_">popStatus</a> login()
</pre>
<dl>
  <dd> Login with the user and password specified in the   constructor.<br>  If the login is successful, a <code>STAT</code>   command is issued to get the current number of   messages.
<p>
  <dd><dl>
    <dt> <b>Returns:</b>
    <dd> popStatus: result of this operation
  </dl></dd>
</dl>
<a name="close()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="close"><b>close</b></a>
<pre>
 public synchronized void close()
</pre>
<dl>
  <dd> Closes the socket connection.  Use <code>quit</code> for a normal termination.
<p>
  <dd><dl>
    <dt> <b>See Also:</b>
    <dd> <a href="#quit()">quit</a>
  </dl></dd>
</dl>
<a name="stat()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="stat"><b>stat</b></a>
<pre>
 public synchronized <a href="com.jthomas.pop.popStatus.html#_top_">popStatus</a> stat()
</pre>
<dl>
  <dd> Gets the number of messages and their total size from  the server.
<p>
  <dd><dl>
    <dt> <b>Returns:</b>
    <dd> popStatus: result of this operation
  </dl></dd>
</dl>
<a name="quit()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="quit"><b>quit</b></a>
<pre>
 public synchronized <a href="com.jthomas.pop.popStatus.html#_top_">popStatus</a> quit()
</pre>
<dl>
  <dd> Quits the session with the POP3 server.  After receiving a goodbye message from the server,   the socket is closed.
<p>
  <dd><dl>
    <dt> <b>Returns:</b>
    <dd> popStatus
  </dl></dd>
</dl>
<a name="list(int)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="list"><b>list</b></a>
<pre>
 public synchronized <a href="com.jthomas.pop.popStatus.html#_top_">popStatus</a> list(int msgnum)
</pre>
<dl>
  <dd> Gets the size of the specified mail message.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> msgnum - message number
    <dt> <b>Returns:</b>
    <dd> popStatus: result of this operation
  </dl></dd>
</dl>
<a name="list()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="list"><b>list</b></a>
<pre>
 public synchronized <a href="com.jthomas.pop.popStatus.html#_top_">popStatus</a> list()
</pre>
<dl>
  <dd> Gets a list of messages and the size of each one.
<p>
  <dd><dl>
    <dt> <b>Returns:</b>
    <dd> popStatus: result of this operation
  </dl></dd>
</dl>
<a name="uidl(int)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="uidl"><b>uidl</b></a>
<pre>
 public synchronized <a href="com.jthomas.pop.popStatus.html#_top_">popStatus</a> uidl(int msgnum)
</pre>
<dl>
  <dd> Gets the uidl of the specified mail msg.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> msgnum - message number
    <dt> <b>Returns:</b>
    <dd> popStatus: result of this operation
  </dl></dd>
</dl>
<a name="uidl()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="uidl"><b>uidl</b></a>
<pre>
 public synchronized <a href="com.jthomas.pop.popStatus.html#_top_">popStatus</a> uidl()
</pre>
<dl>
  <dd> Gets a list of messages and the <code>UIDL</code> of  each one.  <code>UIDL</code> is a message identifier that is  garanteed to remain the same even across different   sessions.
<p>
  <dd><dl>
    <dt> <b>Returns:</b>
    <dd> popStatus: result of this operation
  </dl></dd>
</dl>
<a name="retr(int)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="retr"><b>retr</b></a>
<pre>
 public synchronized <a href="com.jthomas.pop.popStatus.html#_top_">popStatus</a> retr(int msgnum)
</pre>
<dl>
  <dd> Gets the contents of a mail message.  The array of strings obtained are the lines of the  specified mail message.  The lines have <code>CR/LF</code> stripped, any leading  <code>"."</code> fixed up and the ending <code>"."</code>  removed.<br>  The array can be retrieved with the status.Responses() method.  The <code>+OK</code> or <code>-ERR</code> status line is   returned.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> msgnum - message number
    <dt> <b>Returns:</b>
    <dd> popStatus: result of this operation
  </dl></dd>
</dl>
<a name="top(int, int)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="top"><b>top</b></a>
<pre>
 public synchronized <a href="com.jthomas.pop.popStatus.html#_top_">popStatus</a> top(int msgnum,
                                   int n)
</pre>
<dl>
  <dd> Gets the top n lines of a mail message.  The array of strings obtained are the lines of the  mail headers and the top N lines of the indicated mail msg.  The lines have <code>CR/LF</code> striped, any leading   <code>"."</code> fixed up and the ending <code>"."</code>  removed. <br>  The array can be retrieved with status.Responses() method.  The <code>+OK</code> or <code>-ERR</code> status line is   returned.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> msgnum - the message number
    <dd> n - how many body lines should be retrieved.     If <code>n=0</code>, you'll get just the headers,      unfortunately I've bumped into a buggy POP3 server that     didn't like zeroes, so I suggest to use <code>n=1</code>     if you want just headers.
    <dt> <b>Returns:</b>
    <dd> popStatus: result of this operation
  </dl></dd>
</dl>
<a name="dele(int)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="dele"><b>dele</b></a>
<pre>
 public synchronized <a href="com.jthomas.pop.popStatus.html#_top_">popStatus</a> dele(int msgnum)
</pre>
<dl>
  <dd> Marks the mail message for deletion  This mail message will be deleted when QUIT is issued.  If you lose the connection the message is not deleted.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> msgnum - a message number
    <dt> <b>Returns:</b>
    <dd> popStatus: result of this operation
    <dt> <b>See Also:</b>
    <dd> <a href="#rset()">rset</a>
  </dl></dd>
</dl>
<a name="rset()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="rset"><b>rset</b></a>
<pre>
 public synchronized <a href="com.jthomas.pop.popStatus.html#_top_">popStatus</a> rset()
</pre>
<dl>
  <dd> Resets the mail messages that have been marked for deletion.  Nothing will be deleted if QUIT is issued next.
<p>
  <dd><dl>
    <dt> <b>Returns:</b>
    <dd> popStatus: result of this operation
    <dt> <b>See Also:</b>
    <dd> <a href="#dele(int)">dele</a>
  </dl></dd>
</dl>
<a name="noop()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="noop"><b>noop</b></a>
<pre>
 public synchronized <a href="com.jthomas.pop.popStatus.html#_top_">popStatus</a> noop()
</pre>
<dl>
  <dd> Does not do anything but it will keep the server active.
<p>
  <dd><dl>
    <dt> <b>Returns:</b>
    <dd> popStatus: result of this operation
  </dl></dd>
</dl>
<a name="get_TotalMsgs()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="get_TotalMsgs"><b>get_TotalMsgs</b></a>
<pre>
 public int get_TotalMsgs()
</pre>
<dl>
  <dd> Returns the number of messages on the server.  This value is set by an internal <code>STAT</code>   issued at login.
<p>
  <dd><dl>
    <dt> <b>Returns:</b>
    <dd> the number of messages on this server.
    <dt> <b>See Also:</b>
    <dd> <a href="#get_TotalSize()">get_TotalSize</a>
  </dl></dd>
</dl>
<a name="get_TotalSize()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="get_TotalSize"><b>get_TotalSize</b></a>
<pre>
 public int get_TotalSize()
</pre>
<dl>
  <dd> Returns the size of messages on the server.  This value is set by an internal <code>STAT</code>  issued at login.
<p>
  <dd><dl>
    <dt> <b>Returns:</b>
    <dd> the total size of messages on this server.
    <dt> <b>See Also:</b>
    <dd> <a href="#get_TotalMsgs()">get_TotalMsgs</a>
  </dl></dd>
</dl>
<a name="appendFile(java.lang.String, int)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="appendFile"><b>appendFile</b></a>
<pre>
 public synchronized <a href="com.jthomas.pop.popStatus.html#_top_">popStatus</a> appendFile(String filename,
                                          int msgnum)
</pre>
<dl>
  <dd> Returns the contents of a mail message and append it to the  specified mail file.  It will internally call <code>RETR</code> and then write   the results to the specified file.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> filename - the name of the file to be extended
    <dd> msgnum - a message number
    <dt> <b>Returns:</b>
    <dd> popStatus: result of this operation
  </dl></dd>
</dl>
<a name="setDebugOn(boolean)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="setDebugOn"><b>setDebugOn</b></a>
<pre>
 public void setDebugOn(boolean OnOff)
</pre>
<dl>
  <dd> Sets debug on or off.  Debug messages are written to standard error.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> OnOff - true to set on debugging, false to      shut it up.
  </dl></dd>
</dl>
<a name="debug(java.lang.String)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="debug"><b>debug</b></a>
<pre>
 public void debug(String debugstr)
</pre>
<dl>
  <dd> If debugOn switch is set, display debug info.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> debugstr - a debug message
  </dl></dd>
</dl>
<hr>
<pre>
<a href="packages.html">All Packages</a>  <a href="tree.html">Class Hierarchy</a>  <a href="Package-com.jthomas.pop.html">This Package</a>  <a href="com.jthomas.pop.apop.html#_top_">Previous</a>  <a href="com.jthomas.pop.popStatus.html#_top_">Next</a>  <a href="AllNames.html">Index</a></pre>
</body>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -