|
Copyright 2011-01-06 Werner Randelshofer | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.io.OutputStream
java.io.FilterOutputStream
ch.randelshofer.media.iff.MC68000OutputStream
IFFOutputStream instead of this class.
public class MC68000OutputStream
MC68000OutputStream.
| Field Summary | |
|---|---|
protected long |
written
Deprecated. The number of bytes written to the data output stream so far. |
| Fields inherited from class java.io.FilterOutputStream |
|---|
out |
| Constructor Summary | |
|---|---|
MC68000OutputStream(java.io.OutputStream out)
Deprecated. Creates a new instance. |
|
| Method Summary | |
|---|---|
void |
clearCount()
Deprecated. Sets the value of the counter written to 0. |
protected void |
incCount(int value)
Deprecated. Increases the written counter by the specified value until it reaches Long.MAX_VALUE. |
long |
size()
Deprecated. Returns the current value of the counter written,
the number of bytes written to this data output stream so far. |
void |
write(byte[] b,
int off,
int len)
Deprecated. |
void |
write(int b)
Deprecated. |
void |
writeByteRun1(byte[] data)
Deprecated. ByteRun1 Run Encoding. |
void |
writeByteRun1(byte[] data,
int offset,
int length)
Deprecated. |
void |
writeLONG(int v)
Deprecated. |
void |
writeType(java.lang.String s)
Deprecated. Writes an chunk type identifier (4 bytes). |
void |
writeUBYTE(int v)
Deprecated. |
void |
writeULONG(long v)
Deprecated. |
void |
writeUWORD(int v)
Deprecated. |
void |
writeWORD(int v)
Deprecated. |
| Methods inherited from class java.io.FilterOutputStream |
|---|
close, flush, write |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected long written
| Constructor Detail |
|---|
public MC68000OutputStream(java.io.OutputStream out)
| Method Detail |
|---|
public void writeLONG(int v)
throws java.io.IOException
java.io.IOException
public void writeULONG(long v)
throws java.io.IOException
java.io.IOException
public void writeWORD(int v)
throws java.io.IOException
java.io.IOException
public void writeUWORD(int v)
throws java.io.IOException
java.io.IOException
public void writeUBYTE(int v)
throws java.io.IOException
java.io.IOException
public void writeByteRun1(byte[] data)
throws java.io.IOException
The run encoding scheme in byteRun1 is best described by pseudo code for the decoder Unpacker (called UnPackBits in the Macintosh toolbox):
UnPacker:
LOOP until produced the desired number of bytes
Read the next source byte into n
SELECT n FROM
[ 0..127 ] => copy the next n+1 bytes literally
[-1..-127] => replicate the next byte -n+1 timees
-128 => no operation
ENDCASE
ENDLOOP
java.io.IOException
public void writeByteRun1(byte[] data,
int offset,
int length)
throws java.io.IOException
java.io.IOException
public void write(int b)
throws java.io.IOException
write in class java.io.FilterOutputStreamjava.io.IOException
public void write(byte[] b,
int off,
int len)
throws java.io.IOException
write in class java.io.FilterOutputStreamjava.io.IOException
public void writeType(java.lang.String s)
throws java.io.IOException
s - A string with a length of 4 characters.
java.io.IOExceptionpublic final long size()
written,
the number of bytes written to this data output stream so far.
If the counter overflows, it will be wrapped to Integer.MAX_VALUE.
written field.DataOutputStream.writtenpublic void clearCount()
written to 0.
protected void incCount(int value)
|
Copyright 2011-01-06 Werner Randelshofer | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||