Package com.twelvemonkeys.io.enc
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 $
- Author:
- Harald Kuhr
- See Also:
-
Field Summary
Fields inherited from class java.io.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 java.io.OutputStream
nullOutputStream
-
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-arraywrite
methods will automatically flush the buffer.
-
-
Method Details
-
close
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Overrides:
close
in classFilterOutputStream
- Throws:
IOException
-
flush
- Specified by:
flush
in interfaceFlushable
- Overrides:
flush
in classFilterOutputStream
- Throws:
IOException
-
write
- Overrides:
write
in classFilterOutputStream
- Throws:
IOException
-
write
- Overrides:
write
in classFilterOutputStream
- Throws:
IOException
-
write
- Overrides:
write
in classFilterOutputStream
- Throws:
IOException
-