Here you can find the source of writeStream(OutputStream output, String dataStr)
Parameter | Description |
---|---|
output | The OutputStream |
dataStr | The String to write to the OutputStream |
public static void writeStream(OutputStream output, String dataStr) throws IOException
//package com.java2s; //License from project: Apache License import java.io.IOException; import java.io.OutputStream; public class Main { /**/* w w w . j av a2s. c o m*/ *** Writes a String to the specified OutputStream *** * @param output * The OutputStream *** @param dataStr * The String to write to the OutputStream **/ public static void writeStream(OutputStream output, String dataStr) throws IOException { byte data[] = dataStr.getBytes(); output.write(data, 0, data.length); } }