Class BinaryOutputStream
- java.lang.Object
-
- java.io.OutputStream
-
- org.apache.commons.imaging.common.BinaryOutputStream
-
- All Implemented Interfaces:
Closeable,Flushable,AutoCloseable
public class BinaryOutputStream extends OutputStream
-
-
Constructor Summary
Constructors Constructor Description BinaryOutputStream(OutputStream os)BinaryOutputStream(OutputStream os, ByteOrder byteOrder)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()voidflush()intgetByteCount()ByteOrdergetByteOrder()protected voidsetByteOrder(ByteOrder byteOrder)voidwrite(byte[] bytes)voidwrite(byte[] bytes, int offset, int length)voidwrite(int i)voidwrite2Bytes(int value)voidwrite3Bytes(int value)voidwrite4Bytes(int value)-
Methods inherited from class java.io.OutputStream
nullOutputStream
-
-
-
-
Constructor Detail
-
BinaryOutputStream
public BinaryOutputStream(OutputStream os, ByteOrder byteOrder)
-
BinaryOutputStream
public BinaryOutputStream(OutputStream os)
-
-
Method Detail
-
setByteOrder
protected void setByteOrder(ByteOrder byteOrder)
-
getByteOrder
public ByteOrder getByteOrder()
-
write
public void write(int i) throws IOException- Specified by:
writein classOutputStream- Throws:
IOException
-
write
public final void write(byte[] bytes) throws IOException- Overrides:
writein classOutputStream- Throws:
IOException
-
write
public final void write(byte[] bytes, int offset, int length) throws IOException- Overrides:
writein classOutputStream- Throws:
IOException
-
flush
public void flush() throws IOException- Specified by:
flushin interfaceFlushable- Overrides:
flushin classOutputStream- Throws:
IOException
-
close
public void close() throws IOException- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classOutputStream- Throws:
IOException
-
getByteCount
public int getByteCount()
-
write4Bytes
public final void write4Bytes(int value) throws IOException- Throws:
IOException
-
write3Bytes
public final void write3Bytes(int value) throws IOException- Throws:
IOException
-
write2Bytes
public final void write2Bytes(int value) throws IOException- Throws:
IOException
-
-