java.lang.Object
java.io.OutputStream
org.refcodes.codec.BaseEncoderOutputStream
- All Implemented Interfaces:
Closeable,Flushable,AutoCloseable
The
BaseEncoderOutputStream is an implementations of the
BaseEncoder interface to be used with OutputStream instances.
Make sure to call close() when done as the final padding bytes are
appended to the end!-
Constructor Summary
ConstructorsConstructorDescriptionBaseEncoderOutputStream(File aOutputFile, BaseMetrics aBaseMetrics) Constructs aBaseEncoderOutputStreamusing the givenFilefrom which to read decoded data and using theBaseMetricsto encode the data.BaseEncoderOutputStream(OutputStream aOutputStream, BaseMetrics aBaseMetrics) Constructs aBaseEncoderOutputStreamusing the givenOutputStreamfrom which to read decoded data and using theBaseMetricsto encode the data. -
Method Summary
Methods inherited from class java.io.OutputStream
nullOutputStream, write, write
-
Constructor Details
-
BaseEncoderOutputStream
public BaseEncoderOutputStream(OutputStream aOutputStream, BaseMetrics aBaseMetrics) throws IOException Constructs aBaseEncoderOutputStreamusing the givenOutputStreamfrom which to read decoded data and using theBaseMetricsto encode the data.- Parameters:
aOutputStream- TheOutputStreamfrom which to read decoded data.aBaseMetrics- TheBaseMetricsto use to encode the encoded data.- Throws:
IOException- throw in case using theOutputStreamcaused I/O related problems.
-
BaseEncoderOutputStream
Constructs aBaseEncoderOutputStreamusing the givenFilefrom which to read decoded data and using theBaseMetricsto encode the data.- Parameters:
aOutputFile- TheFilefrom which to read decoded data.aBaseMetrics- TheBaseMetricsto use to encode the encoded data.- Throws:
IOException- throw in case using theOutputStreamcaused I/O related problems.
-
-
Method Details
-
write
- Specified by:
writein classOutputStream- Throws:
IOException
-
flush
- Specified by:
flushin interfaceFlushable- Overrides:
flushin classOutputStream- Throws:
IOException
-
close
Make sure to callclose()when done as the final padding bytes are appended to the end!- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classOutputStream- Throws:
IOException
-