javax.imageio.stream

Class ImageOutputStreamImpl

Implemented Interfaces:
DataInput, DataOutput, ImageInputStream, ImageOutputStream
Known Direct Subclasses:
FileCacheImageOutputStream, FileImageOutputStream, MemoryCacheImageOutputStream

public abstract class ImageOutputStreamImpl
extends ImageInputStreamImpl
implements ImageOutputStream

Field Summary

Fields inherited from class javax.imageio.stream.ImageInputStreamImpl

bitOffset, byteOrder, flushedPos, streamPos

Constructor Summary

ImageOutputStreamImpl()
The basic constructor.

Method Summary

protected void
flushBits()
void
write(byte[] data)
Writes an array into the stream.
abstract void
write(byte[] data, int offset, int len)
Writes a region of data from an array into the stream.
abstract void
write(int value)
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 value)
Writes a boolean value into the stream.
void
writeByte(int value)
Writes a byte value into the stream.
void
writeBytes(String data)
void
writeChar(int value)
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 value)
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 value)
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 value)
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 value)
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 value)
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 value)
Writes a String into the stream.

Methods inherited from class javax.imageio.stream.ImageInputStreamImpl

checkClosed, close, finalize, 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

Methods inherited from class java.lang.Object

clone, equals, extends Object> getClass, finalize, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Details

ImageOutputStreamImpl

public ImageOutputStreamImpl()
The basic constructor. Object is special, because it has no superclass, so there is no call to super().

Method Details

flushBits

protected final void flushBits()
            throws IOException

write

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

write

public abstract 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 ImageOutputStream
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 abstract void write(int value)
            throws IOException
Writes an int into the stream.
Specified by:
write in interface ImageOutputStream
write in interface DataOutput
Parameters:
Throws:
IOException - if an errror occurs

writeBit

public void writeBit(int bit)
            throws IOException
Writes a bit value to the stream.
Specified by:
writeBit in interface ImageOutputStream
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.
Specified by:
writeBits in interface ImageOutputStream
Throws:
IOException - if an errror occurs

writeBoolean

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

writeByte

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

writeBytes

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

writeChar

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

writeChars

public void writeChars(char[] data,
                       int offset,
                       int len)
            throws IOException
Writes characters to the stream.
Specified by:
writeChars in interface ImageOutputStream
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 ImageOutputStream
writeChars in interface DataOutput
Parameters:
data - the data to be written
Throws:
IOException - if an errror occurs

writeDouble

public void writeDouble(double value)
            throws IOException
Writes a double into the stream.
Specified by:
writeDouble in interface ImageOutputStream
writeDouble in interface DataOutput
Parameters:
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.
Specified by:
writeDoubles in interface ImageOutputStream
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 value)
            throws IOException
Writes a float into the stream.
Specified by:
writeFloat in interface ImageOutputStream
writeFloat in interface DataOutput
Parameters:
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.
Specified by:
writeFloats in interface ImageOutputStream
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 value)
            throws IOException
Writes a int into the stream.
Specified by:
writeInt in interface ImageOutputStream
writeInt in interface DataOutput
Parameters:
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.
Specified by:
writeInts in interface ImageOutputStream
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 value)
            throws IOException
Writes a long into the stream.
Specified by:
writeLong in interface ImageOutputStream
writeLong in interface DataOutput
Parameters:
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.
Specified by:
writeLongs in interface ImageOutputStream
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 value)
            throws IOException
Writes a short into the stream.
Specified by:
writeShort in interface ImageOutputStream
writeShort in interface DataOutput
Parameters:
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.
Specified by:
writeShorts in interface ImageOutputStream
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 value)
            throws IOException
Writes a String into the stream.
Specified by:
writeUTF in interface ImageOutputStream
writeUTF in interface DataOutput
Parameters:
Throws:
IOException - if an errror occurs

ImageOutputStream.java -- Copyright (C) 2004 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.