- java.lang.Object
-
- java.io.OutputStream
-
- net.morimekta.io.SeptetPackingOutputStream
-
- All Implemented Interfaces:
Closeable
,Flushable
,AutoCloseable
public class SeptetPackingOutputStream extends OutputStream
An output stream that assumes each written byte is a septet (not an octet), and packs each septet onto each other to make it more compact.
-
-
Constructor Summary
Constructors Constructor Description SeptetPackingOutputStream(OutputStream out)
Create a septet packing output stream.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
void
flush()
void
write(int septet)
-
Methods inherited from class java.io.OutputStream
nullOutputStream, write, write
-
-
-
-
Constructor Detail
-
SeptetPackingOutputStream
public SeptetPackingOutputStream(OutputStream out)
Create a septet packing output stream.- Parameters:
out
- Output stream to write packed bytes to.
-
-
Method Detail
-
write
public void write(int septet) throws IOException
- Specified by:
write
in classOutputStream
- Throws:
IOException
-
close
public void close() throws IOException
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Overrides:
close
in classOutputStream
- Throws:
IOException
-
flush
public void flush() throws IOException
- Specified by:
flush
in interfaceFlushable
- Overrides:
flush
in classOutputStream
- Throws:
IOException
-
-