Java OutputStream Write String WriteStringToOutputStream(String data, OutputStream os)

Here you can find the source of WriteStringToOutputStream(String data, OutputStream os)

Description

Write String To Output Stream

License

Open Source License

Declaration

private static void WriteStringToOutputStream(String data, OutputStream os) throws IOException 

Method Source Code

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

import java.io.IOException;

import java.io.OutputStream;

public class Main {
    private static void WriteStringToOutputStream(String data, OutputStream os) throws IOException {
        for (Character c : data.toCharArray()) {
            os.write((int) c.charValue());
        }//  w ww . j  a va 2  s.co  m
    }
}

Related

  1. writeStringKey(final Object key, final ObjectOutputStream oos)
  2. writeStringMap(ObjectOutputStream out, Map map)
  3. writeStringSmart(ByteArrayOutputStream baos, String s, Map knownStrings)
  4. writeStringStringMap(Map map, OutputStream os)
  5. writeStringStringMap(Map map, OutputStream os)
  6. writeStringToStream(final OutputStream stream, final String string)
  7. writeStringToStream(final String s, final OutputStream outputStream)
  8. writeStringToStream(OutputStream out, String contents, String charset)
  9. writeStringToUtf8(final String str, final OutputStream out)