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
(Message msg)
| 451 | * @exception MessagingException for failures |
| 452 | */ |
| 453 | public synchronized String getUID(Message msg) throws MessagingException { |
| 454 | checkOpen(); |
| 455 | if (!(msg instanceof POP3Message)) |
| 456 | throw new MessagingException("message is not a POP3Message"); |
| 457 | POP3Message m = (POP3Message)msg; |
| 458 | try { |
| 459 | if (!store.supportsUidl) |
| 460 | return null; |
| 461 | if (m.uid == POP3Message.UNKNOWN) |
| 462 | m.uid = port.uidl(m.getMessageNumber()); |
| 463 | return m.uid; |
| 464 | } catch (EOFException eex) { |
| 465 | close(false); |
| 466 | throw new FolderClosedException(this, eex.toString()); |
| 467 | } catch (IOException ex) { |
| 468 | throw new MessagingException("error getting UIDL", ex); |
| 469 | } |
| 470 | } |
| 471 | |
| 472 | /** |
| 473 | * Return the size of this folder, as was returned by the POP3 STAT |
nothing calls this directly
no test coverage detected