title: is it possible to find if message is unread using java mail API?
body: <p>I was using java mail to read Gmail as following -</p>
  
  <pre><code>Session session = Session.getDefaultInstance(props, null);
  Store store = session.getStore("imaps");
  store.connect("imap.gmail.com", "mail", "password");
  
  Folder folder = store.getFolder("INBOX");
  folder.open(Folder.READ_WRITE);
  
  Message[] messages = folder.getMessages();
  </code></pre>
  
  <p>Now I wan to find out if message is unread, but could not find any API.
  I want to do something like -</p>
  
  <pre><code> for(Message message:messages) {
  
      if(message.isUnread) {
      // Do Something here
      }
   }
  </code></pre>
  
  <p>While there is no such API - isUnred.</p>