Class MimeReader

    • Constructor Detail

      • MimeReader

        public MimeReader()
      • MimeReader

        public MimeReader​(javax.mail.Multipart mp)
        create a reader from an existing mutipart
        Parameters:
        mp -
      • MimeReader

        public MimeReader​(java.io.InputStream mimeStream)
        create a root multipart from an input stream
        Parameters:
        mimeStream - the input stream
      • MimeReader

        public MimeReader​(MimeWriter writer)
        create a root multipart from a MimeWriter
        Parameters:
        writer - the input writer that will now be read
      • MimeReader

        public MimeReader​(java.lang.String url)
        create a root multipart from an input stream
        Parameters:
        url - the url or file name
      • MimeReader

        public MimeReader​(java.io.File file)
        create a root multipart from an input stream
        Parameters:
        url - the url or file name
    • Method Detail

      • getJDFDoc

        public JDFDoc getJDFDoc​(java.io.InputStream stream,
                                int index)
        get the JDF Doc from a stream, also handle non mime streams gracefully
        Parameters:
        stream - the stream to search in
        index - the index of the body part to search
        Returns:
        JDFDoc the parsed xml JDFDoc, null if stream does not contain xml
      • getXMLDoc

        public XMLDoc getXMLDoc​(java.io.InputStream stream,
                                int index)
        get the JDF Doc from a stream, also handle non mime streams gracefully
        Parameters:
        stream - the stream to search in
        index - the index of the body part to search
        Returns:
        JDFDoc the parsed xml JDFDoc, null if stream does not contain xml
      • getURLInputStream

        public java.io.InputStream getURLInputStream​(java.lang.String urlString)
        get the opened input stream for a given url string
        Parameters:
        urlString -
        Returns:
      • getFileName

        public java.lang.String getFileName​(java.lang.String url)
        Parameters:
        url -
        Returns: