Closeable
, Flushable
, AutoCloseable
Base64FilterOutputStream
, HexFilterOutputStream
public abstract class AbstractEncodingFilterOutputStream extends FilterOutputStream
out
Modifier | Constructor | Description |
---|---|---|
protected |
AbstractEncodingFilterOutputStream(OutputStream out) |
Creates an output filter that encodes raw bytes into encoded character
bytes in the wrapped output stream.
|
Modifier and Type | Method | Description |
---|---|---|
void |
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.
|
close, flush
protected AbstractEncodingFilterOutputStream(OutputStream out)
out
- Output stream to wrap.public void write(int b) throws IOException
write
in class FilterOutputStream
IOException
public void write(byte[] b) throws IOException
write
in class FilterOutputStream
IOException
public void write(byte[] b, int off, int len) throws IOException
write
in class FilterOutputStream
IOException
protected abstract void writeEncoded(byte[] data, int offset, int length) throws IOException
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.IOException
- On write errors.Copyright © 2021. All rights reserved.