Class GMCipherSpi.ErasableOutputStream
java.lang.Object
java.io.OutputStream
java.io.ByteArrayOutputStream
org.bouncycastle.jcajce.provider.asymmetric.ec.GMCipherSpi.ErasableOutputStream
- All Implemented Interfaces:
Closeable, Flushable, AutoCloseable
- Enclosing class:
GMCipherSpi
A ByteArrayOutputStream whose contents can be zeroed: reset() only rewinds the count and
leaves what was written in the backing array, and a growth, left to ByteArrayOutputStream,
drops the array it replaces as it stands. The SM9 CipherSpi carries the same class.
-
Field Summary
Fields inherited from class ByteArrayOutputStream
buf, count -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class ByteArrayOutputStream
close, reset, size, toByteArray, toString, toString, toString, toString, writeBytes, writeToMethods inherited from class OutputStream
flush, nullOutputStream, write
-
Constructor Details
-
ErasableOutputStream
public ErasableOutputStream()
-
-
Method Details
-
getBuf
public byte[] getBuf() -
erase
public void erase() -
write
public void write(int b) - Overrides:
writein classByteArrayOutputStream
-
write
public void write(byte[] b, int off, int len) - Overrides:
writein classByteArrayOutputStream
-