mirror of
https://github.com/i-net-software/JWebAssembly.git
synced 2025-03-15 02:44:47 +01:00
add size() method
This commit is contained in:
parent
f9a7d13c57
commit
43cb89f546
@ -142,4 +142,14 @@ class WasmOutputStream extends FilterOutputStream {
|
||||
ByteArrayOutputStream baos = (ByteArrayOutputStream)out;
|
||||
baos.writeTo( output );
|
||||
}
|
||||
|
||||
/**
|
||||
* The count of bytes in the stream. Work only for in memory stream.
|
||||
*
|
||||
* @return the data size
|
||||
*/
|
||||
int size() {
|
||||
ByteArrayOutputStream baos = (ByteArrayOutputStream)out;
|
||||
return baos.size();
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user