Split the wasm stream for reused in generation data section stream

This commit is contained in:
Volker Berlin 2020-02-26 10:17:11 +01:00
parent 7a854ed786
commit 2ec9600d32
2 changed files with 13 additions and 13 deletions

View File

@ -264,17 +264,4 @@ class WasmOutputStream extends LittleEndianOutputStream {
writeVaruint32( size );
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 );
}
}

View File

@ -79,6 +79,19 @@ public class LittleEndianOutputStream extends FilterOutputStream {
write( value >>> 24 );
}
/**
* 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
*/
public void writeTo( OutputStream output ) throws IOException {
ByteArrayOutputStream baos = (ByteArrayOutputStream)out;
baos.writeTo( output );
}
/**
* The count of bytes in the stream.
*