|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.io.OutputStream
java.io.FilterOutputStream
org.dicom4j.io.BinaryOutputStream
public class BinaryOutputStream
Extends FilterOutputStream by adding the
concept of little and big endian binary value encoding. Supplies functions
for writing various sized integer and floating point words.
| Constructor Summary | |
|---|---|
BinaryOutputStream(OutputStream aStream)
|
|
BinaryOutputStream(OutputStream aStream,
ByteOrder aByteOrder)
Create a new BinaryOutputStream |
|
| Method Summary | |
|---|---|
ByteOrder |
getByteOrder()
|
void |
setByteOrder(ByteOrder aValue)
|
void |
writeASCII(String aValue)
|
void |
writeBoolean(boolean aValue)
|
void |
writeDouble(double value)
Write one floating point 64 bit value. |
void |
writeDouble(double[] f,
int len)
Write an array of floating point 64 bit values. |
void |
writeFloat(float value)
Write one floating point 32 bit value. |
void |
writeFloat(float[] f,
int len)
Write an array of floating point 32 bit values. |
void |
writeSigned16(int v)
Write one signed integer 16 bit value. |
void |
writeSigned32(long v)
Write one signed integer 32 bit value. |
void |
writeUnsigned16(int aUnsigned16)
Write an unsigned integer 16 bits long value. |
void |
writeUnsigned16(short[] w,
int len)
Write an array of unsigned integer 16 bit values. |
void |
writeUnsigned32(long v)
Write one unsigned integer 32 bit value. |
void |
writeUnsigned8(int aUnsigned8)
Write an unsigned integer 8 bits long value. |
| Methods inherited from class java.io.FilterOutputStream |
|---|
close, flush, write, write, write |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public BinaryOutputStream(OutputStream aStream)
public BinaryOutputStream(OutputStream aStream,
ByteOrder aByteOrder)
aStream - The underlying output streamaByteOrder - The byteOrder to use| Method Detail |
|---|
public ByteOrder getByteOrder()
public void setByteOrder(ByteOrder aValue)
public void writeASCII(String aValue)
throws IOException
IOException
public void writeBoolean(boolean aValue)
throws IOException
IOException
public final void writeDouble(double value)
throws IOException
Write one floating point 64 bit value.
value - a double value
IOException
public final void writeDouble(double[] f,
int len)
throws IOException
Write an array of floating point 64 bit values.
f - an array of floats to writelen - the number of values to write
IOException
public final void writeFloat(float value)
throws IOException
Write one floating point 32 bit value.
value - a float value
IOException
public final void writeFloat(float[] f,
int len)
throws IOException
Write an array of floating point 32 bit values.
f - an array of floats to writelen - the number of values to write
IOException
public final void writeSigned16(int v)
throws IOException
Write one signed integer 16 bit value.
v - an int containing an signed value
IOException
public final void writeSigned32(long v)
throws IOException
Write one signed integer 32 bit value.
v - a long containing an signed value
IOException
public final void writeUnsigned16(int aUnsigned16)
throws IOException
Write an unsigned integer 16 bits long value.
aUnsigned16 - An int containing an unsigned value (0 <= aUnsigned16 < 2^16)
IOException
public final void writeUnsigned16(short[] w,
int len)
throws IOException
Write an array of unsigned integer 16 bit values.
w - an array of integers to writelen - the number of 16 bit values to write
IOException
public final void writeUnsigned32(long v)
throws IOException
Write one unsigned integer 32 bit value.
v - a long containing an unsigned value
IOException
public final void writeUnsigned8(int aUnsigned8)
throws IOException
Write an unsigned integer 8 bits long value.
aUnsigned8 - An int containing an unsigned value (0 <= aUnsigned16 < 2^16)
IOException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||