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 void
close()
void
flush()
int
getByteCount()
java.nio.ByteOrder
getByteOrder()
protected void
setByteOrder(java.nio.ByteOrder byteOrder)
void
write(byte[] bytes)
void
write(byte[] bytes, int offset, int length)
void
write(int i)
void
write2Bytes(int value)
void
write3Bytes(int value)
void
write4Bytes(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:
write
in classjava.io.OutputStream
- Throws:
java.io.IOException
-
write
public final void write(byte[] bytes) throws java.io.IOException
- Overrides:
write
in classjava.io.OutputStream
- Throws:
java.io.IOException
-
write
public final void write(byte[] bytes, int offset, int length) throws java.io.IOException
- Overrides:
write
in classjava.io.OutputStream
- Throws:
java.io.IOException
-
flush
public void flush() throws java.io.IOException
- Specified by:
flush
in interfacejava.io.Flushable
- Overrides:
flush
in classjava.io.OutputStream
- Throws:
java.io.IOException
-
close
public void close() throws java.io.IOException
- Specified by:
close
in interfacejava.lang.AutoCloseable
- Specified by:
close
in interfacejava.io.Closeable
- Overrides:
close
in 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
-
-