Index: javax/imageio/IIOImage.java
===================================================================
RCS file: javax/imageio/IIOImage.java
diff -N javax/imageio/IIOImage.java
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ javax/imageio/IIOImage.java 4 Oct 2004 08:14:45 -0000
@@ -0,0 +1,138 @@
+/* IIOImage.java --
+ Copyright (C) 2003 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., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 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. */
+
+
+package javax.imageio;
+
+import java.awt.image.BufferedImage;
+import java.awt.image.Raster;
+import java.awt.image.RenderedImage;
+import java.util.List;
+
+import javax.imageio.metadata.IIOMetadata;
+
+public class IIOImage
+{
+ protected RenderedImage image;
+ protected IIOMetadata metadata;
+ protected Raster raster;
+ protected List thumbnails;
+
+ public IIOImage (Raster raster, List thumbnails, IIOMetadata metadata)
+ {
+ if (raster == null)
+ throw new IllegalArgumentException ("raster may not be null");
+
+ this.raster = raster;
+ this.thumbnails = thumbnails;
+ this.metadata = metadata;
+ }
+
+ public IIOImage (RenderedImage image, List thumbnails, IIOMetadata metadata)
+ {
+ if (image == null)
+ throw new IllegalArgumentException ("image may not be null");
+
+ this.image = image;
+ this.thumbnails = thumbnails;
+ this.metadata = metadata;
+ }
+
+ public IIOMetadata getMetadata()
+ {
+ return metadata;
+ }
+
+ public int getNumThumbnails()
+ {
+ return thumbnails.size();
+ }
+
+ public Raster getRaster()
+ {
+ return raster;
+ }
+
+ public RenderedImage getRenderedImage()
+ {
+ return image;
+ }
+
+ public BufferedImage getThumbnail (int index)
+ {
+ return (BufferedImage) thumbnails.get (index);
+ }
+
+ public List getThumbnails()
+ {
+ return thumbnails;
+ }
+
+ public boolean hasRaster()
+ {
+ return raster != null;
+ }
+
+ public void setMetadata (IIOMetadata metadata)
+ {
+ this.metadata = metadata;
+ }
+
+ public void setRaster (Raster raster)
+ {
+ if (raster == null)
+ throw new IllegalArgumentException ("raster may not be null");
+
+ this.image = null;
+ this.raster = raster;
+ }
+
+ public void setRenderedImage (RenderedImage image)
+ {
+ if (image == null)
+ throw new IllegalArgumentException ("image may not be null");
+
+ this.image = image;
+ this.raster = null;
+ }
+
+ public void setThumbnails (List thumbnails)
+ {
+ this.thumbnails = thumbnails;
+ }
+
+} // class IIOParam
Index: javax/imageio/ImageReadParam.java
===================================================================
RCS file: javax/imageio/ImageReadParam.java
diff -N javax/imageio/ImageReadParam.java
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ javax/imageio/ImageReadParam.java 4 Oct 2004 08:14:45 -0000
@@ -0,0 +1,46 @@
+/* ImageReadParam.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., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 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. */
+
+
+package javax.imageio;
+
+/**
+ * @author Michel Koch (address@hidden)
+ */
+public class ImageReadParam extends IIOParam
+{
+}
Index: javax/imageio/metadata/IIOMetadataController.java
===================================================================
RCS file: javax/imageio/metadata/IIOMetadataController.java
diff -N javax/imageio/metadata/IIOMetadataController.java
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ javax/imageio/metadata/IIOMetadataController.java 4 Oct 2004 08:14:45 -0000
@@ -0,0 +1,47 @@
+/* IIOMetadataController.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., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 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. */
+
+
+package javax.imageio.metadata;
+
+/**
+ * @author Michael Koch (address@hidden)
+ */
+public interface IIOMetadataController
+{
+ boolean activate(IIOMetadata metadata);
+}
Index: javax/imageio/metadata/IIOMetadataFormat.java
===================================================================
RCS file: javax/imageio/metadata/IIOMetadataFormat.java
diff -N javax/imageio/metadata/IIOMetadataFormat.java
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ javax/imageio/metadata/IIOMetadataFormat.java 4 Oct 2004 08:14:45 -0000
@@ -0,0 +1,68 @@
+/* IIOMetadataFormat.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., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 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. */
+
+
+package javax.imageio.metadata;
+
+/**
+ * @author Michael Koch (address@hidden)
+ */
+public interface IIOMetadataFormat
+{
+ int CHILD_POLICY_ALL = 1;
+ int CHILD_POLICY_CHOICE = 3;
+ int CHILD_POLICY_EMPTY = 0;
+ int CHILD_POLICY_MAX = 5;
+ int CHILD_POLICY_REPEAT = 5;
+ int CHILD_POLICY_SEQUENCE = 4;
+ int CHILD_POLICY_SOME = 2;
+ int DATATYPE_BOOLEAN = 1;
+ int DATATYPE_DOUBLE = 4;
+ int DATATYPE_FLOAT = 3;
+ int DATATYPE_INTEGER = 2;
+ int DATATYPE_STRING = 0;
+ int VALUE_ARBITRARY = 1;
+ int VALUE_ENUMERATION = 16;
+ int VALUE_LIST = 32;
+ int VALUE_NONE = 0;
+ int VALUE_RANGE = 2;
+ int VALUE_RANGE_MAX_INCLUSIVE = 10;
+ int VALUE_RANGE_MAX_INCLUSIVE_MASK = 8;
+ int VALUE_RANGE_MIN_INCLUSIVE = 6;
+ int VALUE_RANGE_MIN_INCLUSIVE_MASK = 4;
+ int VALUE_RANGE_MIN_MAX_INCLUSIVE = 14;
+}
Index: javax/imageio/stream/ImageOutputStream.java
===================================================================
RCS file: /cvsroot/classpath/classpath/javax/imageio/stream/ImageOutputStream.java,v
retrieving revision 1.1
diff -u -r1.1 ImageOutputStream.java
--- javax/imageio/stream/ImageOutputStream.java 13 Apr 2004 13:54:14 -0000 1.1
+++ javax/imageio/stream/ImageOutputStream.java 4 Oct 2004 08:14:45 -0000
@@ -39,6 +39,7 @@
package javax.imageio.stream;
import java.io.DataOutput;
+import java.io.IOException;
/**
@@ -52,7 +53,217 @@
public interface ImageOutputStream
extends ImageInputStream, DataOutput
{
- // FIXME: Incomplete. This interface is merely present in order to
- // allow compilation of the javax.imageio.spi package, for which GNU
- // Classpath does provide an implementation.
+ /**
+ * @param postion
+ *
+ * @throws IOException if an errror occurs
+ */
+ void flushBefore(long position) throws IOException;
+
+ /**
+ * Writes an array into the stream.
+ *
+ * @param data the data to be written
+ *
+ * @throws IOException if an errror occurs
+ */
+ void write(byte[] data) throws IOException;
+
+ /**
+ * Writes a region of data from an array into the stream.
+ *
+ * @param data the data to be written
+ * @param offset the offset in the array
+ * @param len the length in the array
+ *
+ * @throws IOException if an errror occurs
+ */
+ void write(byte[] data, int offset, int len) throws IOException;
+
+ /**
+ * Writes an int
into the stream.
+ *
+ * @param data the data to be written
+ *
+ * @throws IOException if an errror occurs
+ */
+ void write(int data) throws IOException;
+
+ /**
+ * Writes a bit value to the stream.
+ *
+ * @throws IOException if an error occurs
+ */
+ void writeBit(int bit) throws IOException;
+
+ /**
+ * Writes a number of bit values to the stream.
+ *
+ * @throws IOException if an errror occurs
+ */
+ void writeBits(long bits, int numBits) throws IOException;
+
+ /**
+ * Writes a boolean
value into the stream.
+ *
+ * @param data the data to be written
+ *
+ * @throws IOException if an errror occurs
+ */
+ void writeBoolean(boolean data) throws IOException;
+
+ /**
+ * Writes a byte
value into the stream.
+ *
+ * @param data the data to be written
+ *
+ * @throws IOException if an errror occurs
+ */
+ void writeByte(int data) throws IOException;
+
+ /**
+ * @param data the data to be written
+ *
+ * @throws IOException if an errror occurs
+ */
+ void writeBytes(String data) throws IOException;
+
+ /**
+ * Writes a character into the stream.
+ *
+ * @param data the data to be written
+ *
+ * @throws IOException if an errror occurs
+ */
+ void writeChar(int data) throws IOException;
+
+ /**
+ * Writes characters to the stream.
+ *
+ * @param data the data to be written
+ * @param offset the offset in the array
+ * @param len the lenth in the array
+ *
+ * @throws IOException if an errror occurs
+ */
+ void writeChars(char[] data, int offset, int len) throws IOException;
+
+ /**
+ * Writes characters from a given String
into the stream.
+ *
+ * @param data the data to be written
+ *
+ * @throws IOException if an errror occurs
+ */
+ void writeChars(String data) throws IOException;
+
+ /**
+ * Writes a double
into the stream.
+ *
+ * @param data the data to be written
+ *
+ * @throws IOException if an errror occurs
+ */
+ void writeDouble(double data) throws IOException;
+
+ /**
+ * Writes an array of double
into the stream.
+ *
+ * @param data the data to be written
+ * @param offset the offset in the array
+ * @param len the lenth in the array
+ *
+ * @throws IOException if an errror occurs
+ */
+ void writeDoubles(double[] data, int offset, int len)
+ throws IOException;
+
+ /**
+ * Writes a float
into the stream.
+ *
+ * @param data the data to be written
+ *
+ * @throws IOException if an errror occurs
+ */
+ void writeFloat(float data) throws IOException;
+
+ /**
+ * Writes an array of float
into the stream.
+ *
+ * @param data the data to be written
+ * @param offset the offset in the array
+ * @param len the lenth in the array
+ *
+ * @throws IOException if an errror occurs
+ */
+ void writeFloats(float[] data, int offset, int len) throws IOException;
+
+ /**
+ * Writes a int
into the stream.
+ *
+ * @param data the data to be written
+ *
+ * @throws IOException if an errror occurs
+ */
+ void writeInt(int data) throws IOException;
+
+ /**
+ * Writes an array of int
into the stream.
+ *
+ * @param data the data to be written
+ * @param offset the offset in the array
+ * @param len the lenth in the array
+ *
+ * @throws IOException if an errror occurs
+ */
+ void writeInts(int[] data, int offset, int len) throws IOException;
+
+ /**
+ * Writes a long
into the stream.
+ *
+ * @param data the data to be written
+ *
+ * @throws IOException if an errror occurs
+ */
+ void writeLong(long data) throws IOException;
+
+ /**
+ * Writes an array of long
into the stream.
+ *
+ * @param data the data to be written
+ * @param offset the offset in the array
+ * @param len the lenth in the array
+ *
+ * @throws IOException if an errror occurs
+ */
+ void writeLongs(long[] data, int offset, int len) throws IOException;
+
+ /**
+ * Writes a short
into the stream.
+ *
+ * @param data the data to be written
+ *
+ * @throws IOException if an errror occurs
+ */
+ void writeShort(int data) throws IOException;
+
+ /**
+ * Writes an array of short
into the stream.
+ *
+ * @param data the data to be written
+ * @param offset the offset in the array
+ * @param len the lenth in the array
+ *
+ * @throws IOException if an errror occurs
+ */
+ void writeShorts(short[] data, int offset, int len) throws IOException;
+
+ /**
+ * Writes a String
into the stream.
+ *
+ * @param data the data to be written
+ *
+ * @throws IOException if an errror occurs
+ */
+ void writeUTF(String data) throws IOException;
}