1 19 20 package org.apache.excalibur.instrument.manager.http.server; 21 22 import java.io.IOException ; 23 import java.io.OutputStream ; 24 import java.io.OutputStreamWriter ; 25 import java.io.PrintWriter ; 26 import java.util.Map ; 27 28 34 public abstract class AbstractHTTPURLPrintWriterHandler 35 extends AbstractHTTPURLHandler 36 { 37 40 47 public AbstractHTTPURLPrintWriterHandler( String path, String contentType, String encoding ) 48 { 49 super( path, contentType + "; charset=" + encoding, encoding ); 50 } 51 52 55 62 public final void doGet( String path, Map parameters, OutputStream os ) 63 throws IOException 64 { 65 PrintWriter out = new PrintWriter ( new OutputStreamWriter ( os, getEncoding() ) ); 66 doGet( path, parameters, out ); 67 out.flush(); 68 } 69 70 73 80 public abstract void doGet( String path, Map parameters, PrintWriter out ) 81 throws IOException ; 82 } 83 84 | Popular Tags |