All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class COM.ibm.beans.net.INetProtocolHdrParser

java.lang.Object
   |
   +----COM.ibm.beans.net.INetProtocolHdrParser

public class INetProtocolHdrParser
extends Object
A parser for the Net clients that parses the header and body fields of the header of an NetProtocol reply.

 Copyright (c) Taligent, Inc.  1996 - 1997.
 Copyright (c) IBM Corporation 1996 - 1997.
 All Rights Reserved.
 


Constructor Index

 o INetProtocolHdrParser()

Method Index

 o isNewSubject(String)
Return true if this subject line indicates that the article refers to a new topic, false if it is a response to an existing topic.
 o parseAuthor(String)
Parse the Author's name and address from the article's "From:" header line The From: line in the header can be in 4 possible formats (3 as per RFC-850, and one more that seems to be common) Return both, the name and the address of the author in a Vector.
 o parseAuthorAddress(String)
Parse the Author's Electronic address from the article's "From:" header line This method uses parseAuthor() to parse out both parts of the author, and returns the author name only.
 o parseAuthorName(String)
Parse the Author's Name from the article's "From:" header line This method uses parseAuthor() to parse out both parts of the author, and returns the author name only.
 o parseDate(String)
TODO: This and the next are temporarily used functions, and will be removed.
 o parseFirstReference(String)
Parse the referenced articles' identification from the article's "References: " header line, and return the first reference, if any.
 o parseNextReference(String, int)
Parse the referenced articles' identification from the article's "References: " header line, and return the reference specified by index, if any.
 o parseOrganization(String)
Parse the Organization of the article's "Organization:" header line
 o parseSubject(String)
Parse the Subject of the article's "Subject:" header line The Subject line in the header can be either a new subject, or a response to an existing article's subject.

Constructors

 o INetProtocolHdrParser
 public INetProtocolHdrParser()

Methods

 o parseAuthorName
 public static String parseAuthorName(String fromLine)
Parse the Author's Name from the article's "From:" header line This method uses parseAuthor() to parse out both parts of the author, and returns the author name only.

 o parseAuthorAddress
 public static String parseAuthorAddress(String fromLine)
Parse the Author's Electronic address from the article's "From:" header line This method uses parseAuthor() to parse out both parts of the author, and returns the author name only.

 o parseAuthor
 public static Vector parseAuthor(String fromLine)
Parse the Author's name and address from the article's "From:" header line The From: line in the header can be in 4 possible formats (3 as per RFC-850, and one more that seems to be common) Return both, the name and the address of the author in a Vector. 1. From: pratima@taligent.com 2. From: pratima@taligent.com (Pratima Gupta) 3. From: Pratima Gupta 4. From: "Pratima Gupta" 5. From: "PratimaGupta"

Parameters:
fromLine - the "From:" line in the article's header
 o parseSubject
 public static String parseSubject(String subjectLine)
Parse the Subject of the article's "Subject:" header line The Subject line in the header can be either a new subject, or a response to an existing article's subject. In the latter case, the Subject text will begin with the string "Re:".

Parameters:
subjectLine - the "Subject:" line in the article's header
 o isNewSubject
 public static boolean isNewSubject(String subjectLine)
Return true if this subject line indicates that the article refers to a new topic, false if it is a response to an existing topic. The Subject line in the header can be either a new subject, or a response to an existing article's subject. In the latter case, the Subject text will begin with the string "Re:".

Parameters:
subjectLine - the "Subject:" line in the article's header
 o parseOrganization
 public static String parseOrganization(String orgLine)
Parse the Organization of the article's "Organization:" header line

Parameters:
orgLine - the "Organization:" line in the article's header
 o parseDate
 public static String parseDate(String dateLine)
TODO: This and the next are temporarily used functions, and will be removed. It parses the Date line of the header and converts it to a format understood by DB2. Parse the Date from the article's "Date:" header line and return it in the form: YYYY-MM-DD-HH.MM.SS The Date line in the header can be in either of 2 formats: 1. 29 Apr 97 03:30:38 GMT 2. Tue,29 Apr 97 03:30:38 GMT

Parameters:
dateLine - the "Date:" line in the article's header
 o parseFirstReference
 public String parseFirstReference(String refLine)
Parse the referenced articles' identification from the article's "References: " header line, and return the first reference, if any. The identification of each of the referenced articles is in the form : <5l12ra$o28$1@news01a.micron.net> There may be zero or more such references in any article's header.

Parameters:
refLine - the "References:" line in the article's header
 o parseNextReference
 public String parseNextReference(String refLine,
                                  int refAt)
Parse the referenced articles' identification from the article's "References: " header line, and return the reference specified by index, if any. The identification of each of the referenced articles is in the form : <5l12ra$o28$1@news01a.micron.net> There may be zero or more such references in any article's header.

Parameters:
refLine - the "References:" line in the article's header

All Packages  Class Hierarchy  This Package  Previous  Next  Index