/[classpath]/inetlib/source/gnu/inet/comsat/ComsatInfo.java
ViewVC logotype

Diff of /inetlib/source/gnu/inet/comsat/ComsatInfo.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.2 by dog, Thu Oct 21 15:21:54 2004 UTC revision 1.3 by dog, Thu Nov 25 22:15:05 2004 UTC
# Line 1  Line 1 
1  /*  /*
2   * $Id$   * ComsatInfo.java
3   * Copyright (C) 2004 The Free Software Foundation   * Copyright (C) 2004 The Free Software Foundation
4   *   *
5   * This file is part of GNU inetlib, a library.   * This file is part of GNU inetlib, a library.
# Line 39  Line 39 
39  package gnu.inet.comsat;  package gnu.inet.comsat;
40    
41  import java.util.Iterator;  import java.util.Iterator;
42    import java.util.LinkedHashMap;
43  import java.util.Map;  import java.util.Map;
 import java.util.TreeMap;  
44    
45  /**  /**
46   * A comsat notification message.   * A comsat notification message.
# Line 58  public class ComsatInfo Line 58  public class ComsatInfo
58    /**    /**
59     * The message headers.     * The message headers.
60     */     */
61    protected Map headers;    protected Map headers = new LinkedHashMap();
62    
63    /**    /**
64     * The first few lines of the message body.     * The first few lines of the message body.
65     */     */
66    protected String body;    protected String body;
67    
68    public String getMailbox ()    public String getMailbox()
69    {    {
70      return mailbox;      return mailbox;
71    }    }
72    
73    protected void setMailbox (String mailbox)    protected void setMailbox(String mailbox)
74    {    {
75      this.mailbox = mailbox;      this.mailbox = mailbox;
76    }    }
77    
78    public String getHeader (String key)    public String getHeader(String key)
79    {    {
80      return (String) headers.get (key);      return (String) headers.get(key);
81    }    }
82    
83    public Iterator getHeaderNames ()    public Iterator getHeaderNames()
84    {    {
85      return headers.keySet ().iterator ();      return headers.keySet().iterator();
86    }    }
87    
88    protected void setHeader (String key, String value)    protected void setHeader(String key, String value)
89    {    {
90      headers.put (key, value);      headers.put(key, value);
91    }    }
92    
93    public String getBody ()    public String getBody()
94    {    {
95      return body;      return body;
96    }    }
97    
98    protected void setBody (String body)    protected void setBody(String body)
99    {    {
100      this.body = body;      this.body = body;
101    }    }
102        
103  }  }
104    

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26