Check whether this folder is subscribed.
()
| 730 | * Check whether this folder is subscribed. |
| 731 | */ |
| 732 | @Override |
| 733 | public synchronized boolean isSubscribed() { |
| 734 | ListInfo[] li = null; |
| 735 | final String lname; |
| 736 | if (isNamespace && separator != '\0') |
| 737 | lname = fullName + separator; |
| 738 | else |
| 739 | lname = fullName; |
| 740 | |
| 741 | try { |
| 742 | li = (ListInfo[])doProtocolCommand(new ProtocolCommand() { |
| 743 | @Override |
| 744 | public Object doCommand(IMAPProtocol p) |
| 745 | throws ProtocolException { |
| 746 | return p.lsub("", lname); |
| 747 | } |
| 748 | }); |
| 749 | } catch (ProtocolException pex) { |
| 750 | } |
| 751 | |
| 752 | if (li != null) { |
| 753 | int i = findName(li, lname); |
| 754 | return li[i].canOpen; |
| 755 | } else |
| 756 | return false; |
| 757 | } |
| 758 | |
| 759 | /** |
| 760 | * Subscribe/Unsubscribe this folder. |
nothing calls this directly
no test coverage detected