javax.imageio.stream

Interface ImageOutputStream

All Superinterfaces:
DataInput, DataOutput, ImageInputStream
Known Implementing Classes:
FileCacheImageOutputStream, FileImageOutputStream, ImageOutputStreamImpl, MemoryCacheImageOutputStream

public interface ImageOutputStream
extends ImageInputStream, DataOutput

An output stream for use by ImageWriters.
Since:
1.4

Method Summary

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)
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.

Methods inherited from interface java.io.DataInput

readBoolean, readByte, readChar, readDouble, readFloat, readFully, readFully, readInt, readLine, readLong, readShort, readUTF, readUnsignedByte, readUnsignedShort, skipBytes

Methods inherited from interface java.io.DataOutput

write, write, write, writeBoolean, writeByte, writeBytes, writeChar, writeChars, writeDouble, writeFloat, writeInt, writeLong, writeShort, writeUTF

Methods inherited from interface javax.imageio.stream.ImageInputStream

close, flush, flushBefore, 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, readUTF, readUnsignedByte, readUnsignedInt, readUnsignedShort, reset, seek, setBitOffset, setByteOrder, skipBytes, skipBytes

Method Details

flushBefore

public void flushBefore(long position)
            throws IOException
Specified by:
flushBefore in interface ImageInputStream
Parameters:
position -
Throws:
IOException - if an errror occurs

write

public void write(byte[] data)
            throws IOException
Writes an array into the stream.
Specified by:
write in interface DataOutput
Parameters:
data - the data to be written
Throws:
IOException - if an errror occurs

write

public void write(byte[] data,
                  int offset,
                  int len)
            throws IOException
Writes a region of data from an array into the stream.
Specified by:
write in interface DataOutput
Parameters:
data - the data to be written
offset - the offset in the array
len - the length in the array
Throws:
IOException - if an errror occurs

write

public void write(int data)
            throws IOException
Writes an int into the stream.
Specified by:
write in interface DataOutput
Parameters:
data - the data to be written
Throws:
IOException - if an errror occurs

writeBit

public void writeBit(int bit)
            throws IOException
Writes a bit value to the stream.
Throws:
IOException - if an error occurs

writeBits

public void writeBits(long bits,
                      int numBits)
            throws IOException
Writes a number of bit values to the stream.
Throws:
IOException - if an errror occurs

writeBoolean

public void writeBoolean(boolean data)
            throws IOException
Writes a boolean value into the stream.
Specified by:
writeBoolean in interface DataOutput
Parameters:
data - the data to be written
Throws:
IOException - if an errror occurs

writeByte

public void writeByte(int data)
            throws IOException
Writes a byte value into the stream.
Specified by:
writeByte in interface DataOutput
Parameters:
data - the data to be written
Throws:
IOException - if an errror occurs

writeBytes

public void writeBytes(String data)
            throws IOException
Specified by:
writeBytes in interface DataOutput
Parameters:
data - the data to be written
Throws:
IOException - if an errror occurs

writeChar

public void writeChar(int data)
            throws IOException
Writes a character into the stream.
Specified by:
writeChar in interface DataOutput
Parameters:
data - the data to be written
Throws:
IOException - if an errror occurs

writeChars

public void writeChars(char[] data,
                       int offset,
                       int len)
            throws IOException
Writes characters to the stream.
Parameters:
data - the data to be written
offset - the offset in the array
len - the lenth in the array
Throws:
IOException - if an errror occurs

writeChars

public void writeChars(String data)
            throws IOException
Writes characters from a given String into the stream.
Specified by:
writeChars in interface DataOutput
Parameters:
data - the data to be written
Throws:
IOException - if an errror occurs

writeDouble

public void writeDouble(double data)
            throws IOException
Writes a double into the stream.
Specified by:
writeDouble in interface DataOutput
Parameters:
data - the data to be written
Throws:
IOException - if an errror occurs

writeDoubles

public void writeDoubles(double[] data,
                         int offset,
                         int len)
            throws IOException
Writes an array of double into the stream.
Parameters:
data - the data to be written
offset - the offset in the array
len - the lenth in the array
Throws:
IOException - if an errror occurs

writeFloat

public void writeFloat(float data)
            throws IOException
Writes a float into the stream.
Specified by:
writeFloat in interface DataOutput
Parameters:
data - the data to be written
Throws:
IOException - if an errror occurs

writeFloats

public void writeFloats(float[] data,
                        int offset,
                        int len)
            throws IOException
Writes an array of float into the stream.
Parameters:
data - the data to be written
offset - the offset in the array
len - the lenth in the array
Throws:
IOException - if an errror occurs

writeInt

public void writeInt(int data)
            throws IOException
Writes a int into the stream.
Specified by:
writeInt in interface DataOutput
Parameters:
data - the data to be written
Throws:
IOException - if an errror occurs

writeInts

public void writeInts(int[] data,
                      int offset,
                      int len)
            throws IOException
Writes an array of int into the stream.
Parameters:
data - the data to be written
offset - the offset in the array
len - the lenth in the array
Throws:
IOException - if an errror occurs

writeLong

public void writeLong(long data)
            throws IOException
Writes a long into the stream.
Specified by:
writeLong in interface DataOutput
Parameters:
data - the data to be written
Throws:
IOException - if an errror occurs

writeLongs

public void writeLongs(long[] data,
                       int offset,
                       int len)
            throws IOException
Writes an array of long into the stream.
Parameters:
data - the data to be written
offset - the offset in the array
len - the lenth in the array
Throws:
IOException - if an errror occurs

writeShort

public void writeShort(int data)
            throws IOException
Writes a short into the stream.
Specified by:
writeShort in interface DataOutput
Parameters:
data - the data to be written
Throws:
IOException - if an errror occurs

writeShorts

public void writeShorts(short[] data,
                        int offset,
                        int len)
            throws IOException
Writes an array of short into the stream.
Parameters:
data - the data to be written
offset - the offset in the array
len - the lenth in the array
Throws:
IOException - if an errror occurs

writeUTF

public void writeUTF(String data)
            throws IOException
Writes a String into the stream.
Specified by:
writeUTF in interface DataOutput
Parameters:
data - the data to be written
Throws:
IOException - if an errror occurs

ImageOutputStream.java Copyright (C) 2004, 2005 Free Software Foundation, Inc. This file is part of GNU Classpath. GNU Classpath is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. GNU Classpath is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with GNU Classpath; see the file COPYING. If not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. Linking this library statically or dynamically with other modules is making a combined work based on this library. Thus, the terms and conditions of the GNU General Public License cover the whole combination. As a special exception, the copyright holders of this library give you permission to link this library with independent modules to produce an executable, regardless of the license terms of these independent modules, and to copy and distribute the resulting executable under terms of your choice, provided that you also meet, for each linked independent module, the terms and conditions of the license of that module. An independent module is a module which is not derived from or based on this library. If you modify this library, you may extend this exception to your version of the library, but you are not obligated to do so. If you do not wish to do so, delete this exception statement from your version.