if (!firstTime && debug) System.err.println ("\nIncomingEmail: Email instream restored.");
if (!firstTime && log.isInfoEnabled()) log.info ("Email instream restored");
    private final synchronized boolean readAndDeliverMessage (EmailInputStream emailIn)    {      //  This method is synchronized to insure messages are delivered in      //  the same order they are read.      AttributedMessage msg = null;      try       {        //  There's a bit of a tricky bit with this ObjectInputStream (creates its        //  own thread perhaps).  We do this here so that later errors on the stream        //  come out of the catch clause here.  NOTE:  This problem has been fixed        //  as a side effect of removing the stream headers from the object streams.        //  Before, with the regular ObjectInputStream, its construction caused         //  a separate thread to be created to read the stream header.        if (messageIn == null)        {             messageIn = new NoHeaderInputStream (emailIn);           if (!firstTime && debug) System.err.println ("\nIncomingEmail: Email instream restored.");           firstTime = false;        }        //  Sit and wait for a message to come in (the underlying        //  email stream is polling its mail box).              msg = (AttributedMessage) messageIn.readObject();        if (showTraffic) System.err.print ("<E");        if (debug)         {          System.err.println ("\nIncomingEmail: read " +MessageUtils.toString(msg));        }        //  Deliver the message              if (msg != null) getDeliverer().deliverMessage (msg, msg.getTarget());        //  Return success        return true;      }       catch (Exception e)       {        if (debug)        {          if (msg == null) System.err.println ("\nIncomingEmail: Email instream lost...");          else System.err.println ("\nIncomingEmail: Problem delivering msg " +MessageUtils.toString(msg));e.printStackTrace();        }        // if (debug) e.printStackTrace();              //  It's important to close the message stream due to its        //  underlying polling email stream.              if (messageIn != null)        {          try { messageIn.close(); } catch (Exception e2) {}          messageIn = null;        }        //  Return failure        return false;      }    }