public static void writeHttpResponseHeader(Writer out,String contentType,int contentLength) throws IOException {
  out.write("HTTP/1.0 200 \n");
  out.write("Content-type: " + contentType + "\n");
  out.write("Content-Length: " + contentLength + "\n");
  out.write("\n");
}

public static void writeHttpResponseHeader ( Writer out , String contentType , int contentLength ) throws IOException { out . write ( "HTTP/1.0 200 \n" ) ; out . write ( "Content-type: " + contentType + "\n" ) ; out . write ( "Content-Length: " + contentLength + "\n" ) ; out . write ( "\n" ) ; }
can be used to write the header to an httpresponse . you need to create a writer tied to the outputstream in order to write this text .
