Here you can find the source of writeBytes(byte[] data, OutputStream stream)
Parameter | Description |
---|---|
data | data |
stream | destination stream |
Parameter | Description |
---|---|
IOException | an exception |
public static void writeBytes(byte[] data, OutputStream stream) throws IOException
//package com.java2s; //License from project: Open Source License import java.io.*; public class Main { /**/*from w w w . j av a2 s . co m*/ * Writing byte array to stream * * @param data data * @param stream destination stream * @throws IOException */ public static void writeBytes(byte[] data, OutputStream stream) throws IOException { stream.write(data); } /** * Writing byte array to stream * * @param data data * @param stream destination stream * @throws IOException */ public static void writeBytes(byte[] data, int offset, int len, OutputStream stream) throws IOException { stream.write(data, offset, len); } }