public class JAOutputStream
extends java.lang.Object
| Constructor and Description |
|---|
JAOutputStream(java.io.File file)
Constructs this stream, based on the given file.
|
JAOutputStream(java.io.OutputStream outs)
Constructs this Java ARP output-stream, using the given stream
as its underlying stream, which is assumed not to be buffered.
|
JAOutputStream(java.io.OutputStream outs,
boolean isbuffered)
Constructs this Java ARP output-stream, using the given stream
as its underlying stream, which is assumed to be buffered or not,
as specified.
|
JAOutputStream(java.lang.String path)
Constructs this stream, based on the file with the given
path name.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Flushes and closes this stream.
|
void |
completeGZIPBlock()
Completes the current GZIP block by
|
void |
startGZIPBlock(int capacity)
startGZIPBlock with a size prefix attached. |
void |
startGZIPBlock(int capacity,
boolean doszpfx)
Switch to GZIP mode, causing subsequent output on this Java ARP
stream to have GZIP compression applied to it;
capacity is the estimated size of the compressed block
to be generated, and the flag doszpfx indicates whether
or not the compressed block is to be prefixed with an int value
giving its size in bytes when it is finally output to this
Java ARP stream's underlying stream. |
void |
write4CCString(int tag)
Writes a Four-CC value as a string (standard ARP format).
|
void |
writeBoolean(boolean b)
Writes a boolean value to this stream (as a single byte).
|
void |
writeBuf(byte[] bytes,
int pos,
int n)
Writes the given byte-sequence to this.stream.
|
void |
writeByteBuffer(java.nio.ByteBuffer bbuf)
Writes the given Java NIO byte-buffer to this.stream.
|
void |
writeFloat(float f)
Writes a floating-point value to this stream.
|
void |
writeInt(int i)
Writes an integer value (4-byte, little-endian) to this stream.
|
void |
writePNGImage(java.awt.image.BufferedImage bimg)
Writes the given PNG image to this stream.
|
void |
writeString(java.lang.String s)
Writes a string to this stream in standard ARP format,
that is, length (integer), followed by (ISO-8859-1/ASCII) bytes.
|
void |
writeUnsignedShort(short s)
Writes an integer value (4-byte, little-endian) to this stream.
|
public JAOutputStream(java.lang.String path)
throws java.io.IOException
java.io.IOExceptionpublic JAOutputStream(java.io.File file)
throws java.io.IOException
java.io.IOExceptionpublic JAOutputStream(java.io.OutputStream outs)
throws java.io.IOException
java.io.IOExceptionpublic JAOutputStream(java.io.OutputStream outs,
boolean isbuffered)
throws java.io.IOException
java.io.IOExceptionpublic void close()
throws java.io.IOException
java.io.IOExceptionpublic void writeBoolean(boolean b)
throws java.io.IOException
java.io.IOExceptionpublic void writeInt(int i)
throws java.io.IOException
java.io.IOExceptionpublic void writeUnsignedShort(short s)
throws java.io.IOException
java.io.IOExceptionpublic void writeFloat(float f)
throws java.io.IOException
java.io.IOExceptionpublic void writeString(java.lang.String s)
throws java.io.IOException
java.io.IOExceptionpublic void write4CCString(int tag)
throws java.io.IOException
java.io.IOExceptionpublic void writeBuf(byte[] bytes,
int pos,
int n)
throws java.io.IOException
java.io.IOExceptionpublic void writeByteBuffer(java.nio.ByteBuffer bbuf)
throws java.io.IOException
java.io.IOExceptionpublic void writePNGImage(java.awt.image.BufferedImage bimg)
throws java.io.IOException
java.io.IOExceptionpublic void startGZIPBlock(int capacity)
throws java.io.IOException
startGZIPBlock with a size prefix attached.java.io.IOExceptionpublic void startGZIPBlock(int capacity,
boolean doszpfx)
throws java.io.IOException
capacity is the estimated size of the compressed block
to be generated, and the flag doszpfx indicates whether
or not the compressed block is to be prefixed with an int value
giving its size in bytes when it is finally output to this
Java ARP stream's underlying stream.java.io.IOExceptionpublic void completeGZIPBlock()
throws java.io.IOException
java.io.IOException