Top Description Fields Constructors Methods
org.apache.sshd.common.util.io.output

public final Class SecureByteArrayOutputStream

extends ByteArrayOutputStream
Class Inheritance
Imports
java.io.ByteArrayOutputStream, java.util.Arrays

A ByteArrayOutputStream that clears its internal buffer after resizing and when it is closed.

Field Summary

Inherited from java.io.ByteArrayOutputStream:
bufcount

Constructor Summary

AccessConstructor and Description
public
public
SecureByteArrayOutputStream(int initialSize)

Method Summary

Modifier and TypeMethod and Description
public void
close()

Overrides java.io.ByteArrayOutputStream.close.

Implements java.io.Closeable.close.

Closing a ByteArrayOutputStream has no effect.

public void
write(int
the byte to be written.
b
)

Overrides java.io.ByteArrayOutputStream.write.

Writes the specified byte to this ByteArrayOutputStream.

public void
write(byte[]
the data.
b
,
int
the start offset in the data.
off
,
int
the number of bytes to write.
len
)

Overrides java.io.ByteArrayOutputStream.write.

Writes len bytes from the specified byte array starting at offset off to this ByteArrayOutputStream.

Inherited from java.io.ByteArrayOutputStream:
resetsizetoByteArraytoStringtoStringtoStringtoStringwriteByteswriteTo

Constructor Detail

SecureByteArrayOutputStreamback to summary
public SecureByteArrayOutputStream()
SecureByteArrayOutputStreamback to summary
public SecureByteArrayOutputStream(int initialSize)

Method Detail

closeback to summary
public void close()

Overrides java.io.ByteArrayOutputStream.close.

Implements java.io.Closeable.close.

Doc from java.io.ByteArrayOutputStream.close.

Closing a ByteArrayOutputStream has no effect. The methods in this class can be called after the stream has been closed without generating an IOException.

Annotations
@Override
writeback to summary
public void write(int b)

Overrides java.io.ByteArrayOutputStream.write.

Doc from java.io.ByteArrayOutputStream.write.

Writes the specified byte to this ByteArrayOutputStream.

Parameters
b:int

the byte to be written.

Annotations
@Override
writeback to summary
public void write(byte[] b, int off, int len)

Overrides java.io.ByteArrayOutputStream.write.

Doc from java.io.ByteArrayOutputStream.write.

Writes len bytes from the specified byte array starting at offset off to this ByteArrayOutputStream.

Parameters
b:byte[]

the data.

off:int

the start offset in the data.

len:int

the number of bytes to write.

Annotations
@Override