Java OutputStream Write String writeString(OutputStream os, String text)

Here you can find the source of writeString(OutputStream os, String text)

Description

write String

License

Open Source License

Declaration

public static void writeString(OutputStream os, String text) throws IOException 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

import java.io.*;

public class Main {
    public static void writeString(OutputStream os, String text) throws IOException {
        BufferedWriter writer = new BufferedWriter(new OutputStreamWriter(os, "UTF-8"));
        writer.write(text);/*w  w  w.  ja v a  2s.co m*/
        writer.flush();
        writer.close();
    }
}

Related

  1. writeString(OutputStream os, String request, String charsetName)
  2. writeString(OutputStream os, String s)
  3. writeString(OutputStream os, String s)
  4. writeString(OutputStream os, String s)
  5. writeString(OutputStream os, String str)
  6. writeString(OutputStream out, String s)
  7. writeString(OutputStream out, String s)
  8. writeString(OutputStream out, String s)
  9. writeString(OutputStream out, String s)