Here you can find the source of write(final OutputStream outputStream, final String string)
Parameter | Description |
---|---|
outputStream | a parameter |
string | a parameter |
static final void write(final OutputStream outputStream, final String string) throws IOException
//package com.java2s; //License from project: Apache License import java.io.IOException; import java.io.OutputStream; import java.nio.charset.Charset; import java.nio.charset.StandardCharsets; public class Main { static final Charset DEFAULT_CHARSET = StandardCharsets.UTF_8; /**//from w w w . java 2 s . c o m * @param outputStream * @param string */ static final void write(final OutputStream outputStream, final String string) throws IOException { write(outputStream, string.getBytes(DEFAULT_CHARSET)); } /** * @param outputStream * @param data */ static final void write(final OutputStream outputStream, final byte[] data) throws IOException { outputStream.write(data); } }