Project: javamail
Repository: mercurial
Revision: 725
Author: shannon
Date: 2015-06-05 21:03:07 UTC
Link:
Log Message:
------------
Fix the javadoc errors and warnings that occur when using JDK 1.8 to deploy.
Ensure trailing space characters are encoded when stream is flushed - bug 6844
Cache extension FETCH items even when fetched implicitly - bug 6850
sort IMAP message sets in cases where order doesn't matter - bug 6852
Fix compilation errors when using JDK 1.5.
Revisions:
----------
721
722
723
724
725
Modified Paths:
---------------
gimap/src/main/java/com/sun/mail/gimap/LongTerm.java
gimap/src/main/java/com/sun/mail/gimap/protocol/GmailProtocol.java
mail/src/main/java/com/sun/mail/auth/Ntlm.java
mail/src/main/java/com/sun/mail/iap/Argument.java
mail/src/main/java/com/sun/mail/iap/ByteArray.java
mail/src/main/java/com/sun/mail/iap/ConnectionException.java
mail/src/main/java/com/sun/mail/iap/Literal.java
mail/src/main/java/com/sun/mail/iap/LiteralException.java
mail/src/main/java/com/sun/mail/iap/Protocol.java
mail/src/main/java/com/sun/mail/iap/ProtocolException.java
mail/src/main/java/com/sun/mail/iap/Response.java
mail/src/main/java/com/sun/mail/iap/ResponseInputStream.java
mail/src/main/java/com/sun/mail/imap/MessageCache.java
mail/src/main/java/com/sun/mail/imap/Utility.java
mail/src/main/java/com/sun/mail/imap/protocol/BASE64MailboxEncoder.java
mail/src/main/java/com/sun/mail/imap/protocol/BODY.java
mail/src/main/java/com/sun/mail/imap/protocol/FLAGS.java
mail/src/main/java/com/sun/mail/imap/protocol/FetchItem.java
mail/src/main/java/com/sun/mail/imap/protocol/FetchResponse.java
mail/src/main/java/com/sun/mail/imap/protocol/ID.java
mail/src/main/java/com/sun/mail/imap/protocol/IMAPProtocol.java
mail/src/main/java/com/sun/mail/imap/protocol/IMAPResponse.java
mail/src/main/java/com/sun/mail/imap/protocol/INTERNALDATE.java
mail/src/main/java/com/sun/mail/imap/protocol/MODSEQ.java
mail/src/main/java/com/sun/mail/imap/protocol/MessageSet.java
mail/src/main/java/com/sun/mail/imap/protocol/RFC822DATA.java
mail/src/main/java/com/sun/mail/imap/protocol/RFC822SIZE.java
mail/src/main/java/com/sun/mail/imap/protocol/SearchSequence.java
mail/src/main/java/com/sun/mail/imap/protocol/Status.java
mail/src/main/java/com/sun/mail/imap/protocol/UID.java
mail/src/main/java/com/sun/mail/imap/protocol/UIDSet.java
mail/src/main/java/com/sun/mail/smtp/DigestMD5.java
mail/src/main/java/com/sun/mail/smtp/SMTPOutputStream.java
mail/src/main/java/com/sun/mail/util/ASCIIUtility.java
mail/src/main/java/com/sun/mail/util/BASE64DecoderStream.java
mail/src/main/java/com/sun/mail/util/BASE64EncoderStream.java
mail/src/main/java/com/sun/mail/util/BEncoderStream.java
mail/src/main/java/com/sun/mail/util/DecodingException.java
mail/src/main/java/com/sun/mail/util/FolderClosedIOException.java
mail/src/main/java/com/sun/mail/util/LineInputStream.java
mail/src/main/java/com/sun/mail/util/LogOutputStream.java
mail/src/main/java/com/sun/mail/util/MimeUtil.java
mail/src/main/java/com/sun/mail/util/PropUtil.java
mail/src/main/java/com/sun/mail/util/QEncoderStream.java
mail/src/main/java/com/sun/mail/util/SocketFetcher.java
mail/src/main/java/com/sun/mail/util/TraceOutputStream.java
pom.xml
doc/release/CHANGES.txt
mail/src/main/java/com/sun/mail/util/QPEncoderStream.java
mail/src/main/java/com/sun/mail/imap/IMAPMessage.java
mail/src/main/java/com/sun/mail/imap/IMAPFolder.java
Added Paths:
------------
mail/src/test/java/com/sun/mail/util/QPEncoderStreamTest.java
Diffs:
------
diff -r 1d89be816e09 -r e27004d84069 gimap/src/main/java/com/sun/mail/gimap/LongTerm.java
--- a/gimap/src/main/java/com/sun/mail/gimap/LongTerm.java Fri May 29 12:31:14 2015 -0700
+++ b/gimap/src/main/java/com/sun/mail/gimap/LongTerm.java Thu Jun 04 13:36:41 2015 -0700
@@ -1,7 +1,7 @@
/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
*
- * Copyright (c) 1997-2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997-2015 Oracle and/or its affiliates. All rights reserved.
*
* The contents of this file are subject to the terms of either the GNU
* General Public License Version 2 only ("GPL") or the Common Development
@@ -65,6 +65,8 @@
/**
* Return the number to compare with.
+ *
+ * @return the number
*/
public long getNumber() {
return number;
diff -r 1d89be816e09 -r e27004d84069 gimap/src/main/java/com/sun/mail/gimap/protocol/GmailProtocol.java
--- a/gimap/src/main/java/com/sun/mail/gimap/protocol/GmailProtocol.java Fri May 29 12:31:14 2015 -0700
+++ b/gimap/src/main/java/com/sun/mail/gimap/protocol/GmailProtocol.java Thu Jun 04 13:36:41 2015 -0700
@@ -1,7 +1,7 @@
/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
*
- * Copyright (c) 1997-2013 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997-2015 Oracle and/or its affiliates. All rights reserved.
*
* The contents of this file are subject to the terms of either the GNU
* General Public License Version 2 only ("GPL") or the Common Development
@@ -91,11 +91,14 @@
/**
* Connect to Gmail.
*
+ * @param name the protocol name
* @param host host to connect to
* @param port portnumber to connect to
* @param props Properties object used by this protocol
* @param isSSL use SSL?
* @param logger for log messages
+ * @exception IOException for I/O errors
+ * @exception ProtocolException for protocol failures
*/
public GmailProtocol(String name, String host, int port,
Properties props, boolean isSSL, MailLogger logger)
diff -r 1d89be816e09 -r e27004d84069 mail/src/main/java/com/sun/mail/auth/Ntlm.java
--- a/mail/src/main/java/com/sun/mail/auth/Ntlm.java Fri May 29 12:31:14 2015 -0700
+++ b/mail/src/main/java/com/sun/mail/auth/Ntlm.java Thu Jun 04 13:36:41 2015 -0700
@@ -1,7 +1,7 @@
/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
*
- * Copyright (c) 2005-2013 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005-2015 Oracle and/or its affiliates. All rights reserved.
*
* The contents of this file are subject to the terms of either the GNU
* General Public License Version 2 only ("GPL") or the Common Development
@@ -117,6 +117,12 @@
* Username may be specified as domain\\username in the Authenticator.
* If this notation is not used, then the domain will be taken
* from the ntdomain parameter.
+ *
+ * @param ntdomain the NT domain
+ * @param hostname the host name
+ * @param username the user name
+ * @param password the password
+ * @param logger the MailLogger
*/
public Ntlm(String ntdomain, String hostname, String username,
String password, MailLogger logger) {
diff -r 1d89be816e09 -r e27004d84069 mail/src/main/java/com/sun/mail/iap/Argument.java
--- a/mail/src/main/java/com/sun/mail/iap/Argument.java Fri May 29 12:31:14 2015 -0700
+++ b/mail/src/main/java/com/sun/mail/iap/Argument.java Thu Jun 04 13:36:41 2015 -0700
@@ -1,7 +1,7 @@
/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
*
- * Copyright (c) 1997-2013 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997-2015 Oracle and/or its affiliates. All rights reserved.
*
* The contents of this file are subject to the terms of either the GNU
* General Public License Version 2 only ("GPL") or the Common Development
@@ -64,6 +64,9 @@
* Append the given Argument to this Argument. All items
* from the source argument are copied into this destination
* argument.
+ *
+ * @param arg the Argument to append
+ * @return this
*/
public Argument append(Argument arg) {
items.addAll(arg.items);
@@ -77,7 +80,8 @@
*
* XXX: Hmm .. this should really be called writeASCII()
*
- * @param s String to write out
+ * @param s String to write out
+ * @return this
*/
public Argument writeString(String s) {
items.add(new AString(ASCIIUtility.getBytes(s)));
@@ -87,6 +91,11 @@
/**
* Convert the given string into bytes in the specified
* charset, and write the bytes out as an ASTRING
+ *
+ * @param s String to write out
+ * @param charset the charset
+ * @return this
+ * @exception UnsupportedEncodingException for bad charset
*/
public Argument writeString(String s, String charset)
throws UnsupportedEncodingException {
@@ -102,7 +111,8 @@
* of the characters inside the string. The string should
* contain only ASCII characters. <p>
*
- * @param s String to write out
+ * @param s String to write out
+ * @return this
* @since JavaMail 1.5.1
*/
public Argument writeNString(String s) {
@@ -117,6 +127,10 @@
* Convert the given string into bytes in the specified
* charset, and write the bytes out as an NSTRING
*
+ * @param s String to write out
+ * @param charset the charset
+ * @return this
+ * @exception UnsupportedEncodingException for bad charset
* @since JavaMail 1.5.1
*/
public Argument writeNString(String s, String charset)
@@ -133,6 +147,7 @@
/**
* Write out given byte[] as a Literal.
* @param b byte[] to write out
+ * @return this
*/
public Argument writeBytes(byte[] b) {
items.add(b);
@@ -142,6 +157,7 @@
/**
* Write out given ByteArrayOutputStream as a Literal.
* @param b ByteArrayOutputStream to be written out.
+ * @return this
*/
public Argument writeBytes(ByteArrayOutputStream b) {
items.add(b);
@@ -151,6 +167,7 @@
/**
* Write out given data as a literal.
* @param b Literal representing data to be written out.
+ * @return this
*/
public Argument writeBytes(Literal b) {
items.add(b);
@@ -162,6 +179,7 @@
* certain US-ASCII characters. No validation is done on the characters
* in the string.
* @param s String
+ * @return this
*/
public Argument writeAtom(String s) {
items.add(new Atom(s));
@@ -171,6 +189,7 @@
/**
* Write out number.
* @param i number
+ * @return this
*/
public Argument writeNumber(int i) {
items.add(Integer.valueOf(i));
@@ -180,6 +199,7 @@
/**
* Write out number.
* @param i number
+ * @return this
*/
public Argument writeNumber(long i) {
items.add(Long.valueOf(i));
@@ -188,6 +208,9 @@
/**
* Write out as parenthesised list.
+ *
+ * @param c the Argument
+ * @return this
*/
public Argument writeArgument(Argument c) {
items.add(c);
diff -r 1d89be816e09 -r e27004d84069 mail/src/main/java/com/sun/mail/iap/ByteArray.java
--- a/mail/src/main/java/com/sun/mail/iap/ByteArray.java Fri May 29 12:31:14 2015 -0700
+++ b/mail/src/main/java/com/sun/mail/iap/ByteArray.java Thu Jun 04 13:36:41 2015 -0700
@@ -1,7 +1,7 @@
/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
*
- * Copyright (c) 1997-2010 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997-2015 Oracle and/or its affiliates. All rights reserved.
*
* The contents of this file are subject to the terms of either the GNU
* General Public License Version 2 only ("GPL") or the Common Development
@@ -56,6 +56,10 @@
/**
* Constructor
+ *
+ * @param b the byte array to wrap
+ * @param start start position in byte array
+ * @param count number of bytes in byte array
*/
public ByteArray(byte[] b, int start, int count) {
bytes = b;
@@ -66,6 +70,7 @@
/**
* Constructor that creates a byte array of the specified size.
*
+ * @param size the size of the ByteArray
* @since JavaMail 1.4.1
*/
public ByteArray(int size) {
@@ -75,6 +80,8 @@
/**
* Returns the internal byte array. Note that this is a live
* reference to the actual data, not a copy.
+ *
+ * @return the wrapped byte array
*/
public byte[] getBytes() {
return bytes;
@@ -82,6 +89,8 @@
/**
* Returns a new byte array that is a copy of the data.
+ *
+ * @return a new byte array with the bytes from start for count
*/
public byte[] getNewBytes() {
byte[] b = new byte[count];
@@ -91,6 +100,8 @@
/**
* Returns the start position
+ *
+ * @return the start position
*/
public int getStart() {
return start;
@@ -98,6 +109,8 @@
/**
* Returns the count of bytes
+ *
+ * @return the number of bytes
*/
public int getCount() {
return count;
@@ -106,6 +119,7 @@
/**
* Set the count of bytes.
*
+ * @param count the number of bytes
* @since JavaMail 1.4.1
*/
public void setCount(int count) {
@@ -114,6 +128,8 @@
/**
* Returns a ByteArrayInputStream.
+ *
+ * @return the ByteArrayInputStream
*/
public ByteArrayInputStream toByteArrayInputStream() {
return new ByteArrayInputStream(bytes, start, count);
@@ -122,6 +138,7 @@
/**
* Grow the byte array by incr bytes.
*
+ * @param incr how much to grow
* @since JavaMail 1.4.1
*/
public void grow(int incr) {
diff -r 1d89be816e09 -r e27004d84069 mail/src/main/java/com/sun/mail/iap/ConnectionException.java
--- a/mail/src/main/java/com/sun/mail/iap/ConnectionException.java Fri May 29 12:31:14 2015 -0700
+++ b/mail/src/main/java/com/sun/mail/iap/ConnectionException.java Thu Jun 04 13:36:41 2015 -0700
@@ -1,7 +1,7 @@
/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
*
- * Copyright (c) 1997-2010 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997-2015 Oracle and/or its affiliates. All rights reserved.
*
* The contents of this file are subject to the terms of either the GNU
* General Public License Version 2 only ("GPL") or the Common Development
@@ -58,6 +58,7 @@
/**
* Constructs an ConnectionException with the specified detail message.
+ *
* @param s the detail message
*/
public ConnectionException(String s) {
@@ -66,7 +67,9 @@
/**
* Constructs an ConnectionException with the specified Response.
- * @param r the Response
+ *
+ * @param p the Protocol object
+ * @param r the Response
*/
public ConnectionException(Protocol p, Response r) {
super(r);
diff -r 1d89be816e09 -r e27004d84069 mail/src/main/java/com/sun/mail/iap/Literal.java
--- a/mail/src/main/java/com/sun/mail/iap/Literal.java Fri May 29 12:31:14 2015 -0700
+++ b/mail/src/main/java/com/sun/mail/iap/Literal.java Thu Jun 04 13:36:41 2015 -0700
@@ -1,7 +1,7 @@
/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
*
- * Copyright (c) 1997-2010 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997-2015 Oracle and/or its affiliates. All rights reserved.
*
* The contents of this file are subject to the terms of either the GNU
* General Public License Version 2 only ("GPL") or the Common Development
@@ -52,11 +52,16 @@
public interface Literal {
/**
* Return the size of the data.
+ *
+ * @return the size of the data
*/
public int size();
/**
* Write the data to the OutputStream.
+ *
+ * @param os the output stream
+ * @exception IOException for I/O errors
*/
public void writeTo(OutputStream os) throws IOException;
}
diff -r 1d89be816e09 -r e27004d84069 mail/src/main/java/com/sun/mail/iap/LiteralException.java
--- a/mail/src/main/java/com/sun/mail/iap/LiteralException.java Fri May 29 12:31:14 2015 -0700
+++ b/mail/src/main/java/com/sun/mail/iap/LiteralException.java Thu Jun 04 13:36:41 2015 -0700
@@ -1,7 +1,7 @@
/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
*
- * Copyright (c) 1997-2010 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997-2015 Oracle and/or its affiliates. All rights reserved.
*
* The contents of this file are subject to the terms of either the GNU
* General Public License Version 2 only ("GPL") or the Common Development
@@ -50,6 +50,8 @@
/**
* Constructs a LiteralException with the specified Response object.
+ *
+ * @param r the response object
*/
public LiteralException(Response r) {
super(r.toString());
diff -r 1d89be816e09 -r e27004d84069 mail/src/main/java/com/sun/mail/iap/Protocol.java
--- a/mail/src/main/java/com/sun/mail/iap/Protocol.java Fri May 29 12:31:14 2015 -0700
+++ b/mail/src/main/java/com/sun/mail/iap/Protocol.java Thu Jun 04 13:36:41 2015 -0700
@@ -101,6 +101,8 @@
* @param prefix Prefix to prepend to property keys
* @param isSSL use SSL?
* @param logger log messages here
+ * @exception IOException for I/O errors
+ * @exception ProtocolException for protocol failures
*/
public Protocol(String host, int port,
Properties props, String prefix,
@@ -151,6 +153,12 @@
/**
* Constructor for debugging.
+ *
+ * @param in the InputStream to read from
+ * @param out the PrintStream to write to
+ * @param props Properties object used by this protocol
+ * @param debug true to enable debugging output
+ * @exception IOException for I/O errors
*/
public Protocol(InputStream in, PrintStream out, Properties props,
boolean debug) throws IOException {
@@ -174,14 +182,17 @@
/**
* Returns the timestamp.
+ *
+ * @return the timestamp
*/
-
public long getTimestamp() {
return timestamp;
}
/**
* Adds a response handler.
+ *
+ * @param h the response handler
*/
public void addResponseHandler(ResponseHandler h) {
handlers.addElement(h);
@@ -189,6 +200,8 @@
/**
* Removed the specified response handler.
+ *
+ * @param h the response handler
*/
public void removeResponseHandler(ResponseHandler h) {
handlers.removeElement(h);
@@ -196,6 +209,8 @@
/**
* Notify response handlers
+ *
+ * @param responses the responses
*/
public void notifyResponseHandlers(Response[] responses) {
if (handlers.size() == 0)
@@ -227,6 +242,8 @@
/**
* Return the Protocol's InputStream.
+ *
+ * @return the input stream
*/
protected ResponseInputStream getInputStream() {
return input;
@@ -234,6 +251,8 @@
/**
* Return the Protocol's OutputStream
+ *
+ * @return the output stream
*/
protected OutputStream getOutputStream() {
return output;
@@ -242,6 +261,8 @@
/**
* Returns whether this Protocol supports non-synchronizing literals
* Default is false. Subclasses should override this if required
+ *
+ * @return true if the server supports non-synchronizing literals
*/
protected synchronized boolean supportsNonSyncLiterals() {
return false;
@@ -277,6 +298,7 @@
* The default implementation returns null, which causes
* a new buffer to be allocated for every response.
*
+ * @return the buffer to use
* @since JavaMail 1.4.1
*/
protected ByteArray getResponseBuffer() {
@@ -366,6 +388,9 @@
/**
* Convenience routine to handle OK, NO, BAD and BYE responses.
+ *
+ * @param response the response
+ * @exception ProtocolException for protocol failures
*/
public void handleResult(Response response) throws ProtocolException {
if (response.isOK())
@@ -383,6 +408,10 @@
/**
* Convenience routine to handle simple IAP commands
* that do not have responses specific to that command.
+ *
+ * @param cmd the command
+ * @param args the arguments
+ * @exception ProtocolException for protocol failures
*/
public void simpleCommand(String cmd, Argument args)
throws ProtocolException {
@@ -402,6 +431,10 @@
* If the command succeeds, we begin TLS negotiation.
* If the socket is already an SSLSocket this is a nop and the command
* is not issued.
+ *
+ * @param cmd the command to issue
+ * @exception IOException for I/O errors
+ * @exception ProtocolException for protocol failures
*/
public synchronized void startTLS(String cmd)
throws IOException, ProtocolException {
@@ -435,6 +468,7 @@
/**
* Return the SocketChannel associated with this connection, if any.
*
+ * @return the SocketChannel
* @since JavaMail 1.5.2
*/
public SocketChannel getChannel() {
@@ -460,6 +494,8 @@
* The property <prefix>.localhost overrides
* <prefix>.localaddress,
* which overrides what InetAddress would tell us.
+ *
+ * @return the name of the local host
*/
protected synchronized String getLocalHost() {
// get our hostname and cache it for future use
@@ -497,6 +533,8 @@
/**
* Is protocol tracing enabled?
+ *
+ * @return true if protocol tracing is enabled
*/
protected boolean isTracing() {
return traceLogger.isLoggable(Level.FINEST);
diff -r 1d89be816e09 -r e27004d84069 mail/src/main/java/com/sun/mail/iap/ProtocolException.java
--- a/mail/src/main/java/com/sun/mail/iap/ProtocolException.java Fri May 29 12:31:14 2015 -0700
+++ b/mail/src/main/java/com/sun/mail/iap/ProtocolException.java Thu Jun 04 13:36:41 2015 -0700
@@ -1,7 +1,7 @@
/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
*
- * Copyright (c) 1997-2010 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997-2015 Oracle and/or its affiliates. All rights reserved.
*
* The contents of this file are subject to the terms of either the GNU
* General Public License Version 2 only ("GPL") or the Common Development
@@ -58,6 +58,7 @@
/**
* Constructs a ProtocolException with the specified detail message.
+ *
* @param message the detail message
*/
public ProtocolException(String message) {
@@ -67,6 +68,7 @@
/**
* Constructs a ProtocolException with the specified detail message
* and cause.
+ *
* @param message the detail message
* @param cause the cause
*/
@@ -76,6 +78,8 @@
/**
* Constructs a ProtocolException with the specified Response object.
+ *
+ * @param r the Response
*/
public ProtocolException(Response r) {
super(r.toString());
@@ -84,6 +88,8 @@
/**
* Return the offending Response object.
+ *
+ * @return the Response object
*/
public Response getResponse() {
return response;
diff -r 1d89be816e09 -r e27004d84069 mail/src/main/java/com/sun/mail/iap/Response.java
--- a/mail/src/main/java/com/sun/mail/iap/Response.java Fri May 29 12:31:14 2015 -0700
+++ b/mail/src/main/java/com/sun/mail/iap/Response.java Thu Jun 04 13:36:41 2015 -0700
@@ -101,10 +101,13 @@
parse();
}
- /**
- * Read a new Response from the given Protocol
- * @param p the Protocol object
- */
+ /**
+ * Read a new Response from the given Protocol
+ *
+ * @param p the Protocol object
+ * @exception IOException for I/O errors
+ * @exception ProtocolException for protocol failures
+ */
public Response(Protocol p) throws IOException, ProtocolException {
// read one response into 'buffer'
ByteArray ba = p.getResponseBuffer();
@@ -117,6 +120,8 @@
/**
* Copy constructor.
+ *
+ * @param r the Response to copy
*/
public Response(Response r) {
index = r.index;
@@ -129,6 +134,9 @@
/**
* Return a Response object that looks like a BYE protocol response.
* Include the details of the exception in the response string.
+ *
+ * @param ex the exception
+ * @return the synthetic Response object
*/
public static Response byeResponse(Exception ex) {
String err = "* BYE JavaMail Exception: " + ex.toString();
@@ -203,7 +211,8 @@
/**
* Return the next byte from this Statement.
- * @return the next byte.
+ *
+ * @return the next byte
*/
public byte readByte() {
if (index < size)
@@ -215,6 +224,7 @@
/**
* Extract an ATOM, starting at the current position. Updates
* the internal index to beyond the Atom.
+ *
* @return an Atom
*/
public String readAtom() {
@@ -244,6 +254,9 @@
* Read a string as an arbitrary sequence of characters,
* stopping at the delimiter Used to read part of a
* response code inside [].
+ *
+ * @param delim the delimiter character
+ * @return the string
*/
public String readString(char delim) {
skipSpaces();
@@ -512,6 +525,7 @@
/**
* Return the tag, if this is a tagged statement.
+ *
* @return tag of this tagged statement
*/
public String getTag() {
@@ -521,6 +535,8 @@
/**
* Return the rest of the response as a string, usually used to
* return the arbitrary message text after a NO response.
+ *
+ * @return the rest of the response
*/
public String getRest() {
skipSpaces();
@@ -530,6 +546,7 @@
/**
* Return the exception for a synthetic BYE response.
*
+ * @return the exception
* @since JavaMail 1.5.4
*/
public Exception getException() {
diff -r 1d89be816e09 -r e27004d84069 mail/src/main/java/com/sun/mail/iap/ResponseInputStream.java
--- a/mail/src/main/java/com/sun/mail/iap/ResponseInputStream.java Fri May 29 12:31:14 2015 -0700
+++ b/mail/src/main/java/com/sun/mail/iap/ResponseInputStream.java Thu Jun 04 13:36:41 2015 -0700
@@ -63,6 +63,8 @@
/**
* Constructor.
+ *
+ * @param in the InputStream to wrap
*/
public ResponseInputStream(InputStream in) {
bin = new BufferedInputStream(in, 2 * 1024);
@@ -70,7 +72,9 @@
/**
* Read a Response from the InputStream.
- * @return ByteArray that contains the Response
+ *
+ * @return ByteArray that contains the Response
+ * @exception IOException for I/O errors
*/
public ByteArray readResponse() throws IOException {
return readResponse(null);
@@ -78,7 +82,10 @@
/**
* Read a Response from the InputStream.
- * @return ByteArray that contains the Response
+ *
+ * @param ba the ByteArray in which to store the response, or null
+ * @return ByteArray that contains the Response
+ * @exception IOException for I/O errors
*/
public ByteArray readResponse(ByteArray ba) throws IOException {
if (ba == null)
diff -r 1d89be816e09 -r e27004d84069 mail/src/main/java/com/sun/mail/imap/MessageCache.java
--- a/mail/src/main/java/com/sun/mail/imap/MessageCache.java Fri May 29 12:31:14 2015 -0700
+++ b/mail/src/main/java/com/sun/mail/imap/MessageCache.java Thu Jun 04 13:36:41 2015 -0700
@@ -1,7 +1,7 @@
/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
*
- * Copyright (c) 1997-2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997-2015 Oracle and/or its affiliates. All rights reserved.
*
* The contents of this file are subject to the terms of either the GNU
* General Public License Version 2 only ("GPL") or the Common Development
@@ -120,6 +120,8 @@
/**
* Size of cache.
+ *
+ * @return the size of the cache
*/
public int size() {
return size;
@@ -128,6 +130,9 @@
/**
* Get the message object for the indicated message number.
* If the message object hasn't been created, create it.
+ *
+ * @param msgnum the message number
+ * @return the message
*/
public IMAPMessage getMessage(int msgnum) {
// check range
@@ -153,6 +158,9 @@
* Get the message object for the indicated sequence number.
* If the message object hasn't been created, create it.
* Return null if there's no message with that sequence number.
+ *
+ * @param seqnum the sequence number of the message
+ * @return the message
*/
public IMAPMessage getMessageBySeqnum(int seqnum) {
int msgnum = msgnumOf(seqnum);
@@ -166,6 +174,8 @@
/**
* Expunge the message with the given sequence number.
+ *
+ * @param seqnum the sequence number of the message to expunge
*/
public void expungeMessage(int seqnum) {
int msgnum = msgnumOf(seqnum);
@@ -201,6 +211,8 @@
/**
* Remove all the expunged messages from the array,
* returning a list of removed message objects.
+ *
+ * @return the removed messages
*/
public IMAPMessage[] removeExpungedMessages() {
logger.fine("remove expunged messages");
@@ -248,6 +260,9 @@
* returning a list of removed message objects.
* All messages in msgs must be IMAPMessage objects
* from this folder.
+ *
+ * @param msgs the messages
+ * @return the removed messages
*/
public IMAPMessage[] removeExpungedMessages(Message[] msgs) {
logger.fine("remove expunged messages");
@@ -364,6 +379,9 @@
/**
* Add count messages to the cache.
* newSeqNum is the sequence number of the first message added.
+ *
+ * @param count the number of messges
+ * @param newSeqNum sequence number of first message
*/
public void addMessages(int count, int newSeqNum) {
if (logger.isLoggable(Level.FINE))
@@ -410,6 +428,9 @@
/**
* Return the sequence number for the given message number.
+ *
+ * @param msgnum the message number
+ * @return the sequence number
*/
public int seqnumOf(int msgnum) {
if (seqnums == null)
diff -r 1d89be816e09 -r e27004d84069 mail/src/main/java/com/sun/mail/imap/Utility.java
--- a/mail/src/main/java/com/sun/mail/imap/Utility.java Fri May 29 12:31:14 2015 -0700
+++ b/mail/src/main/java/com/sun/mail/imap/Utility.java Thu Jun 04 13:36:41 2015 -0700
@@ -1,7 +1,7 @@
/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
*
- * Copyright (c) 1997-2013 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997-2015 Oracle and/or its affiliates. All rights reserved.
*
* The contents of this file are subject to the terms of either the GNU
* General Public License Version 2 only ("GPL") or the Common Development
@@ -69,9 +69,12 @@
* ASSERT: Since this method uses and returns message sequence
* numbers, you should use this method only when holding the
* messageCacheLock.
+ *
+ * @param msgs the messages
+ * @param cond the condition to check
+ * @return the MessageSet array
*/
- public static
- MessageSet[] toMessageSet(Message[] msgs, Condition cond) {
+ public static MessageSet[] toMessageSet(Message[] msgs, Condition cond) {
Vector v = new Vector(1);
int current, next;
@@ -128,6 +131,9 @@
/**
* Return UIDSets for the messages. Note that the UIDs
* must have already been fetched for the messages.
+ *
+ * @param msgs the messages
+ * @return the UIDSet array
*/
public static UIDSet[] toUIDSet(Message[] msgs) {
Vector v = new Vector(1);
@@ -182,6 +188,8 @@
* is not included in the public javadocs, thus "hiding"
* this method.
*
+ * @param rd the ResyncData
+ * @return the UIDSet array
* @since JavaMail 1.5.1
*/
public static UIDSet[] getResyncUIDSet(ResyncData rd) {
diff -r 1d89be816e09 -r e27004d84069 mail/src/main/java/com/sun/mail/imap/protocol/BASE64MailboxEncoder.java
--- a/mail/src/main/java/com/sun/mail/imap/protocol/BASE64MailboxEncoder.java Fri May 29 12:31:14 2015 -0700
+++ b/mail/src/main/java/com/sun/mail/imap/protocol/BASE64MailboxEncoder.java Thu Jun 04 13:36:41 2015 -0700
@@ -1,7 +1,7 @@
/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
*
- * Copyright (c) 1997-2013 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997-2015 Oracle and/or its affiliates. All rights reserved.
*
* The contents of this file are subject to the terms of either the GNU
* General Public License Version 2 only ("GPL") or the Common Development
@@ -161,6 +161,8 @@
/**
* Create a BASE64 encoder
+ *
+ * @param what where to write the encoded name
*/
public BASE64MailboxEncoder(Writer what) {
out = what;
diff -r 1d89be816e09 -r e27004d84069 mail/src/main/java/com/sun/mail/imap/protocol/BODY.java
--- a/mail/src/main/java/com/sun/mail/imap/protocol/BODY.java Fri May 29 12:31:14 2015 -0700
+++ b/mail/src/main/java/com/sun/mail/imap/protocol/BODY.java Thu Jun 04 13:36:41 2015 -0700
@@ -1,7 +1,7 @@
/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
*
- * Copyright (c) 1997-2014 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997-2015 Oracle and/or its affiliates. All rights reserved.
*
* The contents of this file are subject to the terms of either the GNU
* General Public License Version 2 only ("GPL") or the Common Development
@@ -63,6 +63,9 @@
/**
* Constructor
+ *
+ * @param r the FetchResponse
+ * @exception ParsingException for parsing failures
*/
public BODY(FetchResponse r) throws ParsingException {
msgno = r.getNumber();
diff -r 1d89be816e09 -r e27004d84069 mail/src/main/java/com/sun/mail/imap/protocol/FLAGS.java
--- a/mail/src/main/java/com/sun/mail/imap/protocol/FLAGS.java Fri May 29 12:31:14 2015 -0700
+++ b/mail/src/main/java/com/sun/mail/imap/protocol/FLAGS.java Thu Jun 04 13:36:41 2015 -0700
@@ -1,7 +1,7 @@
/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
*
- * Copyright (c) 1997-2010 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997-2015 Oracle and/or its affiliates. All rights reserved.
*
* The contents of this file are subject to the terms of either the GNU
* General Public License Version 2 only ("GPL") or the Common Development
@@ -58,7 +58,10 @@
private static final long serialVersionUID = 439049847053756670L;
/**
- * Constructor
+ * Constructor.
+ *
+ * @param r the IMAPResponse
+ * @exception ParsingException for parsing failures
*/
public FLAGS(IMAPResponse r) throws ParsingException {
msgno = r.getNumber();
diff -r 1d89be816e09 -r e27004d84069 mail/src/main/java/com/sun/mail/imap/protocol/FetchItem.java
--- a/mail/src/main/java/com/sun/mail/imap/protocol/FetchItem.java Fri May 29 12:31:14 2015 -0700
+++ b/mail/src/main/java/com/sun/mail/imap/protocol/FetchItem.java Thu Jun 04 13:36:41 2015 -0700
@@ -1,7 +1,7 @@
/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
*
- * Copyright (c) 1997-2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997-2015 Oracle and/or its affiliates. All rights reserved.
*
* The contents of this file are subject to the terms of either the GNU
* General Public License Version 2 only ("GPL") or the Common Development
@@ -73,6 +73,10 @@
/**
* Parse the item into some kind of object appropriate for the item.
* Note that the item name will have been parsed and skipped already.
+ *
+ * @param r the response
+ * @return the fetch item
+ * @exception ParsingException for parsing failures
*/
public abstract Object parseItem(FetchResponse r) throws ParsingException;
}
diff -r 1d89be816e09 -r e27004d84069 mail/src/main/java/com/sun/mail/imap/protocol/FetchResponse.java
--- a/mail/src/main/java/com/sun/mail/imap/protocol/FetchResponse.java Fri May 29 12:31:14 2015 -0700
+++ b/mail/src/main/java/com/sun/mail/imap/protocol/FetchResponse.java Thu Jun 04 13:36:41 2015 -0700
@@ -83,6 +83,10 @@
/**
* Construct a FetchResponse that handles the additional FetchItems.
*
+ * @param r the IMAPResponse
+ * @param fitems the fetch items
+ * @exception IOException for I/O errors
+ * @exception ProtocolException for protocol failures
* @since JavaMail 1.4.6
*/
public FetchResponse(IMAPResponse r, FetchItem[] fitems)
@@ -112,6 +116,12 @@
/**
* Return the first fetch response item of the given class
* for the given message number.
+ *
+ * @param r the responses
+ * @param msgno the message number
+ * @param c the class
+ * @param <T> the type of fetch item
+ * @return the fetch item
*/
public static <T extends Item> T getItem(Response[] r, int msgno,
Class<T> c) {
@@ -139,6 +149,11 @@
* Return all fetch response items of the given class
* for the given message number.
*
+ * @param r the responses
+ * @param msgno the message number
+ * @param c the class
+ * @param <T> the type of fetch items
+ * @return the list of fetch items
* @since JavaMail 1.5.2
*/
public static <T extends Item> List<T> getItems(Response[] r, int msgno,
@@ -170,6 +185,7 @@
* The map is indexed by extension item name. Callers should not
* modify the map.
*
+ * @return MAP of extension items
* @since JavaMail 1.4.6
*/
public Map getExtensionItems() {
diff -r 1d89be816e09 -r e27004d84069 mail/src/main/java/com/sun/mail/imap/protocol/ID.java
--- a/mail/src/main/java/com/sun/mail/imap/protocol/ID.java Fri May 29 12:31:14 2015 -0700
+++ b/mail/src/main/java/com/sun/mail/imap/protocol/ID.java Thu Jun 04 13:36:41 2015 -0700
@@ -1,7 +1,7 @@
/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
*
- * Copyright (c) 1997-2013 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997-2015 Oracle and/or its affiliates. All rights reserved.
*
* The contents of this file are subject to the terms of either the GNU
* General Public License Version 2 only ("GPL") or the Common Development
@@ -58,6 +58,9 @@
/**
* Parse the server parameter list out of the response.
+ *
+ * @param r the response
+ * @exception ProtocolException for protocol failures
*/
public ID(Response r) throws ProtocolException {
// id_response ::= "ID" SPACE id_params_list
diff -r 1d89be816e09 -r e27004d84069 mail/src/main/java/com/sun/mail/imap/protocol/IMAPProtocol.java
--- a/mail/src/main/java/com/sun/mail/imap/protocol/IMAPProtocol.java Fri May 29 12:31:14 2015 -0700
+++ b/mail/src/main/java/com/sun/mail/imap/protocol/IMAPProtocol.java Thu Jun 04 13:36:41 2015 -0700
@@ -110,9 +110,14 @@
* Constructor.
* Opens a connection to the given host at given port.
*
- * @param host host to connect to
- * @param port portnumber to connect to
- * @param props Properties object used by this protocol
+ * @param name the protocol name
+ * @param host host to connect to
+ * @param port port number to connect to
+ * @param props Properties object used by this protocol
+ * @param isSSL true if SSL should be used
+ * @param logger the MailLogger to use for debug output
+ * @exception IOException for I/O errors
+ * @exception ProtocolException for protocol failures
*/
public IMAPProtocol(String name, String host, int port,
Properties props, boolean isSSL, MailLogger logger)
@@ -152,8 +157,11 @@
/**
* Constructor for debugging.
*
- * @param debug debug mode
- * @param props Properties object used by this protocol
+ * @param in the InputStream from which to read
+ * @param out the PrintStream to which to write
+ * @param props Properties object used by this protocol
+ * @param debug true to enable debugging output
+ * @exception IOException for I/O errors
*/
public IMAPProtocol(InputStream in, PrintStream out,
Properties props, boolean debug)
@@ -182,6 +190,7 @@
* override this method to combine their FetchItems with
* the FetchItems returned by the superclass.
*
+ * @return an array of FetchItem objects
* @since JavaMail 1.4.6
*/
public FetchItem[] getFetchItems() {
@@ -191,6 +200,7 @@
/**
* CAPABILITY command.
*
+ * @exception ProtocolException for protocol failures
* @see "RFC2060, section 6.1.1"
*/
public void capability() throws ProtocolException {
@@ -220,6 +230,8 @@
/**
* If the response contains a CAPABILITY response code, extract
* it and save the capabilities.
+ *
+ * @param r the response
*/
protected void setCapabilities(Response r) {
byte b;
@@ -239,6 +251,8 @@
/**
* Parse the capabilities from a CAPABILITY response or from
* a CAPABILITY response code attached to (e.g.) an OK response.
+ *
+ * @param r the CAPABILITY response
*/
protected void parseCapabilities(Response r) {
String s;
@@ -271,6 +285,9 @@
/**
* Check the greeting when first connecting; look for PREAUTH response.
+ *
+ * @param r the greeting response
+ * @exception ProtocolException for protocol failures
*/
protected void processGreeting(Response r) throws ProtocolException {
super.processGreeting(r); // check if it's BAD
@@ -293,13 +310,17 @@
/**
* Returns <code>true</code> if the connection has been authenticated,
* either due to a successful login, or due to a PREAUTH greeting response.
+ *
+ * @return true if the connection has been authenticated
*/
public boolean isAuthenticated() {
return authenticated;
}
/**
- * Returns <code>true</code> if this is a IMAP4rev1 server
+ * Returns <code>true</code> if this is an IMAP4rev1 server
+ *
+ * @return true if this is an IMAP4rev1 server
*/
public boolean isREV1() {
return rev1;
@@ -307,6 +328,8 @@
/**
* Returns whether this Protocol supports non-synchronizing literals.
+ *
+ * @return true if non-synchronizing literals are supported
*/
protected boolean supportsNonSyncLiterals() {
return hasCapability("LITERAL+");
@@ -314,6 +337,10 @@
/**
* Read a response from the server.
+ *
+ * @return the response
+ * @exception IOException for I/O errors
+ * @exception ProtocolException for protocol failures
*/
public Response readResponse() throws IOException, ProtocolException {
// assert Thread.holdsLock(this);
@@ -328,6 +355,9 @@
* Check whether the given capability is supported by
* this server. Returns <code>true</code> if so, otherwise
* returns false.
+ *
+ * @param c the capability name
+ * @return true if the server has the capability
*/
public boolean hasCapability(String c) {
if (c.endsWith("*")) {
@@ -345,7 +375,8 @@
/**
* Return the map of capabilities returned by the server.
*
- * @since JavaMail 1.4.1
+ * @return the Map of capabilities
+ * @since JavaMail 1.4.1
*/
public Map getCapabilities() {
return capabilities;
@@ -365,6 +396,7 @@
/**
* The NOOP command.
*
+ * @exception ProtocolException for protocol failures
* @see "RFC2060, section 6.1.2"
*/
public void noop() throws ProtocolException {
@@ -375,6 +407,7 @@
/**
* LOGOUT Command.
*
+ * @exception ProtocolException for protocol failures
* @see "RFC2060, section 6.1.3"
*/
public void logout() throws ProtocolException {
@@ -393,6 +426,9 @@
/**
* LOGIN Command.
*
+ * @param u the username
+ * @param p the password
+ * @throws ProtocolException as thrown by {_at_link Protocol#handleResult}.
* @see "RFC2060, section 6.2.2"
*/
public void login(String u, String p) throws ProtocolException {
@@ -427,6 +463,9 @@
/**
* The AUTHENTICATE command with AUTH=LOGIN authenticate scheme
*
+ * @param u the username
+ * @param p the password
+ * @throws ProtocolException as thrown by {_at_link Protocol#handleResult}.
* @see "RFC2060, section 6.2.1"
*/
public synchronized void authlogin(String u, String p)
@@ -740,6 +779,13 @@
/**
* SASL-based login.
+ *
+ * @param allowed the SASL mechanisms we're allowed to use
+ * @param realm the SASL realm
+ * @param authzid the authorization id
+ * @param u the username
+ * @param p the password
+ * @exception ProtocolException for protocol failures
*/
public void sasllogin(String[] allowed, String realm, String authzid,
String u, String p) throws ProtocolException {
@@ -818,6 +864,8 @@
/**
* PROXYAUTH Command.
*
+ * @param u the PROXYAUTH user name
+ * @exception ProtocolException for protocol failures
* @see "Netscape/iPlanet/SunONE Messaging Server extension"
*/
public void proxyauth(String u) throws ProtocolException {
@@ -832,6 +880,7 @@
* Get the user name used with the PROXYAUTH command.
* Returns null if PROXYAUTH was not used.
*
+ * @return the PROXYAUTH user name
* @since JavaMail 1.5.1
*/
public String getProxyAuthUser() {
@@ -841,6 +890,7 @@
/**
* UNAUTHENTICATE Command.
*
+ * @exception ProtocolException for protocol failures
* @see "Netscape/iPlanet/SunONE Messaging Server extension"
* @since JavaMail 1.5.1
*/
@@ -854,6 +904,8 @@
/**
* ID Command, for Yahoo! Mail IMAP server.
*
+ * @param guid the GUID
+ * @exception ProtocolException for protocol failures
* @deprecated As of JavaMail 1.5.1, replaced by
* {_at_link #id(Map) id(Map<String,String>)}
* @since JavaMail 1.4.4
@@ -869,6 +921,7 @@
/**
* STARTTLS Command.
*
+ * @exception ProtocolException for protocol failures
* @see "RFC3501, section 6.2.1"
*/
public void startTLS() throws ProtocolException {
@@ -894,6 +947,9 @@
/**
* SELECT Command.
*
+ * @param mbox the mailbox name
+ * @return MailboxInfo if successful
+ * @exception ProtocolException for protocol failures
* @see "RFC2060, section 6.3.1"
*/
public MailboxInfo select(String mbox) throws ProtocolException {
@@ -903,6 +959,10 @@
/**
* SELECT Command with QRESYNC data.
*
+ * @param mbox the mailbox name
+ * @param rd the ResyncData
+ * @return MailboxInfo if successful
+ * @exception ProtocolException for protocol failures
* @see "RFC2060, section 6.3.1"
* @see "RFC5162, section 3.1"
* @since JavaMail 1.5.1
@@ -952,6 +1012,9 @@
/**
* EXAMINE Command.
*
+ * @param mbox the mailbox name
+ * @return MailboxInfo if successful
+ * @exception ProtocolException for protocol failures
* @see "RFC2060, section 6.3.2"
*/
public MailboxInfo examine(String mbox) throws ProtocolException {
@@ -961,6 +1024,10 @@
/**
* EXAMINE Command with QRESYNC data.
*
+ * @param mbox the mailbox name
+ * @param rd the ResyncData
+ * @return MailboxInfo if successful
+ * @exception ProtocolException for protocol failures
* @see "RFC2060, section 6.3.2"
* @see "RFC5162, section 3.1"
* @since JavaMail 1.5.1
@@ -1018,6 +1085,8 @@
/**
* ENABLE Command.
*
+ * @param cap the name of the capability to enable
+ * @exception ProtocolException for protocol failures
* @see "RFC 5161"
* @since JavaMail 1.5.1
*/
@@ -1035,6 +1104,8 @@
/**
* Is the capability/extension enabled?
*
+ * @param cap the capability name
+ * @return true if enabled
* @see "RFC 5161"
* @since JavaMail 1.5.1
*/
@@ -1048,6 +1119,7 @@
/**
* UNSELECT Command.
*
+ * @exception ProtocolException for protocol failures
* @see "RFC 3691"
* @since JavaMail 1.4.4
*/
@@ -1060,6 +1132,10 @@
/**
* STATUS Command.
*
+ * @param mbox the mailbox
+ * @param items the STATUS items to request
+ * @return STATUS results
+ * @exception ProtocolException for protocol failures
* @see "RFC2060, section 6.3.10"
*/
public Status status(String mbox, String[] items)
@@ -1114,6 +1190,8 @@
/**
* CREATE Command.
*
+ * @param mbox the mailbox to create
+ * @exception ProtocolException for protocol failures
* @see "RFC2060, section 6.3.3"
*/
public void create(String mbox) throws ProtocolException {
@@ -1129,6 +1207,8 @@
/**
* DELETE Command.
*
+ * @param mbox the mailbox to delete
+ * @exception ProtocolException for protocol failures
* @see "RFC2060, section 6.3.4"
*/
public void delete(String mbox) throws ProtocolException {
@@ -1144,6 +1224,9 @@
/**
* RENAME Command.
*
+ * @param o old mailbox name
+ * @param n new mailbox name
+ * @exception ProtocolException for protocol failures
* @see "RFC2060, section 6.3.5"
*/
public void rename(String o, String n) throws ProtocolException {
@@ -1161,6 +1244,8 @@
/**
* SUBSCRIBE Command.
*
+ * @param mbox the mailbox
+ * @exception ProtocolException for protocol failures
* @see "RFC2060, section 6.3.6"
*/
public void subscribe(String mbox) throws ProtocolException {
@@ -1175,6 +1260,8 @@
/**
* UNSUBSCRIBE Command.
*
+ * @param mbox the mailbox
+ * @exception ProtocolException for protocol failures
* @see "RFC2060, section 6.3.7"
*/
public void unsubscribe(String mbox) throws ProtocolException {
@@ -1189,6 +1276,10 @@
/**
* LIST Command.
*
+ * @param ref reference string
+ * @param pattern pattern to list
+ * @return LIST results
+ * @exception ProtocolException for protocol failures
* @see "RFC2060, section 6.3.8"
*/
public ListInfo[] list(String ref, String pattern)
@@ -1199,6 +1290,10 @@
/**
* LSUB Command.
*
+ * @param ref reference string
+ * @param pattern pattern to list
+ * @return LSUB results
+ * @exception ProtocolException for protocol failures
* @see "RFC2060, section 6.3.9"
*/
public ListInfo[] lsub(String ref, String pattern)
@@ -1210,6 +1305,11 @@
* Execute the specified LIST-like command (e.g., "LIST" or "LSUB"),
* using the reference and pattern.
*
+ * @param cmd the list command
+ * @param ref the reference string
+ * @param pat the pattern
+ * @return array of ListInfo results
+ * @exception ProtocolException for protocol failures
* @since JavaMail 1.4.6
*/
protected ListInfo[] doList(String cmd, String ref, String pat)
@@ -1253,6 +1353,11 @@
/**
* APPEND Command.
*
+ * @param mbox the mailbox
+ * @param f the message Flags
+ * @param d the message date
+ * @param data the message data
+ * @exception ProtocolException for protocol failures
* @see "RFC2060, section 6.3.11"
*/
public void append(String mbox, Flags f, Date d,
@@ -1263,6 +1368,12 @@
/**
* APPEND Command, return uid from APPENDUID response code.
*
+ * @param mbox the mailbox
+ * @param f the message Flags
+ * @param d the message date
+ * @param data the message data
+ * @return APPENDUID data
+ * @exception ProtocolException for protocol failures
* @see "RFC2060, section 6.3.11"
*/
public AppendUID appenduid(String mbox, Flags f, Date d,
@@ -1341,6 +1452,7 @@
/**
* CHECK Command.
*
+ * @exception ProtocolException for protocol failures
* @see "RFC2060, section 6.4.1"
*/
public void check() throws ProtocolException {
@@ -1350,6 +1462,7 @@
/**
* CLOSE Command.
*
+ * @exception ProtocolException for protocol failures
* @see "RFC2060, section 6.4.2"
*/
public void close() throws ProtocolException {
@@ -1359,6 +1472,7 @@
/**
* EXPUNGE Command.
*
+ * @exception ProtocolException for protocol failures
* @see "RFC2060, section 6.4.3"
*/
public void expunge() throws ProtocolException {
@@ -1368,6 +1482,8 @@
/**
* UID EXPUNGE Command.
*
+ * @param set UIDs to expunge
+ * @exception ProtocolException for protocol failures
* @see "RFC4315, section 2"
*/
public void uidexpunge(UIDSet[] set) throws ProtocolException {
@@ -1378,6 +1494,10 @@
/**
* Fetch the BODYSTRUCTURE of the specified message.
+ *
+ * @param msgno the message number
+ * @return the BODYSTRUCTURE item
+ * @exception ProtocolException for protocol failures
*/
public BODYSTRUCTURE fetchBodyStructure(int msgno)
throws ProtocolException {
@@ -1398,6 +1518,11 @@
/**
* Fetch given BODY section, without marking the message
* as SEEN.
+ *
+ * @param msgno the message number
+ * @param section the body section
+ * @return the BODY item
+ * @exception ProtocolException for protocol failures
*/
public BODY peekBody(int msgno, String section)
throws ProtocolException {
@@ -1406,6 +1531,11 @@
/**
* Fetch given BODY section.
+ *
+ * @param msgno the message number
+ * @param section the body section
+ * @return the BODY item
+ * @exception ProtocolException for protocol failures
*/
public BODY fetchBody(int msgno, String section)
throws ProtocolException {
@@ -1424,6 +1554,13 @@
/**
* Partial FETCH of given BODY section, without setting SEEN flag.
+ *
+ * @param msgno the message number
+ * @param section the body section
+ * @param start starting byte count
+ * @param size number of bytes to fetch
+ * @return the BODY item
+ * @exception ProtocolException for protocol failures
*/
public BODY peekBody(int msgno, String section, int start, int size)
throws ProtocolException {
@@ -1432,6 +1569,13 @@
/**
* Partial FETCH of given BODY section.
+ *
+ * @param msgno the message number
+ * @param section the body section
+ * @param start starting byte count
+ * @param size number of bytes to fetch
+ * @return the BODY item
+ * @exception ProtocolException for protocol failures
*/
public BODY fetchBody(int msgno, String section, int start, int size)
throws ProtocolException {
@@ -1440,6 +1584,14 @@
/**
* Partial FETCH of given BODY section, without setting SEEN flag.
+ *
+ * @param msgno the message number
+ * @param section the body section
+ * @param start starting byte cou
[truncated due to length]