public final class EncoderStream extends FilterOutputStream
OutputStream that provides on-the-fly encoding to an underlying stream.DecoderStream,
Encoderout| Constructor and Description |
|---|
EncoderStream(OutputStream stream,
Encoder encoder)
Creates an output stream filter built on top of the specified
underlying output stream.
|
EncoderStream(OutputStream stream,
Encoder encoder,
boolean flushOnWrite)
Creates an output stream filter built on top of the specified
underlying output stream.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
void |
flush() |
void |
write(byte[] bytes) |
void |
write(byte[] values,
int offset,
int length) |
void |
write(int value) |
public EncoderStream(OutputStream stream, Encoder encoder)
stream - the underlying output streamencoder - the encoder to usepublic EncoderStream(OutputStream stream, Encoder encoder, boolean flushOnWrite)
stream - the underlying output streamencoder - the encoder to useflushOnWrite - if true, calls to the byte-array
write methods will automatically flush the buffer.public void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableclose in class FilterOutputStreamIOExceptionpublic void flush()
throws IOException
flush in interface Flushableflush in class FilterOutputStreamIOExceptionpublic void write(byte[] bytes)
throws IOException
write in class FilterOutputStreamIOExceptionpublic void write(byte[] values,
int offset,
int length)
throws IOException
write in class FilterOutputStreamIOExceptionpublic void write(int value)
throws IOException
write in class FilterOutputStreamIOExceptionCopyright © 2023. All rights reserved.