diff --git a/src/java/davmail/exchange/ExchangeSessionFactory.java b/src/java/davmail/exchange/ExchangeSessionFactory.java index eca061ad..aece22f2 100644 --- a/src/java/davmail/exchange/ExchangeSessionFactory.java +++ b/src/java/davmail/exchange/ExchangeSessionFactory.java @@ -118,6 +118,11 @@ public final class ExchangeSessionFactory { return session; } + /** + * Send a request to Exchange server to check current settings. + * + * @throws IOException if unable to access Exchange server + */ public static void checkConfig() throws IOException { String url = Settings.getProperty("davmail.url"); HttpClient httpClient = DavGatewayHttpClientFacade.getInstance(); @@ -187,6 +192,9 @@ public final class ExchangeSessionFactory { return up; } + /** + * Reset config check status and clear session pool. + */ public static void reset() { configChecked = false; poolMap.clear(); diff --git a/src/java/davmail/exchange/ICSBufferedReader.java b/src/java/davmail/exchange/ICSBufferedReader.java index 6eb182f8..cf37ce94 100644 --- a/src/java/davmail/exchange/ICSBufferedReader.java +++ b/src/java/davmail/exchange/ICSBufferedReader.java @@ -30,11 +30,19 @@ public class ICSBufferedReader extends BufferedReader { protected String nextLine; protected final StringBuilder currentLine = new StringBuilder(75); + /** + * Create an ICS reader on the provided reader + * @param in input reader + * @throws IOException on error + */ public ICSBufferedReader(Reader in) throws IOException { super(in); nextLine = super.readLine(); } + /** + * Read a line from input reader, unwrap long lines. + */ @Override public String readLine() throws IOException { if (nextLine == null) { diff --git a/src/java/davmail/exchange/ICSBufferedWriter.java b/src/java/davmail/exchange/ICSBufferedWriter.java index 6af0312e..b5824c87 100644 --- a/src/java/davmail/exchange/ICSBufferedWriter.java +++ b/src/java/davmail/exchange/ICSBufferedWriter.java @@ -25,6 +25,10 @@ package davmail.exchange; public class ICSBufferedWriter { final StringBuilder buffer = new StringBuilder(); + /** + * Write line to buffer, split lines at 75 characters. + * @param line ics event line + */ public void writeLine(String line) { if (line.length() > 75) { buffer.append(line.substring(0, 75)); @@ -37,10 +41,14 @@ public class ICSBufferedWriter { } } - public void newLine() { + protected void newLine() { buffer.append((char) 13).append((char) 10); } + /** + * Get buffer as String + * @return ICS content as String + */ @Override public String toString() { return buffer.toString(); diff --git a/src/java/davmail/exchange/NetworkDownException.java b/src/java/davmail/exchange/NetworkDownException.java index 0a177887..b92d390f 100644 --- a/src/java/davmail/exchange/NetworkDownException.java +++ b/src/java/davmail/exchange/NetworkDownException.java @@ -24,6 +24,10 @@ import davmail.exception.DavMailException; * Custom exception to mark network down case. */ public class NetworkDownException extends DavMailException { + /** + * Build a network down exception with the provided BundleMessage key. + * @param key message key + */ public NetworkDownException(String key) { super(key); }