/[gzz]/gzz/lava/gzz/util/Header822.java
ViewVC logotype

Diff of /gzz/lava/gzz/util/Header822.java

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

revision 1.3 by benja, Thu Aug 29 21:34:56 2002 UTC revision 1.4 by benja, Sat Aug 31 14:01:29 2002 UTC
# Line 28  import java.util.*; Line 28  import java.util.*;
28   *  Currently mostly a placeholder to get the storm interfaces   *  Currently mostly a placeholder to get the storm interfaces
29   *  to compile-- NEEDS THINKING.   *  to compile-- NEEDS THINKING.
30   *  <p>   *  <p>
31     *  Subclasses will often provide:
32     *  <ul>
33     *  <li>An empty constructor for creating an empty header.</li>
34     *  <li>A constructor taking another <code>Header822</code>,
35     *      for creating a header initialized with the data
36     *      from another header.</li>
37     *  <li>A constructor taking a String, for creating a header
38     *      initialized with a given <code>Content-Type</code> value.</li>
39     *  </ul>
40     *  <p>
41   *  (Note: This isn't called <code>Header2822</code> because   *  (Note: This isn't called <code>Header2822</code> because
42   *  that would be clumsier to type, especially in subclasses--   *  that would be clumsier to type, especially in subclasses--
43   *  <code>UniqueHeader2822</code> and so on. Then again,   *  <code>UniqueHeader2822</code> and so on. Then again,
# Line 35  import java.util.*; Line 45  import java.util.*;
45   *  makes it not RFC822-compliant...)   *  makes it not RFC822-compliant...)
46   */   */
47  public interface Header822 {  public interface Header822 {
48        // get single String, just value, no folding inside
49      String getOne(String field) throws IOException;      String getOne(String field) throws IOException;
50    
51        // get collection of Strings, just values, no folding inside
52      Collection getAll(String field) throws IOException;      Collection getAll(String field) throws IOException;
53    
54        // get collection of Strings, whole fields, i.e. field name
55        // plus field value, folded
56      Collection getLines() throws IOException;      Collection getLines() throws IOException;
57      void write(OutputStream out) throws IOException;  
58        // add field
59        void add(String fieldName, String fieldValue)
60                throws IOException, UnsupportedOperationException;
61    
62        // add field raw (as a single String containing field name
63        // *and* field value, possibly folded)
64        void add(String field) throws IOException, UnsupportedOperationException;
65    
66        // write to an output stream
67        void writeTo(OutputStream out) throws IOException;
68    
69      // XXX think, document...      // XXX think, document...
70  }  }

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

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