Here you can find the source of writeString(OutputStream os, String request, String charsetName)
Parameter | Description |
---|---|
os | a parameter |
request | a parameter |
charsetName | a parameter |
Parameter | Description |
---|---|
IOException | an exception |
public static final void writeString(OutputStream os, String request, String charsetName) throws IOException
//package com.java2s; /************************************************************************** * Copyright (c) Dawn InfoTek Inc. 1999, 2004, 2008 -All rights reserved. * * (<http://www.dawninfotek.com>) * * * * This file contains proprietary intellectual property of * * Dawn InfoTek Inc. The contents of and information in this file * * is only to be used in conjunction with a valid Dawn4J license * * as specified in the Dawn4J license agreement. All other use * * is prohibited. * **************************************************************************/ import java.io.BufferedWriter; import java.io.IOException; import java.io.OutputStream; import java.io.OutputStreamWriter; public class Main { /**/*w ww.j a va 2 s.c o m*/ * * @param os * @param request * @param charsetName * @throws IOException */ public static final void writeString(OutputStream os, String request, String charsetName) throws IOException { OutputStreamWriter writer = new OutputStreamWriter(os, charsetName); BufferedWriter bw = new BufferedWriter(writer); bw.write(request); bw.write("\r\n"); bw.flush(); } }