Package org.bouncycastle.crypto
Class UpdateOutputStream
java.lang.Object
java.io.OutputStream
org.bouncycastle.crypto.UpdateOutputStream
- All Implemented Interfaces:
Closeable,Flushable,AutoCloseable
- Direct Known Subclasses:
CipherOutputStream
An extension of output stream that provides update methods which allow
for data to feed into the stream without the need to handle checked exceptions.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal voidfinished()Finalise the stream signaling no more data to be sent.final voidupdate(byte b) Update the stream with the passed in byte.final voidupdate(byte[] buffer) Update the stream with the passed in buffer.final voidupdate(byte[] buffer, int off, int len) Update the stream with a section of the passed in buffer.Methods inherited from class java.io.OutputStream
close, flush, nullOutputStream, write, write, write
-
Constructor Details
-
UpdateOutputStream
public UpdateOutputStream()
-
-
Method Details
-
update
public final void update(byte b) Update the stream with the passed in byte.- Parameters:
b- the data to be written to the stream.
-
update
public final void update(byte[] buffer) Update the stream with the passed in buffer.- Parameters:
buffer- the data to be written to the stream.
-
update
public final void update(byte[] buffer, int off, int len) Update the stream with a section of the passed in buffer.- Parameters:
buffer- the buffer holding the data to be written.off- the offset into buffer at which the data starts.len- the length of the data to be written.
-
finished
public final void finished()Finalise the stream signaling no more data to be sent.
-