Package org.apache.sshd.common.util.io
Class SecureByteArrayOutputStream
- java.lang.Object
-
- java.io.OutputStream
-
- java.io.ByteArrayOutputStream
-
- org.apache.sshd.common.util.io.SecureByteArrayOutputStream
-
- All Implemented Interfaces:
Closeable
,Flushable
,AutoCloseable
public final class SecureByteArrayOutputStream extends ByteArrayOutputStream
AByteArrayOutputStream
that clears its internal buffer after resizing and when it isclosed
.
-
-
Field Summary
-
Fields inherited from class java.io.ByteArrayOutputStream
buf, count
-
-
Constructor Summary
Constructors Constructor Description SecureByteArrayOutputStream()
SecureByteArrayOutputStream(int initialSize)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
void
write(byte[] b, int off, int len)
void
write(int b)
-
Methods inherited from class java.io.ByteArrayOutputStream
reset, size, toByteArray, toString, toString, toString, toString, writeBytes, writeTo
-
Methods inherited from class java.io.OutputStream
flush, nullOutputStream, write
-
-
-
-
Method Detail
-
close
public void close()
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Overrides:
close
in classByteArrayOutputStream
-
write
public void write(int b)
- Overrides:
write
in classByteArrayOutputStream
-
write
public void write(byte[] b, int off, int len)
- Overrides:
write
in classByteArrayOutputStream
-
-