javax.imageio.stream
public interface ImageOutputStream extends ImageInputStream, DataOutput
ImageWriters
.Modifier and Type | Method and Description |
---|---|
void |
flushBefore(long position) |
void |
write(byte[] data)
Writes an array into the stream.
|
void |
write(byte[] data,
int offset,
int len)
Writes a region of data from an array into the stream.
|
void |
write(int data)
Writes an
int into the stream. |
void |
writeBit(int bit)
Writes a bit value to the stream.
|
void |
writeBits(long bits,
int numBits)
Writes a number of bit values to the stream.
|
void |
writeBoolean(boolean data)
Writes a
boolean value into the stream. |
void |
writeByte(int data)
Writes a
byte value into the stream. |
void |
writeBytes(String data)
This method writes all the bytes in a
String out to the
stream. |
void |
writeChar(int data)
Writes a character into the stream.
|
void |
writeChars(char[] data,
int offset,
int len)
Writes characters to the stream.
|
void |
writeChars(String data)
Writes characters from a given
String into the stream. |
void |
writeDouble(double data)
Writes a
double into the stream. |
void |
writeDoubles(double[] data,
int offset,
int len)
Writes an array of
double into the stream. |
void |
writeFloat(float data)
Writes a
float into the stream. |
void |
writeFloats(float[] data,
int offset,
int len)
Writes an array of
float into the stream. |
void |
writeInt(int data)
Writes a
int into the stream. |
void |
writeInts(int[] data,
int offset,
int len)
Writes an array of
int into the stream. |
void |
writeLong(long data)
Writes a
long into the stream. |
void |
writeLongs(long[] data,
int offset,
int len)
Writes an array of
long into the stream. |
void |
writeShort(int data)
Writes a
short into the stream. |
void |
writeShorts(short[] data,
int offset,
int len)
Writes an array of
short into the stream. |
void |
writeUTF(String data)
Writes a
String into the stream. |
close, flush, getBitOffset, getByteOrder, getFlushedPosition, getStreamPosition, isCached, isCachedFile, isCachedMemory, length, mark, read, read, read, readBit, readBits, readBoolean, readByte, readBytes, readChar, readDouble, readFloat, readFully, readFully, readFully, readFully, readFully, readFully, readFully, readFully, readInt, readLine, readLong, readShort, readUnsignedByte, readUnsignedInt, readUnsignedShort, readUTF, reset, seek, setBitOffset, setByteOrder, skipBytes, skipBytes
void flushBefore(long position) throws IOException
flushBefore
in interface ImageInputStream
position
- IOException
- if an errror occursvoid write(byte[] data) throws IOException
write
in interface DataOutput
data
- the data to be writtenIOException
- if an errror occursvoid write(byte[] data, int offset, int len) throws IOException
write
in interface DataOutput
data
- the data to be writtenoffset
- the offset in the arraylen
- the length in the arrayIOException
- if an errror occursvoid write(int data) throws IOException
int
into the stream.write
in interface DataOutput
data
- the data to be writtenIOException
- if an errror occursvoid writeBit(int bit) throws IOException
IOException
- if an error occursvoid writeBits(long bits, int numBits) throws IOException
IOException
- if an errror occursvoid writeBoolean(boolean data) throws IOException
boolean
value into the stream.writeBoolean
in interface DataOutput
data
- the data to be writtenIOException
- if an errror occursDataInput.readBoolean()
void writeByte(int data) throws IOException
byte
value into the stream.writeByte
in interface DataOutput
data
- the data to be writtenIOException
- if an errror occursDataInput.readByte()
,
DataInput.readUnsignedByte()
void writeBytes(String data) throws IOException
DataOutput
String
out to the
stream. One byte is written for each character in the
String
.
The high eight bits of each character are discarded, thus this
method is inappropriate for completely representing Unicode characters.writeBytes
in interface DataOutput
data
- the data to be writtenIOException
- if an errror occursvoid writeChar(int data) throws IOException
writeChar
in interface DataOutput
data
- the data to be writtenIOException
- if an errror occursDataInput.readChar()
void writeChars(char[] data, int offset, int len) throws IOException
data
- the data to be writtenoffset
- the offset in the arraylen
- the lenth in the arrayIOException
- if an errror occursvoid writeChars(String data) throws IOException
String
into the stream.writeChars
in interface DataOutput
data
- the data to be writtenIOException
- if an errror occursDataOutput.writeChar(int)
void writeDouble(double data) throws IOException
double
into the stream.writeDouble
in interface DataOutput
data
- the data to be writtenIOException
- if an errror occursDataOutput.writeLong(long)
,
DataInput.readDouble()
,
Double.doubleToLongBits(double)
void writeDoubles(double[] data, int offset, int len) throws IOException
double
into the stream.data
- the data to be writtenoffset
- the offset in the arraylen
- the lenth in the arrayIOException
- if an errror occursvoid writeFloat(float data) throws IOException
float
into the stream.writeFloat
in interface DataOutput
data
- the data to be writtenIOException
- if an errror occursDataOutput.writeInt(int)
,
DataInput.readFloat()
,
Float.floatToIntBits(float)
void writeFloats(float[] data, int offset, int len) throws IOException
float
into the stream.data
- the data to be writtenoffset
- the offset in the arraylen
- the lenth in the arrayIOException
- if an errror occursvoid writeInt(int data) throws IOException
int
into the stream.writeInt
in interface DataOutput
data
- the data to be writtenIOException
- if an errror occursDataInput.readInt()
void writeInts(int[] data, int offset, int len) throws IOException
int
into the stream.data
- the data to be writtenoffset
- the offset in the arraylen
- the lenth in the arrayIOException
- if an errror occursvoid writeLong(long data) throws IOException
long
into the stream.writeLong
in interface DataOutput
data
- the data to be writtenIOException
- if an errror occursDataInput.readLong()
void writeLongs(long[] data, int offset, int len) throws IOException
long
into the stream.data
- the data to be writtenoffset
- the offset in the arraylen
- the lenth in the arrayIOException
- if an errror occursvoid writeShort(int data) throws IOException
short
into the stream.writeShort
in interface DataOutput
data
- the data to be writtenIOException
- if an errror occursDataInput.readShort()
,
DataInput.readUnsignedShort()
void writeShorts(short[] data, int offset, int len) throws IOException
short
into the stream.data
- the data to be writtenoffset
- the offset in the arraylen
- the lenth in the arrayIOException
- if an errror occursvoid writeUTF(String data) throws IOException
String
into the stream.writeUTF
in interface DataOutput
data
- the data to be writtenIOException
- if an errror occursDataInput.readUTF()