Module org.refcodes.forwardsecrecy
Package edu.vt.middleware.crypt.io
Class AbstractEncodingFilterOutputStream
java.lang.Object
java.io.OutputStream
java.io.FilterOutputStream
edu.vt.middleware.crypt.io.AbstractEncodingFilterOutputStream
- All Implemented Interfaces:
Closeable
,Flushable
,AutoCloseable
- Direct Known Subclasses:
Base64FilterOutputStream
,HexFilterOutputStream
Abstract base class for filter output streams that convert raw bytes into
encoded characters.
- Version:
- $Revision: 2744 $
- Author:
- Middleware Services
-
Field Summary
Fields inherited from class java.io.FilterOutputStream
out
-
Constructor Summary
ModifierConstructorDescriptionprotected
Creates an output filter that encodes raw bytes into encoded character bytes in the wrapped output stream. -
Method Summary
Modifier and TypeMethodDescriptionvoid
write
(byte[] b) void
write
(byte[] b, int off, int len) void
write
(int b) protected abstract void
writeEncoded
(byte[] data, int offset, int length) Encode the given raw bytes and write the result to the wrapped output stream.Methods inherited from class java.io.FilterOutputStream
close, flush
Methods inherited from class java.io.OutputStream
nullOutputStream
-
Constructor Details
-
AbstractEncodingFilterOutputStream
Creates an output filter that encodes raw bytes into encoded character bytes in the wrapped output stream.- Parameters:
out
- Output stream to wrap.
-
-
Method Details
-
write
- Overrides:
write
in classFilterOutputStream
- Throws:
IOException
-
write
- Overrides:
write
in classFilterOutputStream
- Throws:
IOException
-
write
- Overrides:
write
in classFilterOutputStream
- Throws:
IOException
-
writeEncoded
Encode the given raw bytes and write the result to the wrapped output stream.- Parameters:
data
- Raw bytes to be encoded and written.offset
- Starting index of data to be written in input byte array.length
- Number of bytes to be written from input byte array.- Throws:
IOException
- On write errors.
-