Here you can find the source of dumpEvent(String event, OutputStream stream)
Parameter | Description |
---|---|
data | the byte array to be dumped |
offset | its offset, whatever that might mean |
stream | the OutputStream to which the data is to be written |
index | initial index into the byte array |
public static void dumpEvent(String event, OutputStream stream) throws IOException
//package com.java2s; /* Copyright 2004 - 2007 Kasper Nielsen <kasper@codehaus.org> Licensed under * the Apache 2.0 License, see http://coconut.codehaus.org/license. */// w w w . ja va2 s. c o m import java.io.IOException; import java.io.OutputStream; public class Main { private static final String EOL = System.getProperty("line.separator"); /** * dump an array of bytes to an OutputStream * * @param data the byte array to be dumped * @param offset its offset, whatever that might mean * @param stream the OutputStream to which the data is to be * written * @param index initial index into the byte array * * @exception IOException is thrown if anything goes wrong writing * the data to stream * @exception ArrayIndexOutOfBoundsException if the index is * outside the data array's bounds * @exception IllegalArgumentException if the output stream is * null */ public static void dumpEvent(String event, OutputStream stream) throws IOException { stream.write(event.getBytes()); stream.write(EOL.getBytes()); } }