harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hinde...@apache.org
Subject svn commit: r926835 [1/2] - in /harmony/enhanced/trunk/classlib/modules/imageio/src/main/java: javax/imageio/ javax/imageio/metadata/ javax/imageio/plugins/jpeg/ javax/imageio/spi/ javax/imageio/stream/ org/apache/harmony/x/imageio/internal/nls/ org/ap...
Date Tue, 23 Mar 2010 22:55:43 GMT
Author: hindessm
Date: Tue Mar 23 22:55:42 2010
New Revision: 926835

URL: http://svn.apache.org/viewvc?rev=926835&view=rev
Log:
NLS fixes to address "[#HARMONY-3200] [classlib][internationalization]
Internationalization of the imageIO module".

Modified:
    harmony/enhanced/trunk/classlib/modules/imageio/src/main/java/javax/imageio/IIOImage.java
    harmony/enhanced/trunk/classlib/modules/imageio/src/main/java/javax/imageio/IIOParam.java
    harmony/enhanced/trunk/classlib/modules/imageio/src/main/java/javax/imageio/ImageIO.java
    harmony/enhanced/trunk/classlib/modules/imageio/src/main/java/javax/imageio/ImageReadParam.java
    harmony/enhanced/trunk/classlib/modules/imageio/src/main/java/javax/imageio/ImageTypeSpecifier.java
    harmony/enhanced/trunk/classlib/modules/imageio/src/main/java/javax/imageio/ImageWriteParam.java
    harmony/enhanced/trunk/classlib/modules/imageio/src/main/java/javax/imageio/ImageWriter.java
    harmony/enhanced/trunk/classlib/modules/imageio/src/main/java/javax/imageio/metadata/IIOMetadata.java
    harmony/enhanced/trunk/classlib/modules/imageio/src/main/java/javax/imageio/metadata/IIOMetadataFormatImpl.java
    harmony/enhanced/trunk/classlib/modules/imageio/src/main/java/javax/imageio/metadata/IIOMetadataNode.java
    harmony/enhanced/trunk/classlib/modules/imageio/src/main/java/javax/imageio/plugins/jpeg/JPEGHuffmanTable.java
    harmony/enhanced/trunk/classlib/modules/imageio/src/main/java/javax/imageio/plugins/jpeg/JPEGImageReadParam.java
    harmony/enhanced/trunk/classlib/modules/imageio/src/main/java/javax/imageio/plugins/jpeg/JPEGImageWriteParam.java
    harmony/enhanced/trunk/classlib/modules/imageio/src/main/java/javax/imageio/plugins/jpeg/JPEGQTable.java
    harmony/enhanced/trunk/classlib/modules/imageio/src/main/java/javax/imageio/spi/IIOServiceProvider.java
    harmony/enhanced/trunk/classlib/modules/imageio/src/main/java/javax/imageio/spi/ImageReaderSpi.java
    harmony/enhanced/trunk/classlib/modules/imageio/src/main/java/javax/imageio/spi/ImageReaderWriterSpi.java
    harmony/enhanced/trunk/classlib/modules/imageio/src/main/java/javax/imageio/spi/ImageWriterSpi.java
    harmony/enhanced/trunk/classlib/modules/imageio/src/main/java/javax/imageio/spi/ServiceRegistry.java
    harmony/enhanced/trunk/classlib/modules/imageio/src/main/java/javax/imageio/stream/FileCacheImageInputStream.java
    harmony/enhanced/trunk/classlib/modules/imageio/src/main/java/javax/imageio/stream/FileCacheImageOutputStream.java
    harmony/enhanced/trunk/classlib/modules/imageio/src/main/java/javax/imageio/stream/FileImageInputStream.java
    harmony/enhanced/trunk/classlib/modules/imageio/src/main/java/javax/imageio/stream/FileImageOutputStream.java
    harmony/enhanced/trunk/classlib/modules/imageio/src/main/java/javax/imageio/stream/ImageInputStreamImpl.java
    harmony/enhanced/trunk/classlib/modules/imageio/src/main/java/javax/imageio/stream/MemoryCacheImageInputStream.java
    harmony/enhanced/trunk/classlib/modules/imageio/src/main/java/javax/imageio/stream/MemoryCacheImageOutputStream.java
    harmony/enhanced/trunk/classlib/modules/imageio/src/main/java/org/apache/harmony/x/imageio/internal/nls/messages.properties
    harmony/enhanced/trunk/classlib/modules/imageio/src/main/java/org/apache/harmony/x/imageio/metadata/IIOMetadataUtils.java
    harmony/enhanced/trunk/classlib/modules/imageio/src/main/java/org/apache/harmony/x/imageio/plugins/jpeg/JPEGImageWriter.java
    harmony/enhanced/trunk/classlib/modules/imageio/src/main/java/org/apache/harmony/x/imageio/plugins/png/PNGImageWriter.java
    harmony/enhanced/trunk/classlib/modules/imageio/src/main/java/org/apache/harmony/x/imageio/spi/FileIISSpi.java
    harmony/enhanced/trunk/classlib/modules/imageio/src/main/java/org/apache/harmony/x/imageio/spi/FileIOSSpi.java
    harmony/enhanced/trunk/classlib/modules/imageio/src/main/java/org/apache/harmony/x/imageio/spi/InputStreamIISSpi.java
    harmony/enhanced/trunk/classlib/modules/imageio/src/main/java/org/apache/harmony/x/imageio/spi/OutputStreamIOSSpi.java
    harmony/enhanced/trunk/classlib/modules/imageio/src/main/java/org/apache/harmony/x/imageio/spi/RAFIISSpi.java
    harmony/enhanced/trunk/classlib/modules/imageio/src/main/java/org/apache/harmony/x/imageio/spi/RAFIOSSpi.java
    harmony/enhanced/trunk/classlib/modules/imageio/src/main/java/org/apache/harmony/x/imageio/stream/RandomAccessMemoryCache.java

Modified: harmony/enhanced/trunk/classlib/modules/imageio/src/main/java/javax/imageio/IIOImage.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/trunk/classlib/modules/imageio/src/main/java/javax/imageio/IIOImage.java?rev=926835&r1=926834&r2=926835&view=diff
==============================================================================
--- harmony/enhanced/trunk/classlib/modules/imageio/src/main/java/javax/imageio/IIOImage.java (original)
+++ harmony/enhanced/trunk/classlib/modules/imageio/src/main/java/javax/imageio/IIOImage.java Tue Mar 23 22:55:42 2010
@@ -24,6 +24,7 @@ import java.awt.image.RenderedImage;
 import java.awt.image.Raster;
 import java.awt.image.BufferedImage;
 import java.util.List;
