Java OutputStream Write writeStream(byte[] data, OutputStream os)

Here you can find the source of writeStream(byte[] data, OutputStream os)

Description

write Stream

License

Apache License

Declaration

public static void writeStream(byte[] data, OutputStream os) throws IOException 

Method Source Code

//package com.java2s;
//License from project: Apache License 

import java.io.IOException;

import java.io.OutputStream;
import java.io.OutputStreamWriter;

public class Main {
    public static void writeStream(byte[] data, OutputStream os) throws IOException {
        os.write(data);/*ww w  .j ava 2 s .  c o  m*/
        os.flush();
    }

    public static void writeStream(String data, OutputStream os) throws IOException {
        OutputStreamWriter fw = new OutputStreamWriter(os);
        fw.write(data);
        fw.flush();
    }
}

Related

  1. serializeString(OutputStream out, String data)
  2. serializeString(String str, DataOutputStream dout)
  3. serializeTo(OutputStream outputStream, Object obj)
  4. serializeToOutputStream(final Serializable ser, final OutputStream os)
  5. serializeUUID(OutputStream out, UUID id)
  6. writeStream(byte[] data, OutputStream out)
  7. writeStream(final OutputStream out, final String content, final boolean close)
  8. writeStream(InputStream _from, Writer _printTo)
  9. writeStream(InputStream in, File file)