public class IFFOutputStream
extends java.io.OutputStream
Reference:
Commodore-Amiga, Inc. (1991) Amiga ROM Kernel Reference Manual. Devices.
Third Edition. Reading: Addison-Wesley.
Constructor and Description |
---|
IFFOutputStream(javax.imageio.stream.ImageOutputStream out) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
void |
finish() |
long |
getStreamPosition()
Gets the position relative to the beginning of the IFF output stream.
|
void |
popChunk() |
void |
pushCompositeChunk(java.lang.String compositeType,
java.lang.String chunkType) |
void |
pushDataChunk(java.lang.String chunkType) |
void |
seek(long newPosition)
Seeks relative to the beginning of the IFF output stream.
|
void |
write(byte[] b,
int off,
int len) |
void |
write(int b) |
void |
writeByteRun1(byte[] data)
ByteRun1 Run Encoding.
|
void |
writeByteRun1(byte[] data,
int offset,
int length) |
void |
writeLONG(int v) |
void |
writeTYPE(java.lang.String s)
Writes an chunk type identifier (4 bytes).
|
void |
writeUBYTE(int v) |
void |
writeULONG(long v) |
void |
writeUWORD(int v) |
void |
writeWORD(int v) |
public IFFOutputStream(javax.imageio.stream.ImageOutputStream out) throws java.io.IOException
java.io.IOException
public void pushCompositeChunk(java.lang.String compositeType, java.lang.String chunkType) throws java.io.IOException
java.io.IOException
public void pushDataChunk(java.lang.String chunkType) throws java.io.IOException
java.io.IOException
public void popChunk() throws java.io.IOException
java.io.IOException
public void finish() throws java.io.IOException
java.io.IOException
public void close() throws java.io.IOException
close
in interface java.io.Closeable
close
in interface java.lang.AutoCloseable
close
in class java.io.OutputStream
java.io.IOException
public void write(byte[] b, int off, int len) throws java.io.IOException
write
in class java.io.OutputStream
java.io.IOException
public void write(int b) throws java.io.IOException
write
in class java.io.OutputStream
java.io.IOException
public long getStreamPosition() throws java.io.IOException
Usually this value is equal to the stream position of the underlying ImageOutputStream, but can be larger if the underlying stream already contained data.
java.io.IOException
public void seek(long newPosition) throws java.io.IOException
Usually this equal to seeking in the underlying ImageOutputStream, but can be different if the underlying stream already contained data.
java.io.IOException
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 writeTYPE(java.lang.String s) throws java.io.IOException
s
- A string with a length of 4 characters.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