+import org.apache.harmony.x.imageio.internal.nls.Messages;
 
 public class IIOImage {
 
@@ -34,7 +35,7 @@ public class IIOImage {
 
     public IIOImage(RenderedImage image, List<? extends BufferedImage> thumbnails, IIOMetadata metadata) {
         if (image == null) {
-            throw new IllegalArgumentException("image should not be NULL");
+            throw new IllegalArgumentException(Messages.getString("imageio.27"));
         }
         this.raster = null;
         this.image = image;
@@ -44,7 +45,7 @@ public class IIOImage {
 
     public IIOImage(Raster raster, List<? extends BufferedImage> thumbnails, IIOMetadata metadata) {
         if (raster == null) {
-            throw new IllegalArgumentException("raster should not be NULL");
+            throw new IllegalArgumentException(Messages.getString("imageio.5F"));
         }
         this.image = null;
         this.raster = raster;
@@ -58,7 +59,7 @@ public class IIOImage {
 
     public void setRenderedImage(RenderedImage image) {
         if (image == null) {
-            throw new IllegalArgumentException("image should not be NULL");
+            throw new IllegalArgumentException(Messages.getString("imageio.27"));
         }
         raster = null;
         this.image = image;
@@ -74,7 +75,7 @@ public class IIOImage {
 
     public void setRaster(Raster raster) {
         if (raster == null) {
-            throw new IllegalArgumentException("raster should not be NULL");
+            throw new IllegalArgumentException(Messages.getString("imageio.5F"));
         }
         image = null;
         this.raster = raster;
@@ -88,7 +89,7 @@ public class IIOImage {
         if (thumbnails != null) {
             return thumbnails.get(index);
         }
-        throw new IndexOutOfBoundsException("no thumbnails were set");
+        throw new IndexOutOfBoundsException(Messages.getString("imageio.60"));
     }
 
     public List<? extends BufferedImage> getThumbnails() {

Modified: harmony/enhanced/trunk/classlib/modules/imageio/src/main/java/javax/imageio/IIOParam.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/trunk/classlib/modules/imageio/src/main/java/javax/imageio/IIOParam.java?rev=926835&r1=926834&r2=926835&view=diff
==============================================================================
--- harmony/enhanced/trunk/classlib/modules/imageio/src/main/java/javax/imageio/IIOParam.java (original)
+++ harmony/enhanced/trunk/classlib/modules/imageio/src/main/java/javax/imageio/IIOParam.java Tue Mar 23 22:55:42 2010
@@ -20,6 +20,7 @@
 package javax.imageio;
 
 import java.awt.*;
+import org.apache.harmony.x.imageio.internal.nls.Messages;
 
 public abstract class IIOParam {
     protected Rectangle sourceRegion;
@@ -38,24 +39,24 @@ public abstract class IIOParam {
     public void setSourceRegion(Rectangle sourceRegion) {
         if (sourceRegion != null) {
             if (sourceRegion.x < 0) {
-                throw new IllegalArgumentException("x < 0");
+                throw new IllegalArgumentException(Messages.getString("imageio.15"));
             }
             if (sourceRegion.y < 0) {
-                throw new IllegalArgumentException("y < 0");
+                throw new IllegalArgumentException(Messages.getString("imageio.16"));
             }
             if (sourceRegion.width <= 0) {
-                throw new IllegalArgumentException("width <= 0");
+                throw new IllegalArgumentException(Messages.getString("imageio.17"));
             }
             if (sourceRegion.height <= 0) {
-                throw new IllegalArgumentException("height <= 0");
+                throw new IllegalArgumentException(Messages.getString("imageio.18"));
             }
 
             if (sourceRegion.width <= subsamplingXOffset) {
-                throw new IllegalArgumentException("width <= subsamplingXOffset");
+                throw new IllegalArgumentException(Messages.getString("imageio.19"));
             }
 
             if (sourceRegion.height <= subsamplingYOffset) {
-                throw new IllegalArgumentException("height <= subsamplingXOffset");
+                throw new IllegalArgumentException(Messages.getString("imageio.1A"));
             }
             //-- clone it to avoid unexpected modifications
             this.sourceRegion = (Rectangle) sourceRegion.clone();
@@ -78,25 +79,25 @@ public abstract class IIOParam {
                                  int subsamplingYOffset) {
 
         if (sourceXSubsampling <= 0) {
-            throw new IllegalArgumentException("sourceXSubsampling <= 0");
+            throw new IllegalArgumentException(Messages.getString("imageio.1B"));
         }
         if (sourceYSubsampling <= 0) {
-            throw new IllegalArgumentException("sourceYSubsampling <= 0");
+            throw new IllegalArgumentException(Messages.getString("imageio.1C"));
         }
 
         if ((subsamplingXOffset < 0) || (subsamplingXOffset >= sourceXSubsampling)) {
-            throw new IllegalArgumentException("subsamplingXOffset is wrong");
+            throw new IllegalArgumentException(Messages.getString("imageio.1D"));
         }
 
         if ((subsamplingYOffset < 0) || (subsamplingYOffset >= sourceYSubsampling)) {
-            throw new IllegalArgumentException("subsamplingYOffset is wrong");
+            throw new IllegalArgumentException(Messages.getString("imageio.1E"));
         }
 
         //-- does region contain pixels
         if (sourceRegion != null) {
             if (sourceRegion.width <= subsamplingXOffset ||
                     sourceRegion.height <= subsamplingYOffset) {
-                throw new IllegalArgumentException("there are no pixels in region");
+                throw new IllegalArgumentException(Messages.getString("imageio.1F"));
             }
         }
 
@@ -128,12 +129,12 @@ public abstract class IIOParam {
         } else {
             for (int i = 0; i < sourceBands.length; i++) {
                 if (sourceBands[i] < 0) {
-                    throw new IllegalArgumentException("negative value");
+                    throw new IllegalArgumentException(Messages.getString("imageio.20"));
                 }
                 
                 for (int j = i + 1; j < sourceBands.length; j++) {
                     if (sourceBands[i] == sourceBands[j]) {
-                        throw new IllegalArgumentException("duplicate value");
+                        throw new IllegalArgumentException(Messages.getString("imageio.21"));
                     }
                 }
             }
@@ -156,7 +157,7 @@ public abstract class IIOParam {
 
     public void setDestinationOffset(Point destinationOffset) {
         if (destinationOffset == null) {
-            throw new IllegalArgumentException("destinationOffset == null!");
+            throw new IllegalArgumentException(Messages.getString("imageio.22"));
         }
         
         this.destinationOffset = (Point) destinationOffset.clone();
@@ -186,7 +187,7 @@ public abstract class IIOParam {
         final IIOParamController controller = getController();
         
         if (controller == null) {
-            throw new IllegalStateException("controller wasn't set");
+            throw new IllegalStateException(Messages.getString("imageio.23"));
         }
         
         return controller.activate(this);

Modified: harmony/enhanced/trunk/classlib/modules/imageio/src/main/java/javax/imageio/ImageIO.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/trunk/classlib/modules/imageio/src/main/java/javax/imageio/ImageIO.java?rev=926835&r1=926834&r2=926835&view=diff
==============================================================================
--- harmony/enhanced/trunk/classlib/modules/imageio/src/main/java/javax/imageio/ImageIO.java (original)
+++ harmony/enhanced/trunk/classlib/modules/imageio/src/main/java/javax/imageio/ImageIO.java Tue Mar 23 22:55:42 2010
@@ -32,6 +32,7 @@ import java.util.Arrays;
 import java.awt.image.BufferedImage;
 import java.awt.image.RenderedImage;
 import java.net.URL;
+import org.apache.harmony.x.imageio.internal.nls.Messages;
 
 public final class ImageIO {
 
@@ -69,7 +70,7 @@ public final class ImageIO {
             throws IOException {
 
         if (input == null) {
-            throw new IllegalArgumentException("input source cannot be NULL");
+            throw new IllegalArgumentException(Messages.getString("imageio.4C"));
         }
 
         Iterator<ImageInputStreamSpi> it = registry.getServiceProviders(ImageInputStreamSpi.class, true);
@@ -86,7 +87,7 @@ public final class ImageIO {
     public static ImageOutputStream createImageOutputStream(Object output)
             throws IOException {
         if (output == null) {
-            throw new IllegalArgumentException("output destination cannot be NULL");
+            throw new IllegalArgumentException(Messages.getString("imageio.4D"));
         }
 
         Iterator<ImageOutputStreamSpi> it = registry.getServiceProviders(ImageOutputStreamSpi.class, true);
@@ -113,7 +114,7 @@ public final class ImageIO {
 
     public static Iterator<ImageReader> getImageReaders(Object input) {
         if (input == null) {
-            throw new NullPointerException("input cannot be NULL");
+            throw new NullPointerException(Messages.getString("imageio.4E"));
         }
 
         Iterator<ImageReaderSpi> it = registry.getServiceProviders(ImageReaderSpi.class,
@@ -124,7 +125,7 @@ public final class ImageIO {
 
     public static Iterator<ImageReader> getImageReadersByFormatName(String formatName) {
         if (formatName == null) {
-            throw new NullPointerException("format name cannot be NULL");
+            throw new NullPointerException(Messages.getString("imageio.4F"));
         }
 
         Iterator<ImageReaderSpi> it = registry.getServiceProviders(ImageReaderSpi.class,
@@ -135,7 +136,7 @@ public final class ImageIO {
 
     public static Iterator<ImageReader> getImageReadersBySuffix(String fileSuffix) {
         if (fileSuffix == null) {
-            throw new NullPointerException("suffix cannot be NULL");
+            throw new NullPointerException(Messages.getString("imageio.50"));
         }
         Iterator<ImageReaderSpi> it = registry.getServiceProviders(ImageReaderSpi.class,
                 new SuffixFilter(fileSuffix), true);
@@ -162,7 +163,7 @@ public final class ImageIO {
 
     public static Iterator<ImageWriter> getImageWritersByFormatName(String formatName) {
         if (formatName == null) {
-            throw new NullPointerException("format name cannot be NULL");
+            throw new NullPointerException(Messages.getString("imageio.4F"));
         }
 
         Iterator<ImageWriterSpi> it = registry.getServiceProviders(ImageWriterSpi.class,
@@ -173,7 +174,7 @@ public final class ImageIO {
 
     public static Iterator<ImageWriter> getImageWritersBySuffix(String fileSuffix) {
         if (fileSuffix == null) {
-            throw new NullPointerException("suffix cannot be NULL");
+            throw new NullPointerException(Messages.getString("imageio.50"));
         }
         Iterator<ImageWriterSpi> it = registry.getServiceProviders(ImageWriterSpi.class,
                 new SuffixFilter(fileSuffix), true);
@@ -200,11 +201,11 @@ public final class ImageIO {
     public static Iterator<ImageWriter> getImageWriters(ImageTypeSpecifier type,
                                            String formatName) {
         if (type == null) {
-            throw new NullPointerException("type cannot be NULL");
+            throw new NullPointerException(Messages.getString("imageio.51"));
         }
 
         if (formatName == null) {
-            throw new NullPointerException("format name cannot be NULL");
+            throw new NullPointerException(Messages.getString("imageio.4F"));
         }
 
         Iterator<ImageWriterSpi> it = registry.getServiceProviders(ImageWriterSpi.class,
@@ -221,7 +222,7 @@ public final class ImageIO {
 
     public static BufferedImage read(File input) throws IOException {
         if (input == null) {
-            throw new IllegalArgumentException("input == null!");
+            throw new IllegalArgumentException(Messages.getString("imageio.52"));
         }
 
         ImageInputStream stream = createImageInputStream(input);
@@ -230,7 +231,7 @@ public final class ImageIO {
 
     public static BufferedImage read(InputStream input) throws IOException {
         if (input == null) {
-            throw new IllegalArgumentException("input == null!");
+            throw new IllegalArgumentException(Messages.getString("imageio.52"));
         }
 
         ImageInputStream stream = createImageInputStream(input);
@@ -239,7 +240,7 @@ public final class ImageIO {
 
     public static BufferedImage read(URL input) throws IOException {
         if (input == null) {
-            throw new IllegalArgumentException("input == null!");
+            throw new IllegalArgumentException(Messages.getString("imageio.52"));
         }
 
         InputStream stream = input.openStream();
@@ -251,7 +252,7 @@ public final class ImageIO {
 
     public static BufferedImage read(ImageInputStream stream) throws IOException {
         if (stream == null) {
-            throw new IllegalArgumentException("stream == null!");
+            throw new IllegalArgumentException(Messages.getString("imageio.0A"));
         }
 
         Iterator<ImageReader> imageReaders = getImageReaders(stream);
@@ -279,13 +280,13 @@ public final class ImageIO {
             throws IOException {
 
         if (im == null) {
-            throw new IllegalArgumentException("image cannot be NULL");
+            throw new IllegalArgumentException(Messages.getString("imageio.53"));
         }
         if (formatName == null) {
-            throw new IllegalArgumentException("format name cannot be NULL");
+            throw new IllegalArgumentException(Messages.getString("imageio.4F"));
         }
         if (output == null) {
-            throw new IllegalArgumentException("output cannot be NULL");
+            throw new IllegalArgumentException(Messages.getString("imageio.54"));
         }
 
         Iterator<ImageWriter> it = getImageWriters(ImageTypeSpecifier.createFromRenderedImage(im), formatName);
@@ -306,7 +307,7 @@ public final class ImageIO {
             throws IOException {
 
         if (output == null) {
-            throw new IllegalArgumentException("output cannot be NULL");
+            throw new IllegalArgumentException(Messages.getString("imageio.54"));
         }
 
         if (output.exists()) {
@@ -325,7 +326,7 @@ public final class ImageIO {
             throws IOException {
 
         if (output == null) {
-            throw new IllegalArgumentException("output cannot be NULL");
+            throw new IllegalArgumentException(Messages.getString("imageio.54"));
         }
 
         ImageOutputStream ios = createImageOutputStream(output);
@@ -394,7 +395,7 @@ public final class ImageIO {
 
         public MIMETypeFilter(final String mimeType) {
             if (mimeType == null) {
-                throw new NullPointerException("MIMEType cannot be NULL");
+                throw new NullPointerException(Messages.getString("imageio.55"));
             }
             
             this.mimeType = mimeType;
@@ -451,7 +452,7 @@ public final class ImageIO {
         }
 
         public void remove() {
-            throw new UnsupportedOperationException("Use deregisterServiceprovider instead of Iterator.remove()");
+            throw new UnsupportedOperationException(Messages.getString("imageio.56"));
         }
     }
 
@@ -479,7 +480,7 @@ public final class ImageIO {
         }
 
         public void remove() {
-            throw new UnsupportedOperationException("Use deregisterServiceprovider instead of Iterator.remove()");
+            throw new UnsupportedOperationException(Messages.getString("imageio.56"));
         }
     }
 }

Modified: harmony/enhanced/trunk/classlib/modules/imageio/src/main/java/javax/imageio/ImageReadParam.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/trunk/classlib/modules/imageio/src/main/java/javax/imageio/ImageReadParam.java?rev=926835&r1=926834&r2=926835&view=diff
==============================================================================
--- harmony/enhanced/trunk/classlib/modules/imageio/src/main/java/javax/imageio/ImageReadParam.java (original)
+++ harmony/enhanced/trunk/classlib/modules/imageio/src/main/java/javax/imageio/ImageReadParam.java Tue Mar 23 22:55:42 2010
@@ -21,6 +21,7 @@ package javax.imageio;
 
 import java.awt.Dimension;
 import java.awt.image.BufferedImage;
+import org.apache.harmony.x.imageio.internal.nls.Messages;
 
 /**
  * @author Sergey I. Salishev
@@ -85,7 +86,7 @@ public class ImageReadParam extends IIOP
 
     public void setSourceRenderSize(Dimension size) throws UnsupportedOperationException {
         if (!canSetSourceRenderSize) {
-            throw new UnsupportedOperationException("can't set source renderer size");
+            throw new UnsupportedOperationException(Messages.getString("imageio.29"));
         }
         sourceRenderSize = size;        
     }

Modified: harmony/enhanced/trunk/classlib/modules/imageio/src/main/java/javax/imageio/ImageTypeSpecifier.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/trunk/classlib/modules/imageio/src/main/java/javax/imageio/ImageTypeSpecifier.java?rev=926835&r1=926834&r2=926835&view=diff
==============================================================================
--- harmony/enhanced/trunk/classlib/modules/imageio/src/main/java/javax/imageio/ImageTypeSpecifier.java (original)
+++ harmony/enhanced/trunk/classlib/modules/imageio/src/main/java/javax/imageio/ImageTypeSpecifier.java Tue Mar 23 22:55:42 2010
@@ -27,6 +27,7 @@ import java.awt.image.RenderedImage;
 import java.awt.color.ColorSpace;
 
 import org.apache.harmony.luni.util.NotImplementedException;
+import org.apache.harmony.x.imageio.internal.nls.Messages;
 
 public class ImageTypeSpecifier {
     
@@ -35,13 +36,13 @@ public class ImageTypeSpecifier {
 
     public ImageTypeSpecifier(ColorModel colorModel, SampleModel sampleModel) {
         if (colorModel == null) {
-            throw new IllegalArgumentException("color model should not be NULL");
+            throw new IllegalArgumentException(Messages.getString("imageio.24"));
         }
         if (sampleModel == null) {
-            throw new IllegalArgumentException("sample model should not be NULL");
+            throw new IllegalArgumentException(Messages.getString("imageio.25"));
         }
         if (!colorModel.isCompatibleSampleModel(sampleModel)) {
-            throw new IllegalArgumentException("color and sample models are not compatible");
+            throw new IllegalArgumentException(Messages.getString("imageio.26"));
         }
 
         this.colorModel = colorModel;
@@ -50,7 +51,7 @@ public class ImageTypeSpecifier {
 
     public ImageTypeSpecifier(RenderedImage renderedImage) {
         if (renderedImage == null) {
-            throw new IllegalArgumentException("image should not be NULL");
+            throw new IllegalArgumentException(Messages.getString("imageio.27"));
         }
         this.colorModel = renderedImage.getColorModel();
         this.sampleModel = renderedImage.getSampleModel();
@@ -119,7 +120,7 @@ public class ImageTypeSpecifier {
 
     public static ImageTypeSpecifier createFromRenderedImage(RenderedImage image) {
         if (null == image) {
-            throw new IllegalArgumentException("image should not be NULL");
+            throw new IllegalArgumentException(Messages.getString("imageio.27"));
         }
         return new ImageTypeSpecifier(image);
     }
@@ -150,7 +151,7 @@ public class ImageTypeSpecifier {
 
     public SampleModel getSampleModel(int width, int height) {
         if ((long)width*height > Integer.MAX_VALUE) {
-            throw new IllegalArgumentException("width * height > Integer.MAX_VALUE");
+            throw new IllegalArgumentException(Messages.getString("imageio.28"));
         }
         return sampleModel.createCompatibleSampleModel(width, height);
     }

Modified: harmony/enhanced/trunk/classlib/modules/imageio/src/main/java/javax/imageio/ImageWriteParam.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/trunk/classlib/modules/imageio/src/main/java/javax/imageio/ImageWriteParam.java?rev=926835&r1=926834&r2=926835&view=diff
==============================================================================
--- harmony/enhanced/trunk/classlib/modules/imageio/src/main/java/javax/imageio/ImageWriteParam.java (original)
+++ harmony/enhanced/trunk/classlib/modules/imageio/src/main/java/javax/imageio/ImageWriteParam.java Tue Mar 23 22:55:42 2010
@@ -21,6 +21,7 @@ package javax.imageio;
 
 import java.util.Locale;
 import java.awt.*;
+import org.apache.harmony.x.imageio.internal.nls.Messages;
 
 public class ImageWriteParam extends IIOParam {
 
@@ -57,7 +58,7 @@ public class ImageWriteParam extends IIO
         if (canWriteProgressive()) {
             return progressiveMode;
         }
-        throw new UnsupportedOperationException("progressive mode is not supported");
+        throw new UnsupportedOperationException(Messages.getString("imageio.33"));
     }
 
     public boolean canWriteProgressive() {
@@ -67,11 +68,11 @@ public class ImageWriteParam extends IIO
     public void setProgressiveMode(int mode) {
         if (canWriteProgressive()) {
             if (mode < MODE_DISABLED || mode > MODE_COPY_FROM_METADATA || mode == MODE_EXPLICIT) {
-                throw new IllegalArgumentException("mode is not supported");
+                throw new IllegalArgumentException(Messages.getString("imageio.34"));
             }
             this.progressiveMode = mode;
         }
-        throw new UnsupportedOperationException("progressive mode is not supported");
+        throw new UnsupportedOperationException(Messages.getString("imageio.33"));
     }
 
     public boolean canOffsetTiles() {
@@ -88,19 +89,19 @@ public class ImageWriteParam extends IIO
 
     private final void checkWriteCompressed() {
         if (!canWriteCompressed()) {
-            throw new UnsupportedOperationException("Compression not supported.");
+            throw new UnsupportedOperationException(Messages.getString("imageio.35"));
         }
     }
 
     private final void checkCompressionMode() {
         if (getCompressionMode() != MODE_EXPLICIT) {
-            throw new IllegalStateException("Compression mode not MODE_EXPLICIT!");
+            throw new IllegalStateException(Messages.getString("imageio.36"));
         }
     }
 
     private final void checkCompressionType() {
         if (getCompressionTypes() != null && getCompressionType() == null) {
-            throw new IllegalStateException("No compression type set!");
+            throw new IllegalStateException(Messages.getString("imageio.37"));
         }
     }
 
@@ -128,7 +129,7 @@ public class ImageWriteParam extends IIO
         checkCompressionMode();
         checkCompressionType();
         if (quality < 0 || quality > 1) {
-            throw new IllegalArgumentException("Quality out-of-bounds!");
+            throw new IllegalArgumentException(Messages.getString("imageio.38"));
         }
         return -1.0f;
     }
@@ -164,7 +165,7 @@ public class ImageWriteParam extends IIO
 
         String compressionType = getCompressionType();
         if (compressionType == null) {
-            throw new IllegalStateException("No compression type set!");
+            throw new IllegalStateException(Messages.getString("imageio.37"));
         }
         return compressionType;
 
@@ -172,19 +173,19 @@ public class ImageWriteParam extends IIO
 
     private final void checkTiling() {
         if (!canWriteTiles()) {
-            throw new UnsupportedOperationException("Tiling not supported!");
+            throw new UnsupportedOperationException(Messages.getString("imageio.39"));
         }
     }
 
     private final void checkTilingMode() {
         if (getTilingMode() != MODE_EXPLICIT) {
-            throw new IllegalStateException("Tiling mode not MODE_EXPLICIT!");
+            throw new IllegalStateException(Messages.getString("imageio.3A"));
         }
     }
 
     private final void checkTilingParams() {
         if (!tilingSet) {
-            throw new IllegalStateException("Tiling parameters not set!");
+            throw new IllegalStateException(Messages.getString("imageio.3B"));
         }
     }
 
@@ -263,7 +264,7 @@ public class ImageWriteParam extends IIO
                 break;
             }
             default: {
-                throw new IllegalArgumentException("Illegal value for mode!");
+                throw new IllegalArgumentException(Messages.getString("imageio.3C"));
             }
         }
     }
@@ -273,7 +274,7 @@ public class ImageWriteParam extends IIO
         checkCompressionMode();
         checkCompressionType();
         if (quality < 0 || quality > 1) {
-            throw new IllegalArgumentException("Quality out-of-bounds!");
+            throw new IllegalArgumentException(Messages.getString("imageio.38"));
         }
         compressionQuality = quality;
     }
@@ -287,7 +288,7 @@ public class ImageWriteParam extends IIO
         } else {
             String[] compressionTypes = getCompressionTypes();
             if (compressionTypes == null) {
-                throw new UnsupportedOperationException("No settable compression types");
+                throw new UnsupportedOperationException(Messages.getString("imageio.3D"));
             }
 
             for (int i = 0; i < compressionTypes.length; i++) {
@@ -298,7 +299,7 @@ public class ImageWriteParam extends IIO
             }
 
             // Compression type is not in the list.
-            throw new IllegalArgumentException("Unknown compression type!");
+            throw new IllegalArgumentException(Messages.getString("imageio.3E"));
         }
     }
 
@@ -307,11 +308,11 @@ public class ImageWriteParam extends IIO
         checkTilingMode();
 
         if (!canOffsetTiles() && (tileGridXOffset != 0 || tileGridYOffset != 0)) {
-            throw new UnsupportedOperationException("Can't offset tiles!");
+            throw new UnsupportedOperationException(Messages.getString("imageio.3F"));
         }
 
         if (tileWidth <=0 || tileHeight <= 0) {
-            throw new IllegalArgumentException("tile dimensions are non-positive!");
+            throw new IllegalArgumentException(Messages.getString("imageio.40"));
         }
 
         Dimension preferredTileSizes[] = getPreferredTileSizes();
@@ -323,7 +324,7 @@ public class ImageWriteParam extends IIO
                         tileWidth < minSize.width || tileWidth > maxSize.width ||
                         tileHeight < minSize.height || tileHeight > maxSize.height
                 ) {
-                    throw new IllegalArgumentException("Illegal tile size!");
+                    throw new IllegalArgumentException(Messages.getString("imageio.41"));
                 }
             }
         }
@@ -362,7 +363,7 @@ public class ImageWriteParam extends IIO
                 break;
             }
             default: {
-                throw new IllegalArgumentException("Illegal value for mode!");
+                throw new IllegalArgumentException(Messages.getString("imageio.3C"));
             }
         }
     }

Modified: harmony/enhanced/trunk/classlib/modules/imageio/src/main/java/javax/imageio/ImageWriter.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/trunk/classlib/modules/imageio/src/main/java/javax/imageio/ImageWriter.java?rev=926835&r1=926834&r2=926835&view=diff
==============================================================================
--- harmony/enhanced/trunk/classlib/modules/imageio/src/main/java/javax/imageio/ImageWriter.java (original)
+++ harmony/enhanced/trunk/classlib/modules/imageio/src/main/java/javax/imageio/ImageWriter.java Tue Mar 23 22:55:42 2010
@@ -37,6 +37,7 @@ import javax.imageio.event.IIOWriteProgr
 import javax.imageio.event.IIOWriteWarningListener;
 import javax.imageio.metadata.IIOMetadata;
 import javax.imageio.spi.ImageWriterSpi;
+import org.apache.harmony.x.imageio.internal.nls.Messages;
 
 public abstract class ImageWriter implements ImageTranscoder {
 
@@ -93,7 +94,7 @@ public abstract class ImageWriter implem
 
     protected void processWarningOccurred(int imageIndex, String warning) {
         if (null == warning) {
-            throw new NullPointerException("warning message should not be NULL");
+            throw new NullPointerException(Messages.getString("imageio.2A"));
         }
         if (null != warningListeners) {
             for (IIOWriteWarningListener listener : warningListeners) {
@@ -108,10 +109,10 @@ public abstract class ImageWriter implem
         }
 
         if (bundle == null) {
-            throw new IllegalArgumentException("baseName == null!");
+            throw new IllegalArgumentException(Messages.getString("imageio.2B"));
         }
         if (key == null) {
-            throw new IllegalArgumentException("keyword == null!");
+            throw new IllegalArgumentException(Messages.getString("imageio.2C"));
         }
 
         // Get the context class loader and try to locate the bundle with it first
@@ -136,7 +137,7 @@ public abstract class ImageWriter implem
                 try {
                     rb = ResourceBundle.getBundle(bundle, locale);
                 } catch (MissingResourceException e1) {
-                    throw new IllegalArgumentException("Bundle not found!");
+                    throw new IllegalArgumentException(Messages.getString("imageio.2D"));
                 }
             }
 
@@ -144,9 +145,9 @@ public abstract class ImageWriter implem
                 String warning = rb.getString(key);
                 listener.warningOccurred(this, imageIndex, warning);
             } catch (MissingResourceException e) {
-                throw new IllegalArgumentException("Resource is missing!");
+                throw new IllegalArgumentException(Messages.getString("imageio.2E"));
             } catch (ClassCastException e) {
-                throw new IllegalArgumentException("Resource is not a String!");
+                throw new IllegalArgumentException(Messages.getString("imageio.2F"));
             }
         }
     }
@@ -164,7 +165,7 @@ public abstract class ImageWriter implem
                     }
                 }
                 if (!supported) {
-                    throw new IllegalArgumentException("output " + output + " is not supported");
+                    throw new IllegalArgumentException(Messages.getString("imageio.94", output));
                 }
             }
         }
@@ -242,16 +243,16 @@ public abstract class ImageWriter implem
 
     private final boolean checkOutputReturnFalse() {
         if (getOutput() == null) {
-            throw new IllegalStateException("getOutput() == null!");
+            throw new IllegalStateException(Messages.getString("imageio.30"));
         }
         return false;
     }
 
     private final void unsupportedOperation() {
         if (getOutput() == null) {
-            throw new IllegalStateException("getOutput() == null!");
+            throw new IllegalStateException(Messages.getString("imageio.30"));
         }
-        throw new UnsupportedOperationException("Unsupported write variant!");
+        throw new UnsupportedOperationException(Messages.getString("imageio.31"));
     }
 
 
@@ -480,7 +481,7 @@ public abstract class ImageWriter implem
         if (validLocale) {
             this.locale = locale;
         } else {
-            throw new IllegalArgumentException("Invalid locale!");
+            throw new IllegalArgumentException(Messages.getString("imageio.32"));
         }
     }
 

Modified: harmony/enhanced/trunk/classlib/modules/imageio/src/main/java/javax/imageio/metadata/IIOMetadata.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/trunk/classlib/modules/imageio/src/main/java/javax/imageio/metadata/IIOMetadata.java?rev=926835&r1=926834&r2=926835&view=diff
==============================================================================
--- harmony/enhanced/trunk/classlib/modules/imageio/src/main/java/javax/imageio/metadata/IIOMetadata.java (original)
+++ harmony/enhanced/trunk/classlib/modules/imageio/src/main/java/javax/imageio/metadata/IIOMetadata.java Tue Mar 23 22:55:42 2010
@@ -20,6 +20,7 @@ import java.util.ArrayList;
 
 import org.apache.harmony.x.imageio.metadata.IIOMetadataUtils;
 import org.w3c.dom.Node;
+import org.apache.harmony.x.imageio.internal.nls.Messages;
 
 public abstract class IIOMetadata {
 
@@ -44,21 +45,21 @@ public abstract class IIOMetadata {
         if (extraMetadataFormatNames == null) {
             if (extraMetadataFormatClassNames != null) {
                 throw new IllegalArgumentException(
-                        "extraMetadataFormatNames == null && extraMetadataFormatClassNames != null!"
+                        Messages.getString("imageio.77")
                 );
             }
         } else {
             if (extraMetadataFormatClassNames == null) {
                 throw new IllegalArgumentException(
-                        "extraMetadataFormatNames != null && extraMetadataFormatClassNames == null!"
+                        Messages.getString("imageio.78")
                 );
             }
             if (extraMetadataFormatNames.length == 0) {
-                throw new IllegalArgumentException("extraMetadataFormatNames.length == 0!");
+                throw new IllegalArgumentException(Messages.getString("imageio.79"));
             }
             if (extraMetadataFormatClassNames.length != extraMetadataFormatNames.length) {
                 throw new IllegalArgumentException(
-                        "extraMetadataFormatClassNames.length != extraMetadataFormatNames.length!"
+                        Messages.getString("imageio.7A")
                 );
             }
             this.extraMetadataFormatNames = extraMetadataFormatNames.clone();
@@ -81,7 +82,7 @@ public abstract class IIOMetadata {
 
     public boolean activateController() {
         if (!hasController()) {
-            throw new IllegalStateException("hasController() == false!");
+            throw new IllegalStateException(Messages.getString("imageio.7B"));
         }
         return getController().activate(this);
     }

Modified: harmony/enhanced/trunk/classlib/modules/imageio/src/main/java/javax/imageio/metadata/IIOMetadataFormatImpl.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/trunk/classlib/modules/imageio/src/main/java/javax/imageio/metadata/IIOMetadataFormatImpl.java?rev=926835&r1=926834&r2=926835&view=diff
==============================================================================
--- harmony/enhanced/trunk/classlib/modules/imageio/src/main/java/javax/imageio/metadata/IIOMetadataFormatImpl.java (original)
+++ harmony/enhanced/trunk/classlib/modules/imageio/src/main/java/javax/imageio/metadata/IIOMetadataFormatImpl.java Tue Mar 23 22:55:42 2010
@@ -21,6 +21,7 @@ import javax.imageio.ImageTypeSpecifier;
 import java.util.*;
 import java.security.AccessController;
 import java.security.PrivilegedAction;
+import org.apache.harmony.x.imageio.internal.nls.Messages;
 
 public abstract class IIOMetadataFormatImpl implements IIOMetadataFormat {
     @SuppressWarnings({"ConstantDeclaredInAbstractClass"})
@@ -36,14 +37,14 @@ public abstract class IIOMetadataFormatI
 
     public IIOMetadataFormatImpl(String rootName, int childPolicy) {
         if (rootName == null) {
-            throw new IllegalArgumentException("rootName is null");
+            throw new IllegalArgumentException(Messages.getString("imageio.63"));
         }
         if (
                 childPolicy < CHILD_POLICY_EMPTY ||
                 childPolicy > CHILD_POLICY_MAX ||
                 childPolicy == CHILD_POLICY_REPEAT
         ) {
-            throw new IllegalArgumentException("childPolicy is not one of the predefined constants");
+            throw new IllegalArgumentException(Messages.getString("imageio.64"));
         }
 
         this.rootName = rootName;
@@ -55,13 +56,13 @@ public abstract class IIOMetadataFormatI
 
     public IIOMetadataFormatImpl(String rootName, int minChildren, int maxChildren) {
         if (rootName == null) {
-            throw new IllegalArgumentException("rootName is null");
+            throw new IllegalArgumentException(Messages.getString("imageio.63"));
         }
         if (minChildren < 0) {
-            throw new IllegalArgumentException("minChildren < 0!");
+            throw new IllegalArgumentException(Messages.getString("imageio.65"));
         }
         if (minChildren > maxChildren) {
-            throw new IllegalArgumentException("minChildren > maxChildren!");
+            throw new IllegalArgumentException(Messages.getString("imageio.66"));
         }
 
         this.rootName = rootName;
@@ -81,13 +82,13 @@ public abstract class IIOMetadataFormatI
             boolean required, int listMinLength, int listMaxLength
     ) {
         if (attrName == null) {
-            throw new IllegalArgumentException("attrName == null!");
+            throw new IllegalArgumentException(Messages.getString("imageio.67"));
         }
         if (dataType < DATATYPE_STRING || dataType > DATATYPE_DOUBLE) {
-            throw new IllegalArgumentException("Invalid value for dataType!");
+            throw new IllegalArgumentException(Messages.getString("imageio.68"));
         }
         if (listMinLength < 0 || listMinLength > listMaxLength) {
-            throw new IllegalArgumentException("Invalid list bounds!");
+            throw new IllegalArgumentException(Messages.getString("imageio.69"));
         }
 
         Element element = findElement(elementName);
@@ -107,10 +108,10 @@ public abstract class IIOMetadataFormatI
             boolean required, String defaultValue
     ) {
         if (attrName == null) {
-            throw new IllegalArgumentException("attrName == null!");
+            throw new IllegalArgumentException(Messages.getString("imageio.67"));
         }
         if (dataType < DATATYPE_STRING || dataType > DATATYPE_DOUBLE) {
-            throw new IllegalArgumentException("Invalid value for dataType!");
+            throw new IllegalArgumentException(Messages.getString("imageio.68"));
         }
 
         Element element = findElement(elementName);
@@ -129,23 +130,23 @@ public abstract class IIOMetadataFormatI
             boolean required, String defaultValue, List<String> enumeratedValues
     ) {
         if (attrName == null) {
-            throw new IllegalArgumentException("attrName == null!");
+            throw new IllegalArgumentException(Messages.getString("imageio.67"));
         }
         if (dataType < DATATYPE_STRING || dataType > DATATYPE_DOUBLE) {
-            throw new IllegalArgumentException("Invalid value for dataType!");
+            throw new IllegalArgumentException(Messages.getString("imageio.68"));
         }
         if (enumeratedValues == null || enumeratedValues.isEmpty()) {
-            throw new IllegalArgumentException("enumeratedValues is empty or null");
+            throw new IllegalArgumentException(Messages.getString("imageio.6A"));
         }
 
         try {
             for (String enumeratedValue : enumeratedValues) {
                 if (enumeratedValue == null) {
-                    throw new IllegalArgumentException("enumeratedValues contains a null!");
+                    throw new IllegalArgumentException(Messages.getString("imageio.6B"));
                 }
             }
         } catch (ClassCastException e) {
-            throw new IllegalArgumentException("enumeratedValues contains a non-String value!");
+            throw new IllegalArgumentException(Messages.getString("imageio.6C"));
         }
 
         Element element = findElement(elementName);
@@ -167,10 +168,10 @@ public abstract class IIOMetadataFormatI
             boolean minInclusive, boolean maxInclusive
     ) {
         if (attrName == null) {
-            throw new IllegalArgumentException("attrName == null!");
+            throw new IllegalArgumentException(Messages.getString("imageio.67"));
         }
         if (dataType < DATATYPE_STRING || dataType > DATATYPE_DOUBLE) {
-            throw new IllegalArgumentException("Invalid value for dataType!");
+            throw new IllegalArgumentException(Messages.getString("imageio.68"));
         }
 
         Element element = findElement(elementName);
@@ -215,7 +216,7 @@ public abstract class IIOMetadataFormatI
                 childPolicy > CHILD_POLICY_MAX ||
                 childPolicy == CHILD_POLICY_REPEAT
         ) {
-            throw new IllegalArgumentException("childPolicy is not one of the predefined constants");
+            throw new IllegalArgumentException(Messages.getString("imageio.64"));
         }
         
         Element parent = findElement(parentName);
@@ -231,10 +232,10 @@ public abstract class IIOMetadataFormatI
             int minChildren, int maxChildren
     ) {
         if (minChildren < 0) {
-            throw new IllegalArgumentException("minChildren < 0!");
+            throw new IllegalArgumentException(Messages.getString("imageio.65"));
         }
         if (minChildren > maxChildren) {
-            throw new IllegalArgumentException("minChildren > maxChildren!");
+            throw new IllegalArgumentException(Messages.getString("imageio.66"));
         }
 
         Element parent = findElement(parentName);
@@ -284,17 +285,17 @@ public abstract class IIOMetadataFormatI
     ) {
         // note: reqired is an unused parameter
         if (enumeratedValues == null || enumeratedValues.isEmpty()) {
-            throw new IllegalArgumentException("enumeratedValues is empty or null");
+            throw new IllegalArgumentException(Messages.getString("imageio.6A"));
         }
 
         try {
             for (T enumeratedValue : enumeratedValues) {
                 if (enumeratedValue == null) {
-                    throw new IllegalArgumentException("enumeratedValues contains a null!");
+                    throw new IllegalArgumentException(Messages.getString("imageio.6B"));
                 }
             }
         } catch (ClassCastException e) {
-            throw new IllegalArgumentException("enumeratedValues contains a value not of class classType!");
+            throw new IllegalArgumentException(Messages.getString("imageio.6D"));
         }
 
         Element element = findElement(elementName);
@@ -348,7 +349,7 @@ public abstract class IIOMetadataFormatI
     public String[] getAttributeEnumerations(String elementName, String attrName) {
         Attlist attr = findAttribute(elementName, attrName);
         if (attr.valueType != VALUE_ENUMERATION) {
-            throw new IllegalArgumentException("Attribute is not an enumeration!");
+            throw new IllegalArgumentException(Messages.getString("imageio.6E"));
         }
 
         return attr.enumeratedValues.toArray(new String[attr.enumeratedValues.size()]);
@@ -357,7 +358,7 @@ public abstract class IIOMetadataFormatI
     public int getAttributeListMaxLength(String elementName, String attrName) {
         Attlist attr = findAttribute(elementName, attrName);
         if (attr.valueType != VALUE_LIST) {
-            throw new IllegalArgumentException("Attribute is not a list!");
+            throw new IllegalArgumentException(Messages.getString("imageio.6F"));
         }
         return attr.listMaxLength;
     }
@@ -365,7 +366,7 @@ public abstract class IIOMetadataFormatI
     public int getAttributeListMinLength(String elementName, String attrName) {
         Attlist attr = findAttribute(elementName, attrName);
         if (attr.valueType != VALUE_LIST) {
-            throw new IllegalArgumentException("Attribute is not a list!");
+            throw new IllegalArgumentException(Messages.getString("imageio.6F"));
         }
         return attr.listMinLength;
     }
@@ -373,7 +374,7 @@ public abstract class IIOMetadataFormatI
     public String getAttributeMaxValue(String elementName, String attrName) {
         Attlist attr = findAttribute(elementName, attrName);
         if ((attr.valueType & VALUE_RANGE) == 0) {
-            throw new IllegalArgumentException("Attribute is not a range!");
+            throw new IllegalArgumentException(Messages.getString("imageio.70"));
         }
         return attr.maxValue;        
     }
@@ -381,7 +382,7 @@ public abstract class IIOMetadataFormatI
     public String getAttributeMinValue(String elementName, String attrName) {
         Attlist attr = findAttribute(elementName, attrName);
         if ((attr.valueType & VALUE_RANGE) == 0) {
-            throw new IllegalArgumentException("Attribute is not a range!");
+            throw new IllegalArgumentException(Messages.getString("imageio.70"));
         }
         return attr.minValue;
     }
@@ -417,7 +418,7 @@ public abstract class IIOMetadataFormatI
     public int getElementMaxChildren(String elementName) {
         Element element = findElement(elementName);
         if (element.childPolicy != CHILD_POLICY_REPEAT) {
-            throw new IllegalArgumentException("Child policy is not CHILD_POLICY_REPEAT!");
+            throw new IllegalArgumentException(Messages.getString("imageio.71"));
         }
         return element.maxChildren;
     }
@@ -425,7 +426,7 @@ public abstract class IIOMetadataFormatI
     public int getElementMinChildren(String elementName) {
         Element element = findElement(elementName);
         if (element.childPolicy != CHILD_POLICY_REPEAT) {
-            throw new IllegalArgumentException("Child policy is not CHILD_POLICY_REPEAT!");
+            throw new IllegalArgumentException(Messages.getString("imageio.71"));
         }
         return element.minChildren;
     }
@@ -434,7 +435,7 @@ public abstract class IIOMetadataFormatI
         Element element = findElement(elementName);
         ObjectValue v = element.objectValue;
         if (v == null || v.valueType != VALUE_LIST) {
-            throw new IllegalArgumentException("Not a list!");
+            throw new IllegalArgumentException(Messages.getString("imageio.72"));
         }
         return v.arrayMaxLength;
     }
@@ -443,7 +444,7 @@ public abstract class IIOMetadataFormatI
         Element element = findElement(elementName);
         ObjectValue v = element.objectValue;
         if (v == null || v.valueType != VALUE_LIST) {
-            throw new IllegalArgumentException("Not a list!");
+            throw new IllegalArgumentException(Messages.getString("imageio.72"));
         }
         return v.arrayMinLength;
     }
@@ -462,7 +463,7 @@ public abstract class IIOMetadataFormatI
         Element element = findElement(elementName);
         ObjectValue v = element.objectValue;
         if (v == null || v.valueType != VALUE_ENUMERATION) {
-            throw new IllegalArgumentException("Not an enumeration!");
+            throw new IllegalArgumentException(Messages.getString("imageio.73"));
         }
         return v.enumeratedValues.toArray();
     }
@@ -471,7 +472,7 @@ public abstract class IIOMetadataFormatI
         Element element = findElement(elementName);
         ObjectValue v = element.objectValue;
         if (v == null || (v.valueType & VALUE_RANGE) == 0) {
-            throw new IllegalArgumentException("Not a range!");
+            throw new IllegalArgumentException(Messages.getString("imageio.74"));
         }
         return v.maxValue;
     }
@@ -480,7 +481,7 @@ public abstract class IIOMetadataFormatI
         Element element = findElement(elementName);
         ObjectValue v = element.objectValue;
         if (v == null || (v.valueType & VALUE_RANGE) == 0) {
-            throw new IllegalArgumentException("Not a range!");
+            throw new IllegalArgumentException(Messages.getString("imageio.74"));
         }
         return v.minValue;
     }
@@ -535,7 +536,7 @@ public abstract class IIOMetadataFormatI
     
     protected void setResourceBaseName(String resourceBaseName) {
         if (resourceBaseName == null) {
-            throw new IllegalArgumentException("resourceBaseName == null!");
+            throw new IllegalArgumentException(Messages.getString("imageio.75"));
         }
         this.resourceBaseName = resourceBaseName;
     }
@@ -590,7 +591,7 @@ public abstract class IIOMetadataFormatI
     private Element findElement(String name) {
         Element element;
         if ((element = elementHash.get(name)) == null) {
-            throw new IllegalArgumentException("element name is null or no such element: " + name);
+            throw new IllegalArgumentException(Messages.getString("imageio.8C", name));
         }
 
         return element;
@@ -600,7 +601,7 @@ public abstract class IIOMetadataFormatI
         Element element = findElement(elementName);
         Attlist attribute;
         if ((attribute = element.attributes.get(attributeName)) == null) {
-            throw new IllegalArgumentException("attribute name is null or no such attribute: " + attributeName);
+            throw new IllegalArgumentException(Messages.getString("imageio.8D", attributeName));
         }
 
         return attribute;
@@ -610,7 +611,7 @@ public abstract class IIOMetadataFormatI
         Element element = findElement(elementName);
         ObjectValue v = element.objectValue;
         if (v == null) {
-            throw new IllegalArgumentException("No object within element");
+            throw new IllegalArgumentException(Messages.getString("imageio.76"));
         }
         return v;
     }

Modified: harmony/enhanced/trunk/classlib/modules/imageio/src/main/java/javax/imageio/metadata/IIOMetadataNode.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/trunk/classlib/modules/imageio/src/main/java/javax/imageio/metadata/IIOMetadataNode.java?rev=926835&r1=926834&r2=926835&view=diff
==============================================================================
--- harmony/enhanced/trunk/classlib/modules/imageio/src/main/java/javax/imageio/metadata/IIOMetadataNode.java (original)
+++ harmony/enhanced/trunk/classlib/modules/imageio/src/main/java/javax/imageio/metadata/IIOMetadataNode.java Tue Mar 23 22:55:42 2010
@@ -29,6 +29,7 @@ import org.w3c.dom.Node;
 import org.w3c.dom.NodeList;
 import org.w3c.dom.TypeInfo;
 import org.w3c.dom.UserDataHandler;
+import org.apache.harmony.x.imageio.internal.nls.Messages;
 
 public class IIOMetadataNode implements Element, NodeList {
 
@@ -97,7 +98,8 @@ public class IIOMetadataNode implements 
             if (owner == this) { // Replacing an attribute node by itself has no effect
                 return null;
             } else {
-                throw new DOMException(DOMException.INUSE_ATTRIBUTE_ERR, "Attribute is already in use");
+                throw new DOMException(DOMException.INUSE_ATTRIBUTE_ERR,
+                                       Messages.getString("imageio.8E"));
             }
         }
 
@@ -122,7 +124,8 @@ public class IIOMetadataNode implements 
 
     public Attr removeAttributeNode(Attr oldAttr) throws DOMException {
         if (!attrs.list.remove(oldAttr)) { // Not found
-            throw new DOMException(DOMException.NOT_FOUND_ERR, "No such attribute!");
+            throw new DOMException(DOMException.NOT_FOUND_ERR,
+                                   Messages.getString("imageio.8F"));
         }
 
         ((IIOMetadataAttr)oldAttr).setOwnerElement(null);
@@ -198,19 +201,23 @@ public class IIOMetadataNode implements 
     }
 
     public TypeInfo getSchemaTypeInfo() {
-        throw new DOMException(DOMException.NOT_SUPPORTED_ERR, "Method not supported");
+        throw new DOMException(DOMException.NOT_SUPPORTED_ERR,
+                               Messages.getString("imageio.90"));
     }
 
     public void setIdAttribute(String name, boolean isId) throws DOMException {
-        throw new DOMException(DOMException.NOT_SUPPORTED_ERR, "Method not supported");
+        throw new DOMException(DOMException.NOT_SUPPORTED_ERR,
+                               Messages.getString("imageio.90"));
     }
 
     public void setIdAttributeNS(String namespaceURI, String localName, boolean isId) throws DOMException {
-        throw new DOMException(DOMException.NOT_SUPPORTED_ERR, "Method not supported");
+        throw new DOMException(DOMException.NOT_SUPPORTED_ERR,
+                               Messages.getString("imageio.90"));
     }
 
     public void setIdAttributeNode(Attr idAttr, boolean isId) throws DOMException {
-        throw new DOMException(DOMException.NOT_SUPPORTED_ERR, "Method not supported");
+        throw new DOMException(DOMException.NOT_SUPPORTED_ERR,
+                               Messages.getString("imageio.90"));
     }
 
     public String getNodeName() {
@@ -263,7 +270,7 @@ public class IIOMetadataNode implements 
 
     public Node insertBefore(Node newChild, Node refChild) throws DOMException {
         if (newChild == null) {
-            throw new IllegalArgumentException("newChild == null!");
+            throw new IllegalArgumentException(Messages.getString("imageio.61"));
         }
 
         IIOMetadataNode newIIOChild = (IIOMetadataNode) newChild;
@@ -307,7 +314,7 @@ public class IIOMetadataNode implements 
 
     public Node replaceChild(Node newChild, Node oldChild) throws DOMException {
         if (newChild == null) {
-            throw new IllegalArgumentException("newChild == null!");
+            throw new IllegalArgumentException(Messages.getString("imageio.61"));
         }
 
         IIOMetadataNode newIIOChild = (IIOMetadataNode) newChild;
@@ -347,7 +354,7 @@ public class IIOMetadataNode implements 
 
     public Node removeChild(Node oldChild) throws DOMException {
         if (oldChild == null) {
-            throw new IllegalArgumentException("oldChild == null!");
+            throw new IllegalArgumentException(Messages.getString("imageio.62"));
         }
 
         IIOMetadataNode oldIIOChild = (IIOMetadataNode) oldChild;
@@ -432,11 +439,13 @@ public class IIOMetadataNode implements 
     }
 
     public String getBaseURI() {
-        throw new DOMException(DOMException.NOT_SUPPORTED_ERR, "Method not supported");
+        throw new DOMException(DOMException.NOT_SUPPORTED_ERR,
+                               Messages.getString("imageio.90"));
     }
 
     public short compareDocumentPosition(Node other) throws DOMException {
-        throw new DOMException(DOMException.NOT_SUPPORTED_ERR, "Method not supported");
+        throw new DOMException(DOMException.NOT_SUPPORTED_ERR,
+                               Messages.getString("imageio.90"));
     }
 
     public String getTextContent() throws DOMException {
@@ -448,35 +457,43 @@ public class IIOMetadataNode implements 
     }
 
     public boolean isSameNode(Node other) {
-        throw new DOMException(DOMException.NOT_SUPPORTED_ERR, "Method not supported");
+        throw new DOMException(DOMException.NOT_SUPPORTED_ERR,
+                               Messages.getString("imageio.90"));
     }
 
     public String lookupPrefix(String namespaceURI) {
-        throw new DOMException(DOMException.NOT_SUPPORTED_ERR, "Method not supported");
+        throw new DOMException(DOMException.NOT_SUPPORTED_ERR,
+                               Messages.getString("imageio.90"));
     }
 
     public boolean isDefaultNamespace(String namespaceURI) {
-        throw new DOMException(DOMException.NOT_SUPPORTED_ERR, "Method not supported");
+        throw new DOMException(DOMException.NOT_SUPPORTED_ERR,
+                               Messages.getString("imageio.90"));
     }
 
     public String lookupNamespaceURI(String prefix) {
-        throw new DOMException(DOMException.NOT_SUPPORTED_ERR, "Method not supported");
+        throw new DOMException(DOMException.NOT_SUPPORTED_ERR,
+                               Messages.getString("imageio.90"));
     }
 
     public boolean isEqualNode(Node arg) {
-        throw new DOMException(DOMException.NOT_SUPPORTED_ERR, "Method not supported");
+        throw new DOMException(DOMException.NOT_SUPPORTED_ERR,
+                               Messages.getString("imageio.90"));
     }
 
     public Object getFeature(String feature, String version) {
-        throw new DOMException(DOMException.NOT_SUPPORTED_ERR, "Method not supported");
+        throw new DOMException(DOMException.NOT_SUPPORTED_ERR,
+                               Messages.getString("imageio.90"));
     }
 
     public Object setUserData(String key, Object data, UserDataHandler handler) {
-        throw new DOMException(DOMException.NOT_SUPPORTED_ERR, "Method not supported");
+        throw new DOMException(DOMException.NOT_SUPPORTED_ERR,
+                               Messages.getString("imageio.90"));
     }
 
     public Object getUserData(String key) {
-        throw new DOMException(DOMException.NOT_SUPPORTED_ERR, "Method not supported");
+        throw new DOMException(DOMException.NOT_SUPPORTED_ERR,
+                               Messages.getString("imageio.90"));
     }
 
     public Node item(int index) {
@@ -537,7 +554,8 @@ public class IIOMetadataNode implements 
         }
 
         public boolean isId() {
-            throw new DOMException(DOMException.NOT_SUPPORTED_ERR, "Method not supported");
+            throw new DOMException(DOMException.NOT_SUPPORTED_ERR,
+                                   Messages.getString("imageio.90"));
         }
 
         @Override
@@ -575,11 +593,13 @@ public class IIOMetadataNode implements 
         }
 
         public Node setNamedItem(Node arg) throws DOMException {
-            throw new DOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR, "This NamedNodeMap is read-only!");
+            throw new DOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR,
+                                   Messages.getString("imageio.91"));
         }
 
         public Node removeNamedItem(String name) throws DOMException {
-            throw new DOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR, "This NamedNodeMap is read-only!");
+            throw new DOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR,
+                                   Messages.getString("imageio.91"));
         }
 
         public Node getNamedItemNS(String namespaceURI, String localName) throws DOMException {
@@ -587,11 +607,13 @@ public class IIOMetadataNode implements 
         }
 
         public Node setNamedItemNS(Node arg) throws DOMException {
-            throw new DOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR, "This NamedNodeMap is read-only!");
+            throw new DOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR,
+                                   Messages.getString("imageio.91"));
         }
 
         public Node removeNamedItemNS(String namespaceURI, String localName) throws DOMException {
-            throw new DOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR, "This NamedNodeMap is read-only!");
+            throw new DOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR,
+                                   Messages.getString("imageio.91"));
         }
     }
 }

Modified: harmony/enhanced/trunk/classlib/modules/imageio/src/main/java/javax/imageio/plugins/jpeg/JPEGHuffmanTable.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/trunk/classlib/modules/imageio/src/main/java/javax/imageio/plugins/jpeg/JPEGHuffmanTable.java?rev=926835&r1=926834&r2=926835&view=diff
==============================================================================
--- harmony/enhanced/trunk/classlib/modules/imageio/src/main/java/javax/imageio/plugins/jpeg/JPEGHuffmanTable.java (original)
+++ harmony/enhanced/trunk/classlib/modules/imageio/src/main/java/javax/imageio/plugins/jpeg/JPEGHuffmanTable.java Tue Mar 23 22:55:42 2010
@@ -17,6 +17,8 @@
 
 package javax.imageio.plugins.jpeg;
 
+import org.apache.harmony.x.imageio.internal.nls.Messages;
+
 public class JPEGHuffmanTable {
     public static final JPEGHuffmanTable StdDCLuminance = new JPEGHuffmanTable(
             new short[] {0, 1, 5, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0},
@@ -85,25 +87,25 @@ public class JPEGHuffmanTable {
 
     public JPEGHuffmanTable(short[] lengths, short[] values) {
         if (lengths == null) {
-            throw new IllegalArgumentException("lengths array is null!");
+            throw new IllegalArgumentException(Messages.getString("imageio.44"));
         }
         if (values == null) {
-            throw new IllegalArgumentException("values array is null!");
+            throw new IllegalArgumentException(Messages.getString("imageio.45"));
         }
         if (lengths.length > 16) { // According to the spec
-            throw new IllegalArgumentException("lengths array is too long!");
+            throw new IllegalArgumentException(Messages.getString("imageio.46"));
         }
         if (values.length > 256) { // According to the spec
-            throw new IllegalArgumentException("values array is too long");
+            throw new IllegalArgumentException(Messages.getString("imageio.47"));
         }
         for (short length : lengths) {
             if (length < 0) {
-                throw new IllegalArgumentException("Values in lengths array must be non-negative.");
+                throw new IllegalArgumentException(Messages.getString("imageio.48"));
             }
         }
         for (short value : values) {
             if (value < 0) {
-                throw new IllegalArgumentException("Values in values array must be non-negative.");
+                throw new IllegalArgumentException(Messages.getString("imageio.49"));
             }
         }
 
@@ -134,13 +136,13 @@ public class JPEGHuffmanTable {
             numLeaves += length;
             possibleLeaves -= length;
             if (possibleLeaves < 0) {
-                throw new IllegalArgumentException("Invalid Huffman table provided, lengths are incorrect.");
+                throw new IllegalArgumentException(Messages.getString("imageio.4A"));
             }
             possibleLeaves <<= 1;
         }
 
         if (values.length != numLeaves) {
-            throw new IllegalArgumentException("Invalid Huffman table provided, sum of lengths != values.");
+            throw new IllegalArgumentException(Messages.getString("imageio.4B"));
         }
     }
 

Modified: harmony/enhanced/trunk/classlib/modules/imageio/src/main/java/javax/imageio/plugins/jpeg/JPEGImageReadParam.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/trunk/classlib/modules/imageio/src/main/java/javax/imageio/plugins/jpeg/JPEGImageReadParam.java?rev=926835&r1=926834&r2=926835&view=diff
==============================================================================
--- harmony/enhanced/trunk/classlib/modules/imageio/src/main/java/javax/imageio/plugins/jpeg/JPEGImageReadParam.java (original)
+++ harmony/enhanced/trunk/classlib/modules/imageio/src/main/java/javax/imageio/plugins/jpeg/JPEGImageReadParam.java Tue Mar 23 22:55:42 2010
@@ -18,6 +18,7 @@
 package javax.imageio.plugins.jpeg;
 
 import javax.imageio.ImageReadParam;
+import org.apache.harmony.x.imageio.internal.nls.Messages;
 
 public class JPEGImageReadParam extends ImageReadParam {
     private JPEGQTable qTables[];
@@ -37,13 +38,13 @@ public class JPEGImageReadParam extends 
             JPEGHuffmanTable[] ACHuffmanTables
     ) {
         if (qTables == null || DCHuffmanTables == null || ACHuffmanTables == null) {
-            throw new IllegalArgumentException("Invalid JPEG table arrays");
+            throw new IllegalArgumentException(Messages.getString("imageio.43"));
         }
         if(DCHuffmanTables.length != ACHuffmanTables.length) {
-            throw new IllegalArgumentException("Invalid JPEG table arrays");
+            throw new IllegalArgumentException(Messages.getString("imageio.43"));
         }
         if (qTables.length > 4 || DCHuffmanTables.length > 4) {
-            throw new IllegalArgumentException("Invalid JPEG table arrays");
+            throw new IllegalArgumentException(Messages.getString("imageio.43"));
         }
 
         // Do the shallow copy, it should be enough

Modified: harmony/enhanced/trunk/classlib/modules/imageio/src/main/java/javax/imageio/plugins/jpeg/JPEGImageWriteParam.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/trunk/classlib/modules/imageio/src/main/java/javax/imageio/plugins/jpeg/JPEGImageWriteParam.java?rev=926835&r1=926834&r2=926835&view=diff
==============================================================================
--- harmony/enhanced/trunk/classlib/modules/imageio/src/main/java/javax/imageio/plugins/jpeg/JPEGImageWriteParam.java (original)
+++ harmony/enhanced/trunk/classlib/modules/imageio/src/main/java/javax/imageio/plugins/jpeg/JPEGImageWriteParam.java Tue Mar 23 22:55:42 2010
@@ -21,6 +21,7 @@ import org.apache.harmony.x.imageio.plug
 
 import javax.imageio.ImageWriteParam;
 import java.util.Locale;
+import org.apache.harmony.x.imageio.internal.nls.Messages;
 
 public class JPEGImageWriteParam extends ImageWriteParam {
     private static final float[] COMP_QUALITY_VALUES = {0.05f, 0.75f, 0.95f};
@@ -58,13 +59,13 @@ public class JPEGImageWriteParam extends
             JPEGHuffmanTable[] ACHuffmanTables
     ) {
         if (qTables == null || DCHuffmanTables == null || ACHuffmanTables == null) {
-            throw new IllegalArgumentException("Invalid JPEG table arrays");
+            throw new IllegalArgumentException(Messages.getString("imageio.43"));
         }
         if(DCHuffmanTables.length != ACHuffmanTables.length) {
-            throw new IllegalArgumentException("Invalid JPEG table arrays");
+            throw new IllegalArgumentException(Messages.getString("imageio.43"));
         }
         if (qTables.length > 4 || DCHuffmanTables.length > 4) {
-            throw new IllegalArgumentException("Invalid JPEG table arrays");
+            throw new IllegalArgumentException(Messages.getString("imageio.43"));
         }
 
         // Do the shallow copy, it should be enough
@@ -114,7 +115,7 @@ public class JPEGImageWriteParam extends
     @Override
     public boolean isCompressionLossless() {
         if (getCompressionMode() != MODE_EXPLICIT) {
-            throw new IllegalStateException("Compression mode not MODE_EXPLICIT!");
+            throw new IllegalStateException(Messages.getString("imageio.36"));
         }
         return false;
     }
@@ -122,7 +123,7 @@ public class JPEGImageWriteParam extends
     @Override
     public void unsetCompression() {
         if (getCompressionMode() != MODE_EXPLICIT) {
-            throw new IllegalStateException("Compression mode not MODE_EXPLICIT!");
+            throw new IllegalStateException(Messages.getString("imageio.36"));
         }
         compressionQuality = JPEGConsts.DEFAULT_JPEG_COMPRESSION_QUALITY;
     }

Modified: harmony/enhanced/trunk/classlib/modules/imageio/src/main/java/javax/imageio/plugins/jpeg/JPEGQTable.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/trunk/classlib/modules/imageio/src/main/java/javax/imageio/plugins/jpeg/JPEGQTable.java?rev=926835&r1=926834&r2=926835&view=diff
==============================================================================
--- harmony/enhanced/trunk/classlib/modules/imageio/src/main/java/javax/imageio/plugins/jpeg/JPEGQTable.java (original)
+++ harmony/enhanced/trunk/classlib/modules/imageio/src/main/java/javax/imageio/plugins/jpeg/JPEGQTable.java Tue Mar 23 22:55:42 2010
@@ -19,6 +19,8 @@
  */
 package javax.imageio.plugins.jpeg;
 
+import org.apache.harmony.x.imageio.internal.nls.Messages;
+
 public class JPEGQTable {
 
     private final static int SIZE = 64;
@@ -63,10 +65,10 @@ public class JPEGQTable {
 
     public JPEGQTable(int[] table) {
         if (table == null) {
-            throw new IllegalArgumentException("table should not be NULL");
+            throw new IllegalArgumentException(Messages.getString("imageio.42"));
         }
         if (table.length != SIZE) {
-            throw new IllegalArgumentException("illegal table size: " + table.length);
+                throw new IllegalArgumentException(Messages.getString("imageio.93", table.length));
         }
         theTable = table.clone();
     }

Modified: harmony/enhanced/trunk/classlib/modules/imageio/src/main/java/javax/imageio/spi/IIOServiceProvider.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/trunk/classlib/modules/imageio/src/main/java/javax/imageio/spi/IIOServiceProvider.java?rev=926835&r1=926834&r2=926835&view=diff
==============================================================================
--- harmony/enhanced/trunk/classlib/modules/imageio/src/main/java/javax/imageio/spi/IIOServiceProvider.java (original)
+++ harmony/enhanced/trunk/classlib/modules/imageio/src/main/java/javax/imageio/spi/IIOServiceProvider.java Tue Mar 23 22:55:42 2010
@@ -22,6 +22,7 @@ package javax.imageio.spi;
 import java.util.Locale;
 
 import org.apache.harmony.luni.util.NotImplementedException;
+import org.apache.harmony.x.imageio.internal.nls.Messages;
 
 public abstract class IIOServiceProvider implements RegisterableService {
 
@@ -30,10 +31,10 @@ public abstract class IIOServiceProvider
 
     public IIOServiceProvider(String vendorName, String version) {
         if (vendorName == null) {
-            throw new NullPointerException("vendor name cannot be NULL");
+            throw new NullPointerException(Messages.getString("imageio.5A"));
         }
         if (version == null) {
-            throw new NullPointerException("version name cannot be NULL");
+            throw new NullPointerException(Messages.getString("imageio.5B"));
         }
         this.vendorName = vendorName;
         this.version = version;

Modified: harmony/enhanced/trunk/classlib/modules/imageio/src/main/java/javax/imageio/spi/ImageReaderSpi.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/trunk/classlib/modules/imageio/src/main/java/javax/imageio/spi/ImageReaderSpi.java?rev=926835&r1=926834&r2=926835&view=diff
==============================================================================
--- harmony/enhanced/trunk/classlib/modules/imageio/src/main/java/javax/imageio/spi/ImageReaderSpi.java (original)
+++ harmony/enhanced/trunk/classlib/modules/imageio/src/main/java/javax/imageio/spi/ImageReaderSpi.java Tue Mar 23 22:55:42 2010
@@ -25,6 +25,7 @@ import javax.imageio.ImageReader;
 import org.apache.harmony.luni.util.NotImplementedException;
 
 import java.io.IOException;
+import org.apache.harmony.x.imageio.internal.nls.Messages;
 
 public abstract class ImageReaderSpi extends ImageReaderWriterSpi {
 
@@ -59,7 +60,7 @@ public abstract class ImageReaderSpi ext
                 extraImageMetadataFormatNames, extraImageMetadataFormatClassNames);
 
         if (inputTypes == null || inputTypes.length == 0) {
-            throw new NullPointerException("input types array cannot be NULL or empty");
+            throw new NullPointerException(Messages.getString("imageio.5C"));
         }
         this.inputTypes = inputTypes;
         this.writerSpiNames = writerSpiNames;

Modified: harmony/enhanced/trunk/classlib/modules/imageio/src/main/java/javax/imageio/spi/ImageReaderWriterSpi.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/trunk/classlib/modules/imageio/src/main/java/javax/imageio/spi/ImageReaderWriterSpi.java?rev=926835&r1=926834&r2=926835&view=diff
==============================================================================
--- harmony/enhanced/trunk/classlib/modules/imageio/src/main/java/javax/imageio/spi/ImageReaderWriterSpi.java (original)
+++ harmony/enhanced/trunk/classlib/modules/imageio/src/main/java/javax/imageio/spi/ImageReaderWriterSpi.java Tue Mar 23 22:55:42 2010
@@ -22,6 +22,7 @@ package javax.imageio.spi;
 import org.apache.harmony.x.imageio.metadata.IIOMetadataUtils;
 
 import javax.imageio.metadata.IIOMetadataFormat;
+import org.apache.harmony.x.imageio.internal.nls.Messages;
 
 public abstract class ImageReaderWriterSpi extends IIOServiceProvider
         implements RegisterableService {
@@ -57,11 +58,11 @@ public abstract class ImageReaderWriterS
         super(vendorName, version);
 
         if (names == null || names.length == 0) {
-            throw new NullPointerException("format names array cannot be NULL or empty");
+            throw new NullPointerException(Messages.getString("imageio.57"));
         }
 
         if (pluginClassName == null) {
-            throw new NullPointerException("Plugin class name cannot be NULL");
+            throw new NullPointerException(Messages.getString("imageio.58"));
         }
 
         // We clone all the arrays to be consistent with the fact that

Modified: harmony/enhanced/trunk/classlib/modules/imageio/src/main/java/javax/imageio/spi/ImageWriterSpi.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/trunk/classlib/modules/imageio/src/main/java/javax/imageio/spi/ImageWriterSpi.java?rev=926835&r1=926834&r2=926835&view=diff
==============================================================================
--- harmony/enhanced/trunk/classlib/modules/imageio/src/main/java/javax/imageio/spi/ImageWriterSpi.java (original)
+++ harmony/enhanced/trunk/classlib/modules/imageio/src/main/java/javax/imageio/spi/ImageWriterSpi.java Tue Mar 23 22:55:42 2010
@@ -27,6 +27,7 @@ import org.apache.harmony.luni.util.NotI
 
 import java.awt.image.RenderedImage;
 import java.io.IOException;
+import org.apache.harmony.x.imageio.internal.nls.Messages;
 
 public abstract class ImageWriterSpi extends ImageReaderWriterSpi {
 
@@ -62,7 +63,7 @@ public abstract class ImageWriterSpi ext
                 extraImageMetadataFormatNames, extraImageMetadataFormatClassNames);
 
         if (outputTypes == null || outputTypes.length == 0) {
-            throw new NullPointerException("output types array cannot be NULL or empty");
+            throw new NullPointerException(Messages.getString("imageio.59"));
         }
 
         this.outputTypes = outputTypes;

Modified: harmony/enhanced/trunk/classlib/modules/imageio/src/main/java/javax/imageio/spi/ServiceRegistry.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/trunk/classlib/modules/imageio/src/main/java/javax/imageio/spi/ServiceRegistry.java?rev=926835&r1=926834&r2=926835&view=diff
==============================================================================
--- harmony/enhanced/trunk/classlib/modules/imageio/src/main/java/javax/imageio/spi/ServiceRegistry.java (original)
+++ harmony/enhanced/trunk/classlib/modules/imageio/src/main/java/javax/imageio/spi/ServiceRegistry.java Tue Mar 23 22:55:42 2010
@@ -23,6 +23,7 @@ import java.util.*;
 import java.util.Map.Entry;
 
 import org.apache.harmony.luni.util.NotImplementedException;
+import org.apache.harmony.x.imageio.internal.nls.Messages;
 
 /**
  * TODO: add all the methods from the spec
@@ -33,7 +34,7 @@ public class ServiceRegistry {
 
     public ServiceRegistry(Iterator<Class<?>> categoriesIterator) {
         if (null == categoriesIterator) {
-            throw new IllegalArgumentException("categories iterator should not be NULL");
+            throw new IllegalArgumentException(Messages.getString("imageio.5D"));
         }
         while(categoriesIterator.hasNext()) {
             Class<?> c =  categoriesIterator.next();
@@ -141,7 +142,7 @@ public class ServiceRegistry {
         Iterator<?> getProviders(Class<?> category, boolean useOrdering) {
             ProvidersMap providers = categories.get(category);
             if (null == providers) {
-                throw new IllegalArgumentException("Unknown category: " + category);
+                throw new IllegalArgumentException(Messages.getString("imageio.92", category));
             }
             return providers.getProviders(useOrdering);
         }
@@ -164,7 +165,7 @@ public class ServiceRegistry {
          */
         boolean addProvider(Object provider, Class<?> category) {
             if (provider == null) {
-                throw new IllegalArgumentException("provider should be != NULL");
+                throw new IllegalArgumentException(Messages.getString("imageio.5E"));
             }
 
             boolean rt;
@@ -185,7 +186,7 @@ public class ServiceRegistry {
             Object obj = categories.get(category);
 
             if (null == obj) {
-                throw new IllegalArgumentException("Unknown category: " + category);
+                throw new IllegalArgumentException(Messages.getString("imageio.92", category));
             }
 
             return ((ProvidersMap) obj).addProvider(provider);

Modified: harmony/enhanced/trunk/classlib/modules/imageio/src/main/java/javax/imageio/stream/FileCacheImageInputStream.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/trunk/classlib/modules/imageio/src/main/java/javax/imageio/stream/FileCacheImageInputStream.java?rev=926835&r1=926834&r2=926835&view=diff
==============================================================================
--- harmony/enhanced/trunk/classlib/modules/imageio/src/main/java/javax/imageio/stream/FileCacheImageInputStream.java (original)
+++ harmony/enhanced/trunk/classlib/modules/imageio/src/main/java/javax/imageio/stream/FileCacheImageInputStream.java Tue Mar 23 22:55:42 2010
@@ -19,6 +19,7 @@
 package javax.imageio.stream;
 
 import java.io.*;
+import org.apache.harmony.x.imageio.internal.nls.Messages;
 
 public class FileCacheImageInputStream extends ImageInputStreamImpl {
     private InputStream is;
@@ -28,7 +29,7 @@ public class FileCacheImageInputStream e
 
     public FileCacheImageInputStream(InputStream stream, File cacheDir) throws IOException {
         if (stream == null) {
-            throw new IllegalArgumentException("stream == null!");
+            throw new IllegalArgumentException(Messages.getString("imageio.0A"));
         }
         is = stream;
 
@@ -36,7 +37,7 @@ public class FileCacheImageInputStream e
             file = File.createTempFile(FileCacheImageOutputStream.IIO_TEMP_FILE_PREFIX, null, cacheDir);
             file.deleteOnExit();
         } else {
-            throw new IllegalArgumentException("Not a directory!");
+            throw new IllegalArgumentException(Messages.getString("imageio.0B"));
         }
 
         raf = new RandomAccessFile(file, "rw");

Modified: harmony/enhanced/trunk/classlib/modules/imageio/src/main/java/javax/imageio/stream/FileCacheImageOutputStream.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/trunk/classlib/modules/imageio/src/main/java/javax/imageio/stream/FileCacheImageOutputStream.java?rev=926835&r1=926834&r2=926835&view=diff
==============================================================================
--- harmony/enhanced/trunk/classlib/modules/imageio/src/main/java/javax/imageio/stream/FileCacheImageOutputStream.java (original)
+++ harmony/enhanced/trunk/classlib/modules/imageio/src/main/java/javax/imageio/stream/FileCacheImageOutputStream.java Tue Mar 23 22:55:42 2010
@@ -22,6 +22,7 @@ import java.io.IOException;
 import java.io.File;
 import java.io.OutputStream;
 import java.io.RandomAccessFile;
+import org.apache.harmony.x.imageio.internal.nls.Messages;
 
 public class FileCacheImageOutputStream extends ImageOutputStreamImpl {
     static final String IIO_TEMP_FILE_PREFIX = "iioCache";
@@ -33,7 +34,7 @@ public class FileCacheImageOutputStream 
 
     public FileCacheImageOutputStream(OutputStream stream, File cacheDir) throws IOException {
         if (stream == null) {
-            throw new IllegalArgumentException("stream == null!");
+            throw new IllegalArgumentException(Messages.getString("imageio.0A"));
         }
         os = stream;
 
@@ -41,7 +42,7 @@ public class FileCacheImageOutputStream 
             file = File.createTempFile(IIO_TEMP_FILE_PREFIX, null, cacheDir);
             file.deleteOnExit();
         } else {
-            throw new IllegalArgumentException("Not a directory!");
+            throw new IllegalArgumentException(Messages.getString("imageio.0B"));
         }
 
         raf = new RandomAccessFile(file, "rw");

Modified: harmony/enhanced/trunk/classlib/modules/imageio/src/main/java/javax/imageio/stream/FileImageInputStream.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/trunk/classlib/modules/imageio/src/main/java/javax/imageio/stream/FileImageInputStream.java?rev=926835&r1=926834&r2=926835&view=diff
==============================================================================
--- harmony/enhanced/trunk/classlib/modules/imageio/src/main/java/javax/imageio/stream/FileImageInputStream.java (original)
+++ harmony/enhanced/trunk/classlib/modules/imageio/src/main/java/javax/imageio/stream/FileImageInputStream.java Tue Mar 23 22:55:42 2010
@@ -22,6 +22,7 @@ import java.io.IOException;
 import java.io.RandomAccessFile;
 import java.io.File;
 import java.io.FileNotFoundException;
+import org.apache.harmony.x.imageio.internal.nls.Messages;
 
 public class FileImageInputStream extends ImageInputStreamImpl {
     RandomAccessFile raf;
@@ -29,7 +30,7 @@ public class FileImageInputStream extend
     @SuppressWarnings({"DuplicateThrows"})
     public FileImageInputStream(File f) throws FileNotFoundException, IOException {
         if (f == null) {
-            throw new IllegalArgumentException("f == null!");
+            throw new IllegalArgumentException(Messages.getString("imageio.08"));
         }
 
         raf = new RandomAccessFile(f, "r");
@@ -37,7 +38,7 @@ public class FileImageInputStream extend
 
     public FileImageInputStream(RandomAccessFile raf) {
         if (raf == null) {
-            throw new IllegalArgumentException("raf == null!");
+            throw new IllegalArgumentException(Messages.getString("imageio.09"));
         }
 
         this.raf = raf;

Modified: harmony/enhanced/trunk/classlib/modules/imageio/src/main/java/javax/imageio/stream/FileImageOutputStream.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/trunk/classlib/modules/imageio/src/main/java/javax/imageio/stream/FileImageOutputStream.java?rev=926835&r1=926834&r2=926835&view=diff
==============================================================================
--- harmony/enhanced/trunk/classlib/modules/imageio/src/main/java/javax/imageio/stream/FileImageOutputStream.java (original)
+++ harmony/enhanced/trunk/classlib/modules/imageio/src/main/java/javax/imageio/stream/FileImageOutputStream.java Tue Mar 23 22:55:42 2010
@@ -20,6 +20,7 @@
 package javax.imageio.stream;
 
 import java.io.*;
+import org.apache.harmony.x.imageio.internal.nls.Messages;
 
 public class FileImageOutputStream extends ImageOutputStreamImpl {
 
@@ -33,7 +34,7 @@ public class FileImageOutputStream exten
 
     public FileImageOutputStream(RandomAccessFile raf) {
         if (raf == null) {
-            throw new IllegalArgumentException("file should not be NULL");
+            throw new IllegalArgumentException(Messages.getString("imageio.0C"));
         }
         file = raf;
     }



Mime
View raw message