Here you can find the source of dump(byte[] data, OutputStream out, boolean closeOutput)
Parameter | Description |
---|---|
data | a parameter |
out | a parameter |
closeOutput | a parameter |
Parameter | Description |
---|---|
IOException | an exception |
public static void dump(byte[] data, OutputStream out, boolean closeOutput) throws IOException
//package com.java2s; import java.io.IOException; import java.io.OutputStream; public class Main { /**/* w w w . j a va 2 s . c o m*/ * Dump all data in buffer to output stream. Optionally close output stream * when all data has been written. * * @param data * @param out * @param closeOutput * @throws IOException */ public static void dump(byte[] data, OutputStream out, boolean closeOutput) throws IOException { try { out.write(data, 0, data.length); } finally { if (closeOutput) { out.close(); } } } }