|
DixShtix | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.io.OutputStream | +--com.dixshtix.riff.OutStream
Stack-based output for creation of RIFF file streams.
Field Summary | |
private boolean |
isLittleEndian
A marker which is true if we are writing INTEL-order binary data. |
private java.io.OutputStream |
out
The wrapped OutputStream. |
private java.util.Stack |
stack
The stack of open chunks. |
Constructor Summary | |
OutStream(java.io.OutputStream o)
Create a wrapper about an OutputStream. |
Method Summary | |
void |
close()
Close output stream. |
static byte[] |
cvt(boolean isLittleEndian,
char data)
Create a formated array of two bytes representing a Java long. |
static byte[] |
cvt(boolean isLittleEndian,
int data)
Create a formated array of four bytes representing a Java long. |
static byte[] |
cvt(boolean isLittleEndian,
long data)
Create a formated array of eight bytes representing a Java long. |
byte[] |
cvt(char data)
Format for output two bytes of binary numerical output. |
byte[] |
cvt(int data)
Format for output four bytes of binary numerical output. |
byte[] |
cvt(long data)
Format for output eight bytes of binary numerical output. |
void |
flush()
Flush output to the stream. |
boolean |
isEmpty()
Test if no more chunks are left on stack. |
IOChunk |
peek()
List chunk on top of stack. |
IOChunk |
pop()
Pop a chunk, and write content to parent chunk or the final output. |
void |
push(IOChunk chunk)
Push chunk on stack. |
void |
write(byte[] b)
Write an array of bytes. |
void |
write(byte[] b,
int off,
int len)
Write a portion of an array of bytes. |
void |
write(FourByteConstant fcc)
Write a four-byte constant as used in RIFF files. |
void |
write(int b_y_t_e)
Write a single byte. |
void |
write(java.lang.String s)
Write a UTF-encoded string. |
Methods inherited from class java.lang.Object |
|
Field Detail |
private java.io.OutputStream out
private java.util.Stack stack
private boolean isLittleEndian
Constructor Detail |
public OutStream(java.io.OutputStream o)
Method Detail |
public boolean isEmpty()
public IOChunk peek()
public IOChunk pop() throws java.io.IOException
public void push(IOChunk chunk)
isLittleEndian
flag.public void close() throws java.io.IOException
close
in class java.io.OutputStream
public void flush() throws java.io.IOException
flush
in class java.io.OutputStream
public void write(int b_y_t_e) throws java.io.IOException
write
in class java.io.OutputStream
public void write(byte[] b, int off, int len) throws java.io.IOException
write
in class java.io.OutputStream
public void write(byte[] b) throws java.io.IOException
write
in class java.io.OutputStream
public void write(java.lang.String s) throws java.io.IOException
public void write(FourByteConstant fcc) throws java.io.IOException
public static byte[] cvt(boolean isLittleEndian, char data)
public static byte[] cvt(boolean isLittleEndian, int data)
public static byte[] cvt(boolean isLittleEndian, long data)
public byte[] cvt(char data)
public byte[] cvt(int data)
public byte[] cvt(long data)
|
DixShtix | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |