Java OutputStream Write String writeString(OutputStream out, String s)

Here you can find the source of writeString(OutputStream out, String s)

Description

write String

License

Open Source License

Declaration

public static void writeString(OutputStream out, String s) 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 out, String s) throws IOException {
        for (int i = 0; i < s.length(); i++)
            writeChar(out, s.charAt(i));
    }/*from  www .ja  v a 2s  .  c o m*/

    public static void writeChar(OutputStream out, char c) throws IOException {
        out.write((byte) c);
    }
}

Related

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