Class EncoderStream
java.lang.Object
java.io.OutputStream
java.io.FilterOutputStream
com.twelvemonkeys.io.enc.EncoderStream
- All Implemented Interfaces:
Closeable, Flushable, AutoCloseable
An
OutputStream that provides on-the-fly encoding to an underlying stream.- Version:
- $Id: //depot/branches/personal/haraldk/twelvemonkeys/release-2/twelvemonkeys-core/src/main/java/com/twelvemonkeys/io/enc/EncoderStream.java#2 $
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final ByteBufferprivate final Encoderprivate final booleanFields inherited from class FilterOutputStream
out -
Constructor Summary
ConstructorsConstructorDescriptionEncoderStream(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. -
Method Summary
Methods inherited from class OutputStream
nullOutputStream
-
Field Details
-
encoder
-
flushOnWrite
private final boolean flushOnWrite -
buffer
-
-
Constructor Details
-
EncoderStream
Creates an output stream filter built on top of the specified underlying output stream.- Parameters:
stream- the underlying output streamencoder- the encoder to use
-
EncoderStream
Creates an output stream filter built on top of the specified underlying output stream.- Parameters:
stream- the underlying output streamencoder- the encoder to useflushOnWrite- iftrue, calls to the byte-arraywritemethods will automatically flush the buffer.
-
-
Method Details
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classFilterOutputStream- Throws:
IOException
-
flush
- Specified by:
flushin interfaceFlushable- Overrides:
flushin classFilterOutputStream- Throws:
IOException
-
encodeBuffer
- Throws:
IOException
-
write
- Overrides:
writein classFilterOutputStream- Throws:
IOException
-
write
- Overrides:
writein classFilterOutputStream- Throws:
IOException
-
write
- Overrides:
writein classFilterOutputStream- Throws:
IOException
-