/** * Return the size of this folder, as was returned by the POP3 STAT * command when this folder was opened. * * @return folder size * @exception IllegalStateException if the folder isn't open * @exception MessagingException for other failures */ public synchronized int getSize() throws MessagingException { checkOpen(); return size; }
/** * Centralize access to the Protocol object by POP3Message * objects so that they will fail appropriately when the folder * is closed. */ Protocol getProtocol() throws MessagingException { Protocol p = port; // read it before close() can set it to null checkOpen(); // close() might happen here return p; }
/** * Centralize access to the Protocol object by POP3Message * objects so that they will fail appropriately when the folder * is closed. */ Protocol getProtocol() throws MessagingException { Protocol p = port; // read it before close() can set it to null checkOpen(); // close() might happen here return p; }
/** * Return the size of this folder, as was returned by the POP3 STAT * command when this folder was opened. * * @return folder size * @exception IllegalStateException if the folder isn't open * @exception MessagingException for other failures */ public synchronized int getSize() throws MessagingException { checkOpen(); return size; }
/** * Return the raw results of the POP3 LIST command with no arguments. * * @return InputStream containing results * @exception IllegalStateException if the folder isn't open * @exception IOException for I/O errors talking to the server * @exception MessagingException for other errors * @since JavaMail 1.3.3 */ public synchronized InputStream listCommand() throws MessagingException, IOException { checkOpen(); return port.list(); }
public synchronized Message getMessage(int msgno) throws MessagingException { checkOpen(); POP3Message m; // Assuming that msgno is <= total if ((m = message_cache[msgno-1]) == null) { m = createMessage(this, msgno); message_cache[msgno-1] = m; } return m; }
@Override public synchronized Message getMessage(int msgno) throws MessagingException { checkOpen(); POP3Message m; // Assuming that msgno is <= total if ((m = message_cache[msgno-1]) == null) { m = createMessage(this, msgno); message_cache[msgno-1] = m; } return m; }
/** * Return the raw results of the POP3 LIST command with no arguments. * * @return InputStream containing results * @exception IllegalStateException if the folder isn't open * @exception IOException for I/O errors talking to the server * @exception MessagingException for other errors * @since JavaMail 1.3.3 */ public synchronized InputStream listCommand() throws MessagingException, IOException { checkOpen(); return port.list(); }
checkOpen(); int sizes[] = new int[total]; InputStream is = null;
checkOpen(); int sizes[] = new int[total]; InputStream is = null;
/** * Return the size of this folder, as was returned by the POP3 STAT * command when this folder was opened. * * @return folder size * @exception IllegalStateException if the folder isn't open * @exception MessagingException for other failures */ public synchronized int getSize() throws MessagingException { checkOpen(); return size; }
/** * Return the unique ID string for this message, or null if * not available. Uses the POP3 UIDL command. * * @param msg the message * @return unique ID string * @exception MessagingException for failures */ public synchronized String getUID(Message msg) throws MessagingException { checkOpen(); if (!(msg instanceof POP3Message)) throw new MessagingException("message is not a POP3Message"); POP3Message m = (POP3Message)msg; try { if (!store.supportsUidl) return null; if (m.uid == POP3Message.UNKNOWN) m.uid = port.uidl(m.getMessageNumber()); return m.uid; } catch (EOFException eex) { close(false); throw new FolderClosedException(this, eex.toString()); } catch (IOException ex) { throw new MessagingException("error getting UIDL", ex); } }
/** * Return the unique ID string for this message, or null if * not available. Uses the POP3 UIDL command. * * @param msg the message * @return unique ID string * @exception MessagingException for failures */ public synchronized String getUID(Message msg) throws MessagingException { checkOpen(); if (!(msg instanceof POP3Message)) throw new MessagingException("message is not a POP3Message"); POP3Message m = (POP3Message)msg; try { if (!store.supportsUidl) return null; if (m.uid == POP3Message.UNKNOWN) m.uid = port.uidl(m.getMessageNumber()); return m.uid; } catch (EOFException eex) { close(false); throw new FolderClosedException(this, eex.toString()); } catch (IOException ex) { throw new MessagingException("error getting UIDL", ex); } }
@Override public synchronized void close(boolean expunge) throws MessagingException { checkOpen();
public synchronized void close(boolean expunge) throws MessagingException { checkOpen();
public synchronized Message getMessage(int msgno) throws MessagingException { checkOpen(); POP3Message m; // Assuming that msgno is <= total if ((m = (POP3Message)message_cache.elementAt(msgno-1)) == null) { m = createMessage(this, msgno); message_cache.setElementAt(m, msgno-1); } return m; }
@Override public synchronized Message getMessage(int msgno) throws MessagingException { checkOpen(); POP3Message m; // Assuming that msgno is <= total if ((m = message_cache[msgno-1]) == null) { m = createMessage(this, msgno); message_cache[msgno-1] = m; } return m; }
/** * Return the raw results of the POP3 LIST command with no arguments. * * @return InputStream containing results * @exception IllegalStateException if the folder isn't open * @since JavaMail 1.3.3 */ public synchronized InputStream listCommand() throws MessagingException, IOException { checkOpen(); return port.list(); }
@Override public synchronized Message getMessage(int msgno) throws MessagingException { checkOpen(); POP3Message m; // Assuming that msgno is <= total if ((m = message_cache[msgno-1]) == null) { m = createMessage(this, msgno); message_cache[msgno-1] = m; } return m; }
@Override public synchronized Message getMessage(int msgno) throws MessagingException { checkOpen(); POP3Message m; // Assuming that msgno is <= total if ((m = message_cache[msgno-1]) == null) { m = createMessage(this, msgno); message_cache[msgno-1] = m; } return m; }