//(c):Benja Fallenstein package gzz.util; import java.io.*; import java.util.*; /** An abstract implementation of Header822. */ public abstract class AbstractHeader822 implements Header822 { protected Collection lines; protected AbstractHeader822(Collection lines) { this.lines = lines; } protected AbstractHeader822(Collection lines, String contentType) { this.lines = lines; add("Content-Type", contentType); } protected AbstractHeader822(Collection lines, Header822 initializeFrom) throws IOException { this.lines = lines; Iterator i = initializeFrom.getLines().iterator(); for(; i.hasNext();) add((String)i.next()); } protected AbstractHeader822(Collection lines, InputStream readFrom) { this.lines = lines; throw new UnsupportedOperationException(); } public Collection getLines() { return Collections.unmodifiableCollection(lines); } public void add(String field) { lines.add(field); } public void add(String fieldName, String fieldValue) { add(fieldName + ": " + fieldValue); } public void writeTo(OutputStream out) { } }