Return the size of the message using the LIST command.
(int msg)
| 857 | * Return the size of the message using the LIST command. |
| 858 | */ |
| 859 | synchronized int list(int msg) throws IOException { |
| 860 | Response r = simpleCommand("LIST " + msg); |
| 861 | int size = -1; |
| 862 | if (r.ok && r.data != null) { |
| 863 | try { |
| 864 | StringTokenizer st = new StringTokenizer(r.data); |
| 865 | st.nextToken(); // skip message number |
| 866 | size = Integer.parseInt(st.nextToken()); |
| 867 | } catch (RuntimeException e) { |
| 868 | // ignore it |
| 869 | } |
| 870 | } |
| 871 | return size; |
| 872 | } |
| 873 | |
| 874 | /** |
| 875 | * Return the size of all messages using the LIST command. |
nothing calls this directly
no test coverage detected