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
ConstructorDescriptionBaseEncoderOutputStream
(File aOutputFile, BaseMetrics aBaseMetrics) Constructs aBaseEncoderOutputStream
using the givenFile
from which to read decoded data and using theBaseMetrics
to encode the data.BaseEncoderOutputStream
(OutputStream aOutputStream, BaseMetrics aBaseMetrics) Constructs aBaseEncoderOutputStream
using the givenOutputStream
from which to read decoded data and using theBaseMetrics
to 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 aBaseEncoderOutputStream
using the givenOutputStream
from which to read decoded data and using theBaseMetrics
to encode the data.- Parameters:
aOutputStream
- TheOutputStream
from which to read decoded data.aBaseMetrics
- TheBaseMetrics
to use to encode the encoded data.- Throws:
IOException
- throw in case using theOutputStream
caused I/O related problems.
-
BaseEncoderOutputStream
Constructs aBaseEncoderOutputStream
using the givenFile
from which to read decoded data and using theBaseMetrics
to encode the data.- Parameters:
aOutputFile
- TheFile
from which to read decoded data.aBaseMetrics
- TheBaseMetrics
to use to encode the encoded data.- Throws:
IOException
- throw in case using theOutputStream
caused I/O related problems.
-
-
Method Details
-
write
- Specified by:
write
in classOutputStream
- Throws:
IOException
-
flush
- Specified by:
flush
in interfaceFlushable
- Overrides:
flush
in classOutputStream
- Throws:
IOException
-
close
Make sure to callclose()
when done as the final padding bytes are appended to the end!- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Overrides:
close
in classOutputStream
- Throws:
IOException
-