protected POP3Message createMessage(Folder f, int msgno) throws MessagingException { POP3Message m = null; Constructor<?> cons = store.messageConstructor; if (cons != null) { try { Object[] o = { this, Integer.valueOf(msgno) }; m = (POP3Message)cons.newInstance(o); } catch (Exception ex) { // ignore } } if (m == null) m = new POP3Message(this, msgno); return m; }
/** * Get all header lines as an Enumeration of Strings. A Header * line is a raw RFC822 header-line, containing both the "name" * and "value" field. * * @exception MessagingException for failures */ @SuppressWarnings("unchecked") public Enumeration<String> getAllHeaderLines() throws MessagingException { if (headers == null) loadHeaders(); return headers.getAllHeaderLines(); }
/** * Return the MIME format stream corresponding to this message part. * * @return the MIME format stream * @since JavaMail 1.4.5 */ public InputStream getMimeStream() throws MessagingException { return getRawStream(false); }
if (m.isSet(Flags.Flag.DELETED)) try { port.dele(i + 1); m.invalidate(true);
/** * 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); } }
InputStream cs = null; try { cs = getContentStream(); } finally { if (cs != null)
for (int i = 0; i < message_cache.size(); i++) { if ((m = (POP3Message)message_cache.elementAt(i)) != null) { if (m.isSet(Flags.Flag.DELETED)) try { port.dele(i + 1);
((POP3Message) message).invalidate(true);
if (m.isSet(Flags.Flag.DELETED)) try { port.dele(i + 1); m.invalidate(true);
/** * 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); } }
InputStream cs = null; try { cs = getContentStream(); } finally { if (cs != null)
/** * Return matching headers from this Message as an Enumeration of * Header objects. * * @exception MessagingException for failures */ @SuppressWarnings("unchecked") public Enumeration<Header> getMatchingHeaders(String[] names) throws MessagingException { if (headers == null) loadHeaders(); return headers.getMatchingHeaders(names); }
if (m.isSet(Flags.Flag.DELETED)) try { port.dele(i + 1); m.invalidate(true);
/** * Return the MIME format stream corresponding to this message part. * * @return the MIME format stream * @since JavaMail 1.4.5 */ @Override public InputStream getMimeStream() throws MessagingException { return getRawStream(false); }
protected POP3Message createMessage(Folder f, int msgno) throws MessagingException { POP3Message m = null; Constructor<?> cons = store.messageConstructor; if (cons != null) { try { Object[] o = { this, Integer.valueOf(msgno) }; m = (POP3Message)cons.newInstance(o); } catch (Exception ex) { // ignore } } if (m == null) m = new POP3Message(this, msgno); return m; }
/** * Return the unique ID string for this message, or null if * not available. Uses the POP3 UIDL command. * * @return unique ID string * @exception MessagingException */ public synchronized String getUID(Message msg) throws MessagingException { checkOpen(); POP3Message m = (POP3Message)msg; try { 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); } }
InputStream cs = null; try { cs = getContentStream(); } finally { if (cs != null)