()
| 288 | } |
| 289 | |
| 290 | @Override |
| 291 | public synchronized boolean isOpen() { |
| 292 | if (!opened) |
| 293 | return false; |
| 294 | try { |
| 295 | if (!port.noop()) |
| 296 | throw new IOException("NOOP failed"); |
| 297 | } catch (IOException ioex) { |
| 298 | try { |
| 299 | close(false); |
| 300 | } catch (MessagingException mex) { |
| 301 | // ignore it |
| 302 | } |
| 303 | return false; |
| 304 | } |
| 305 | return true; |
| 306 | } |
| 307 | |
| 308 | /** |
| 309 | * Always returns an empty <code>Flags</code> object because |