: Class MailParser

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| ## TsBiff 1.3
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## ts.mail
Class MailParser

    java.lang.Object
      |
      +--ts.mail.MailParser

public final class MailParser
extends java.lang.Object

Utillity class for parsing Mail. The class scan and tokenize mail on the following format:

     From <text>
     <header-key>:<text>
     <newline>
     <mailbody>

     From <text>
     ... and so on

Here's an example of a recognizable mail:

     From hauk@tildeslash.com  Tus, Dec 28 12:04:16 1998
     Return-Path:
     Received: from localhost (hauk@localhost [127.0.0.1])
          by tildeslash.com (8.8.7/8.8.7) with SMTP id NAA24592
          for hauk; Tus, 28 Dec 1998 12:04:16 +0100
     Date: Tus, 28 Dec 1998 12:04:16 +0100
     From: Jan-Henrik Haukeland
     Message-Id: <199812281204.NAA24592@tildeslash.com>
     To: hauk@tildeslash.com
     Subject: hello

     Hello there

Version:
  $Id: MailParser.java,v 1.14 2000/03/24 17:18:24 hauk Exp $
Author:
  Jan-Henrik Haukeland <hauk@tildeslash.com>

Method Summary
`static java.util.Vector` | `parse(java.io.InputStream inputstream)` Parse a mailbox and return a vector with MailModels

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Method Detail

### parse

    public static java.util.Vector parse(java.io.InputStream inputstream)
                                  throws GetMailException

  Parse a mailbox and return a vector with MailModels
  Parameters:
    `in` - an InputStream opened against a mailbox source
  Returns:
    a vector with MailModels. Each model represent a mail-message from the mailbox
  Throws:
    `GetMailException` - Is thrown if mail for some reason could not be read

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| ## TsBiff 1.3
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD