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