add method writeTo()

This commit is contained in:
Volker Berlin 2017-03-24 22:24:56 +01:00
parent 984cfb2bc5
commit e9e7d1aecc

View File

@ -130,4 +130,16 @@ class WasmOutputStream extends FilterOutputStream {
baos.writeTo( this );
}
/**
* Write the data of this stream to the output. Work only for in memory stream.
*
* @param output
* the target
* @throws IOException
* if any I/O error occur
*/
void writeTo( OutputStream output ) throws IOException {
ByteArrayOutputStream baos = (ByteArrayOutputStream)out;
baos.writeTo( output );
}
}