You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by hi...@apache.org on 2010/03/25 14:48:26 UTC

svn commit: r927401 [2/3] - in /harmony/enhanced/branches/java6: ./ classlib/ classlib/depends/libs/ classlib/make/ classlib/modules/archive/src/main/java/java/util/jar/ classlib/modules/archive/src/main/java/java/util/zip/ classlib/modules/archive/src...

Modified: harmony/enhanced/branches/java6/classlib/modules/imageio/src/main/java/javax/imageio/ImageWriter.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/branches/java6/classlib/modules/imageio/src/main/java/javax/imageio/ImageWriter.java?rev=927401&r1=927400&r2=927401&view=diff
==============================================================================
--- harmony/enhanced/branches/java6/classlib/modules/imageio/src/main/java/javax/imageio/ImageWriter.java (original)
+++ harmony/enhanced/branches/java6/classlib/modules/imageio/src/main/java/javax/imageio/ImageWriter.java Thu Mar 25 13:48:22 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/branches/java6/classlib/modules/imageio/src/main/java/javax/imageio/metadata/IIOMetadata.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/branches/java6/classlib/modules/imageio/src/main/java/javax/imageio/metadata/IIOMetadata.java?rev=927401&r1=927400&r2=927401&view=diff
==============================================================================
--- harmony/enhanced/branches/java6/classlib/modules/imageio/src/main/java/javax/imageio/metadata/IIOMetadata.java (original)
+++ harmony/enhanced/branches/java6/classlib/modules/imageio/src/main/java/javax/imageio/metadata/IIOMetadata.java Thu Mar 25 13:48:22 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/branches/java6/classlib/modules/imageio/src/main/java/javax/imageio/metadata/IIOMetadataFormatImpl.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/branches/java6/classlib/modules/imageio/src/main/java/javax/imageio/metadata/IIOMetadataFormatImpl.java?rev=927401&r1=927400&r2=927401&view=diff
==============================================================================
--- harmony/enhanced/branches/java6/classlib/modules/imageio/src/main/java/javax/imageio/metadata/IIOMetadataFormatImpl.java (original)
+++ harmony/enhanced/branches/java6/classlib/modules/imageio/src/main/java/javax/imageio/metadata/IIOMetadataFormatImpl.java Thu Mar 25 13:48:22 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/branches/java6/classlib/modules/imageio/src/main/java/javax/imageio/metadata/IIOMetadataNode.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/branches/java6/classlib/modules/imageio/src/main/java/javax/imageio/metadata/IIOMetadataNode.java?rev=927401&r1=927400&r2=927401&view=diff
==============================================================================
--- harmony/enhanced/branches/java6/classlib/modules/imageio/src/main/java/javax/imageio/metadata/IIOMetadataNode.java (original)
+++ harmony/enhanced/branches/java6/classlib/modules/imageio/src/main/java/javax/imageio/metadata/IIOMetadataNode.java Thu Mar 25 13:48:22 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/branches/java6/classlib/modules/imageio/src/main/java/javax/imageio/plugins/jpeg/JPEGHuffmanTable.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/branches/java6/classlib/modules/imageio/src/main/java/javax/imageio/plugins/jpeg/JPEGHuffmanTable.java?rev=927401&r1=927400&r2=927401&view=diff
==============================================================================
--- harmony/enhanced/branches/java6/classlib/modules/imageio/src/main/java/javax/imageio/plugins/jpeg/JPEGHuffmanTable.java (original)
+++ harmony/enhanced/branches/java6/classlib/modules/imageio/src/main/java/javax/imageio/plugins/jpeg/JPEGHuffmanTable.java Thu Mar 25 13:48:22 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/branches/java6/classlib/modules/imageio/src/main/java/javax/imageio/plugins/jpeg/JPEGImageReadParam.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/branches/java6/classlib/modules/imageio/src/main/java/javax/imageio/plugins/jpeg/JPEGImageReadParam.java?rev=927401&r1=927400&r2=927401&view=diff
==============================================================================
--- harmony/enhanced/branches/java6/classlib/modules/imageio/src/main/java/javax/imageio/plugins/jpeg/JPEGImageReadParam.java (original)
+++ harmony/enhanced/branches/java6/classlib/modules/imageio/src/main/java/javax/imageio/plugins/jpeg/JPEGImageReadParam.java Thu Mar 25 13:48:22 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/branches/java6/classlib/modules/imageio/src/main/java/javax/imageio/plugins/jpeg/JPEGImageWriteParam.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/branches/java6/classlib/modules/imageio/src/main/java/javax/imageio/plugins/jpeg/JPEGImageWriteParam.java?rev=927401&r1=927400&r2=927401&view=diff
==============================================================================
--- harmony/enhanced/branches/java6/classlib/modules/imageio/src/main/java/javax/imageio/plugins/jpeg/JPEGImageWriteParam.java (original)
+++ harmony/enhanced/branches/java6/classlib/modules/imageio/src/main/java/javax/imageio/plugins/jpeg/JPEGImageWriteParam.java Thu Mar 25 13:48:22 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/branches/java6/classlib/modules/imageio/src/main/java/javax/imageio/plugins/jpeg/JPEGQTable.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/branches/java6/classlib/modules/imageio/src/main/java/javax/imageio/plugins/jpeg/JPEGQTable.java?rev=927401&r1=927400&r2=927401&view=diff
==============================================================================
--- harmony/enhanced/branches/java6/classlib/modules/imageio/src/main/java/javax/imageio/plugins/jpeg/JPEGQTable.java (original)
+++ harmony/enhanced/branches/java6/classlib/modules/imageio/src/main/java/javax/imageio/plugins/jpeg/JPEGQTable.java Thu Mar 25 13:48:22 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/branches/java6/classlib/modules/imageio/src/main/java/javax/imageio/spi/IIOServiceProvider.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/branches/java6/classlib/modules/imageio/src/main/java/javax/imageio/spi/IIOServiceProvider.java?rev=927401&r1=927400&r2=927401&view=diff
==============================================================================
--- harmony/enhanced/branches/java6/classlib/modules/imageio/src/main/java/javax/imageio/spi/IIOServiceProvider.java (original)
+++ harmony/enhanced/branches/java6/classlib/modules/imageio/src/main/java/javax/imageio/spi/IIOServiceProvider.java Thu Mar 25 13:48:22 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/branches/java6/classlib/modules/imageio/src/main/java/javax/imageio/spi/ImageReaderSpi.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/branches/java6/classlib/modules/imageio/src/main/java/javax/imageio/spi/ImageReaderSpi.java?rev=927401&r1=927400&r2=927401&view=diff
==============================================================================
--- harmony/enhanced/branches/java6/classlib/modules/imageio/src/main/java/javax/imageio/spi/ImageReaderSpi.java (original)
+++ harmony/enhanced/branches/java6/classlib/modules/imageio/src/main/java/javax/imageio/spi/ImageReaderSpi.java Thu Mar 25 13:48:22 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/branches/java6/classlib/modules/imageio/src/main/java/javax/imageio/spi/ImageReaderWriterSpi.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/branches/java6/classlib/modules/imageio/src/main/java/javax/imageio/spi/ImageReaderWriterSpi.java?rev=927401&r1=927400&r2=927401&view=diff
==============================================================================
--- harmony/enhanced/branches/java6/classlib/modules/imageio/src/main/java/javax/imageio/spi/ImageReaderWriterSpi.java (original)
+++ harmony/enhanced/branches/java6/classlib/modules/imageio/src/main/java/javax/imageio/spi/ImageReaderWriterSpi.java Thu Mar 25 13:48:22 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/branches/java6/classlib/modules/imageio/src/main/java/javax/imageio/spi/ImageWriterSpi.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/branches/java6/classlib/modules/imageio/src/main/java/javax/imageio/spi/ImageWriterSpi.java?rev=927401&r1=927400&r2=927401&view=diff
==============================================================================
--- harmony/enhanced/branches/java6/classlib/modules/imageio/src/main/java/javax/imageio/spi/ImageWriterSpi.java (original)
+++ harmony/enhanced/branches/java6/classlib/modules/imageio/src/main/java/javax/imageio/spi/ImageWriterSpi.java Thu Mar 25 13:48:22 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/branches/java6/classlib/modules/imageio/src/main/java/javax/imageio/spi/ServiceRegistry.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/branches/java6/classlib/modules/imageio/src/main/java/javax/imageio/spi/ServiceRegistry.java?rev=927401&r1=927400&r2=927401&view=diff
==============================================================================
--- harmony/enhanced/branches/java6/classlib/modules/imageio/src/main/java/javax/imageio/spi/ServiceRegistry.java (original)
+++ harmony/enhanced/branches/java6/classlib/modules/imageio/src/main/java/javax/imageio/spi/ServiceRegistry.java Thu Mar 25 13:48:22 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/branches/java6/classlib/modules/imageio/src/main/java/javax/imageio/stream/FileCacheImageInputStream.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/branches/java6/classlib/modules/imageio/src/main/java/javax/imageio/stream/FileCacheImageInputStream.java?rev=927401&r1=927400&r2=927401&view=diff
==============================================================================
--- harmony/enhanced/branches/java6/classlib/modules/imageio/src/main/java/javax/imageio/stream/FileCacheImageInputStream.java (original)
+++ harmony/enhanced/branches/java6/classlib/modules/imageio/src/main/java/javax/imageio/stream/FileCacheImageInputStream.java Thu Mar 25 13:48:22 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/branches/java6/classlib/modules/imageio/src/main/java/javax/imageio/stream/FileCacheImageOutputStream.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/branches/java6/classlib/modules/imageio/src/main/java/javax/imageio/stream/FileCacheImageOutputStream.java?rev=927401&r1=927400&r2=927401&view=diff
==============================================================================
--- harmony/enhanced/branches/java6/classlib/modules/imageio/src/main/java/javax/imageio/stream/FileCacheImageOutputStream.java (original)
+++ harmony/enhanced/branches/java6/classlib/modules/imageio/src/main/java/javax/imageio/stream/FileCacheImageOutputStream.java Thu Mar 25 13:48:22 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/branches/java6/classlib/modules/imageio/src/main/java/javax/imageio/stream/FileImageInputStream.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/branches/java6/classlib/modules/imageio/src/main/java/javax/imageio/stream/FileImageInputStream.java?rev=927401&r1=927400&r2=927401&view=diff
==============================================================================
--- harmony/enhanced/branches/java6/classlib/modules/imageio/src/main/java/javax/imageio/stream/FileImageInputStream.java (original)
+++ harmony/enhanced/branches/java6/classlib/modules/imageio/src/main/java/javax/imageio/stream/FileImageInputStream.java Thu Mar 25 13:48:22 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/branches/java6/classlib/modules/imageio/src/main/java/javax/imageio/stream/FileImageOutputStream.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/branches/java6/classlib/modules/imageio/src/main/java/javax/imageio/stream/FileImageOutputStream.java?rev=927401&r1=927400&r2=927401&view=diff
==============================================================================
--- harmony/enhanced/branches/java6/classlib/modules/imageio/src/main/java/javax/imageio/stream/FileImageOutputStream.java (original)
+++ harmony/enhanced/branches/java6/classlib/modules/imageio/src/main/java/javax/imageio/stream/FileImageOutputStream.java Thu Mar 25 13:48:22 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;
     }

Modified: harmony/enhanced/branches/java6/classlib/modules/imageio/src/main/java/javax/imageio/stream/ImageInputStreamImpl.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/branches/java6/classlib/modules/imageio/src/main/java/javax/imageio/stream/ImageInputStreamImpl.java?rev=927401&r1=927400&r2=927401&view=diff
==============================================================================
--- harmony/enhanced/branches/java6/classlib/modules/imageio/src/main/java/javax/imageio/stream/ImageInputStreamImpl.java (original)
+++ harmony/enhanced/branches/java6/classlib/modules/imageio/src/main/java/javax/imageio/stream/ImageInputStreamImpl.java Thu Mar 25 13:48:22 2010
@@ -22,6 +22,7 @@ import java.io.IOException;
 import java.nio.ByteOrder;
 
 import org.apache.harmony.luni.util.Util;
+import org.apache.harmony.x.imageio.internal.nls.Messages;
 
 public abstract class ImageInputStreamImpl implements ImageInputStream {
 
@@ -41,7 +42,7 @@ public abstract class ImageInputStreamIm
 
 	protected final void checkClosed() throws IOException {
 		if (closed) {
-			throw new IOException("stream is closed");
+			throw new IOException(Messages.getString("imageio.0D"));
 		}
 	}
 
@@ -63,7 +64,7 @@ public abstract class ImageInputStreamIm
 
 	public void readBytes(IIOByteBuffer buf, int len) throws IOException {
 		if (buf == null) {
-			throw new NullPointerException("buffer is NULL");
+			throw new NullPointerException(Messages.getString("imageio.0E"));
 		}
 
 		byte[] b = new byte[len];
@@ -77,7 +78,7 @@ public abstract class ImageInputStreamIm
 	public boolean readBoolean() throws IOException {
 		int b = read();
 		if (b < 0) {
-			throw new EOFException("EOF reached");
+			throw new EOFException(Messages.getString("imageio.0F"));
 		}
 		return b != 0;
 	}
@@ -85,7 +86,7 @@ public abstract class ImageInputStreamIm
 	public byte readByte() throws IOException {
 		int b = read();
 		if (b < 0) {
-			throw new EOFException("EOF reached");
+			throw new EOFException(Messages.getString("imageio.0F"));
 		}
 		return (byte) b;
 	}
@@ -93,7 +94,7 @@ public abstract class ImageInputStreamIm
 	public int readUnsignedByte() throws IOException {
 		int b = read();
 		if (b < 0) {
-			throw new EOFException("EOF reached");
+			throw new EOFException(Messages.getString("imageio.0F"));
 		}
 		return b;
 	}
@@ -350,7 +351,7 @@ public abstract class ImageInputStreamIm
 		checkClosed();
 		if (pos < getFlushedPosition()) {
 			throw new IllegalArgumentException(
-					"trying to seek before flushed pos");
+					Messages.getString("imageio.10"));
 		}
 		bitOffset = 0;
 		streamPos = pos;
@@ -361,7 +362,7 @@ public abstract class ImageInputStreamIm
 			posStack.push(getStreamPosition());
 		} catch (IOException e) {
 			e.printStackTrace();
-			throw new RuntimeException("Stream marking error");
+			throw new RuntimeException(Messages.getString("imageio.11"));
 		}
 	}
 
@@ -371,7 +372,7 @@ public abstract class ImageInputStreamIm
 			long p = posStack.pop();
 			if (p < flushedPos) {
 				throw new IOException(
-						"marked position lies in the flushed portion of the stream");
+						Messages.getString("imageio.12"));
 			}
 			seek(p);
 		}
@@ -380,11 +381,11 @@ public abstract class ImageInputStreamIm
 	public void flushBefore(long pos) throws IOException {
 		if (pos > getStreamPosition()) {
 			throw new IndexOutOfBoundsException(
-					"Trying to flush outside of current position");
+					Messages.getString("imageio.13"));
 		}
 		if (pos < flushedPos) {
 			throw new IndexOutOfBoundsException(
-					"Trying to flush within already flushed portion");
+					Messages.getString("imageio.14"));
 		}
 		flushedPos = pos;
 		// -- TODO implement

Modified: harmony/enhanced/branches/java6/classlib/modules/imageio/src/main/java/javax/imageio/stream/MemoryCacheImageInputStream.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/branches/java6/classlib/modules/imageio/src/main/java/javax/imageio/stream/MemoryCacheImageInputStream.java?rev=927401&r1=927400&r2=927401&view=diff
==============================================================================
--- harmony/enhanced/branches/java6/classlib/modules/imageio/src/main/java/javax/imageio/stream/MemoryCacheImageInputStream.java (original)
+++ harmony/enhanced/branches/java6/classlib/modules/imageio/src/main/java/javax/imageio/stream/MemoryCacheImageInputStream.java Thu Mar 25 13:48:22 2010
@@ -22,6 +22,7 @@ import org.apache.harmony.x.imageio.stre
 
 import java.io.IOException;
 import java.io.InputStream;
+import org.apache.harmony.x.imageio.internal.nls.Messages;
 
 public class MemoryCacheImageInputStream  extends ImageInputStreamImpl {
     private InputStream is;
@@ -29,7 +30,7 @@ public class MemoryCacheImageInputStream
 
     public MemoryCacheImageInputStream(InputStream stream) {
         if (stream == null) {
-            throw new IllegalArgumentException("stream == null!");
+            throw new IllegalArgumentException(Messages.getString("imageio.0A"));
         }
         is = stream;
     }

Modified: harmony/enhanced/branches/java6/classlib/modules/imageio/src/main/java/javax/imageio/stream/MemoryCacheImageOutputStream.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/branches/java6/classlib/modules/imageio/src/main/java/javax/imageio/stream/MemoryCacheImageOutputStream.java?rev=927401&r1=927400&r2=927401&view=diff
==============================================================================
--- harmony/enhanced/branches/java6/classlib/modules/imageio/src/main/java/javax/imageio/stream/MemoryCacheImageOutputStream.java (original)
+++ harmony/enhanced/branches/java6/classlib/modules/imageio/src/main/java/javax/imageio/stream/MemoryCacheImageOutputStream.java Thu Mar 25 13:48:22 2010
@@ -22,6 +22,7 @@ import org.apache.harmony.x.imageio.stre
 
 import java.io.OutputStream;
 import java.io.IOException;
+import org.apache.harmony.x.imageio.internal.nls.Messages;
 
 public class MemoryCacheImageOutputStream extends ImageOutputStreamImpl {
     OutputStream os;
@@ -29,7 +30,7 @@ public class MemoryCacheImageOutputStrea
 
     public MemoryCacheImageOutputStream(OutputStream stream) {
         if (stream == null) {
-            throw new IllegalArgumentException("stream == null!");
+            throw new IllegalArgumentException(Messages.getString("imageio.0A"));
         }
         os = stream;
     }

Modified: harmony/enhanced/branches/java6/classlib/modules/imageio/src/main/java/org/apache/harmony/x/imageio/internal/nls/messages.properties
URL: http://svn.apache.org/viewvc/harmony/enhanced/branches/java6/classlib/modules/imageio/src/main/java/org/apache/harmony/x/imageio/internal/nls/messages.properties?rev=927401&r1=927400&r2=927401&view=diff
==============================================================================
--- harmony/enhanced/branches/java6/classlib/modules/imageio/src/main/java/org/apache/harmony/x/imageio/internal/nls/messages.properties (original)
+++ harmony/enhanced/branches/java6/classlib/modules/imageio/src/main/java/org/apache/harmony/x/imageio/internal/nls/messages.properties Thu Mar 25 13:48:22 2010
@@ -22,3 +22,145 @@ imageio.4={0} {1} {2}
 imageio.5="{0}" value expected for "{1}"
 imageio.6="{0}" is empty
 imageio.7="{0}" is not supported
+imageio.08=f == null!
+imageio.09=raf == null!
+imageio.0A=stream == null!
+imageio.0B=Not a directory!
+imageio.0C=file should not be NULL
+imageio.0D=stream is closed
+imageio.0E=buffer is NULL
+imageio.0F=EOF reached
+imageio.10=trying to seek before flushed pos
+imageio.11=Stream marking error
+imageio.12=marked position lies in the flushed portion of the stream
+imageio.13=Trying to flush outside of current position
+imageio.14=Trying to flush within already flushed portion
+imageio.15=x < 0
+imageio.16=y < 0
+imageio.17=width <= 0
+imageio.18=height <= 0
+imageio.19=width <= subsamplingXOffset
+imageio.1A=height <= subsamplingXOffset
+imageio.1B=sourceXSubsampling <= 0
+imageio.1C=sourceYSubsampling <= 0
+imageio.1D=subsamplingXOffset is wrong
+imageio.1E=subsamplingYOffset is wrong
+imageio.1F=there are no pixels in region
+imageio.20=negative value
+imageio.21=duplicate value
+imageio.22=destinationOffset == null!
+imageio.23=controller wasn't set
+imageio.24=color model should not be NULL
+imageio.25=sample model should not be NULL
+imageio.26=color and sample models are not compatible
+imageio.27=image should not be NULL
+imageio.28=width * height > Integer.MAX_VALUE
+imageio.29=can't set source renderer size
+imageio.2A=warning message should not be NULL
+imageio.2B=baseName == null!
+imageio.2C=keyword == null!
+imageio.2D=Bundle not found!
+imageio.2E=Resource is missing!
+imageio.2F=Resource is not a String!
+imageio.30=getOutput() == null!
+imageio.31=Unsupported write variant!
+imageio.32=Invalid locale!
+imageio.33=progressive mode is not supported
+imageio.34=mode is not supported
+imageio.35=Compression not supported.
+imageio.36=Compression mode not MODE_EXPLICIT!
+imageio.37=No compression type set!
+imageio.38=Quality out-of-bounds!
+imageio.39=Tiling not supported!
+imageio.3A=Tiling mode not MODE_EXPLICIT!
+imageio.3B=Tiling parameters not set!
+imageio.3C=Illegal value for mode!
+imageio.3D=No settable compression types
+imageio.3E=Unknown compression type!
+imageio.3F=Can't offset tiles!
+imageio.40=tile dimensions are non-positive!
+imageio.41=Illegal tile size!
+imageio.42=table should not be NULL
+imageio.43=Invalid JPEG table arrays
+imageio.44=lengths array is null!
+imageio.45=values array is null!
+imageio.46=lengths array is too long!
+imageio.47=values array is too long
+imageio.48=Values in lengths array must be non-negative.
+imageio.49=Values in values array must be non-negative.
+imageio.4A=Invalid Huffman table provided, lengths are incorrect.
+imageio.4B=Invalid Huffman table provided, sum of lengths != values.
+imageio.4C=input source cannot be NULL
+imageio.4D=output destination cannot be NULL
+imageio.4E=input cannot be NULL
+imageio.4F=format name cannot be NULL
+imageio.50=suffix cannot be NULL
+imageio.51=type cannot be NULL
+imageio.52=input == null!
+imageio.53=image cannot be NULL
+imageio.54=output cannot be NULL
+imageio.55=MIMEType cannot be NULL
+imageio.56=Use deregisterServiceprovider instead of Iterator.remove()
+imageio.57=format names array cannot be NULL or empty
+imageio.58=Plugin class name cannot be NULL
+imageio.59=output types array cannot be NULL or empty
+imageio.5A=vendor name cannot be NULL
+imageio.5B=version name cannot be NULL
+imageio.5C=input types array cannot be NULL or empty
+imageio.5D=categories iterator should not be NULL
+imageio.5E=provider should be != NULL
+imageio.5F=raster should not be NULL
+imageio.60=no thumbnails were set
+imageio.61=newChild == null!
+imageio.62=oldChild == null!
+imageio.63=rootName is null
+imageio.64=childPolicy is not one of the predefined constants
+imageio.65=minChildren < 0!
+imageio.66=minChildren > maxChildren!
+imageio.67=attrName == null!
+imageio.68=Invalid value for dataType!
+imageio.69=Invalid list bounds!
+imageio.6A=enumeratedValues is empty or null
+imageio.6B=enumeratedValues contains a null!
+imageio.6C=enumeratedValues contains a non-String value!
+imageio.6D=enumeratedValues contains a value not of class classType!
+imageio.6E=Attribute is not an enumeration!
+imageio.6F=Attribute is not a list!
+imageio.70=Attribute is not a range!
+imageio.71=Child policy is not CHILD_POLICY_REPEAT!
+imageio.72=Not a list!
+imageio.73=Not an enumeration!
+imageio.74=Not a range!
+imageio.75=resourceBaseName == null!
+imageio.76=No object within element
+imageio.77=extraMetadataFormatNames == null && extraMetadataFormatClassNames != null!
+imageio.78=extraMetadataFormatNames != null && extraMetadataFormatClassNames == null!
+imageio.79=extraMetadataFormatNames.length == 0!
+imageio.7A=extraMetadataFormatClassNames.length != extraMetadataFormatNames.length!
+imageio.7B=hasController() == false!
+imageio.7C=seek position is negative
+imageio.7D=Argument out of cache
+imageio.7E=The requested data are already disposed
+imageio.7F=ios == null
+imageio.80=IndexColorModel is not supported yet
+imageio.81=Output not been set
+imageio.82=Image equals null
+imageio.83=Can't write raster
+imageio.84=input is not an instance of java.io.File
+imageio.85=Output is not an instance of OutputStream
+imageio.86=output is not instance of File
+imageio.87=output is not instance of java.io.RandomAccessFile
+imageio.88=Output is not an instance of InputStream
+imageio.89=formatName == null!
+imageio.8A=Unsupported format name
+imageio.8B=Can't obtain format
+imageio.8C=element name is null or no such element: {0}
+imageio.8D=attribute name is null or no such attribute: {0}
+imageio.8E=Attribute is already in use
+imageio.8F=No such attribute
+imageio.90=Method not supported
+imageio.91=This NamedNodeMap is read-only
+imageio.92=Unknown category: {0}
+imageio.93=Illegal table size: {0}
+imageio.94=Output {0} is not supported
+imageio.95=Input is not an instance of java.io.RandomAccessFile

Modified: harmony/enhanced/branches/java6/classlib/modules/imageio/src/main/java/org/apache/harmony/x/imageio/metadata/IIOMetadataUtils.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/branches/java6/classlib/modules/imageio/src/main/java/org/apache/harmony/x/imageio/metadata/IIOMetadataUtils.java?rev=927401&r1=927400&r2=927401&view=diff
==============================================================================
--- harmony/enhanced/branches/java6/classlib/modules/imageio/src/main/java/org/apache/harmony/x/imageio/metadata/IIOMetadataUtils.java (original)
+++ harmony/enhanced/branches/java6/classlib/modules/imageio/src/main/java/org/apache/harmony/x/imageio/metadata/IIOMetadataUtils.java Thu Mar 25 13:48:22 2010
@@ -24,6 +24,7 @@ import java.security.PrivilegedAction;
 
 import javax.imageio.metadata.IIOMetadataFormat;
 import javax.imageio.metadata.IIOMetadataFormatImpl;
+import org.apache.harmony.x.imageio.internal.nls.Messages;
 
 public class IIOMetadataUtils {
     private IIOMetadataUtils() {} 
@@ -34,7 +35,7 @@ public class IIOMetadataUtils {
             String [] extraMetadataFormatNames, String [] extraMetadataFormatClassNames
     ) {
         if (formatName == null) {
-            throw new IllegalArgumentException("formatName == null!");
+            throw new IllegalArgumentException(Messages.getString("imageio.89"));
         }
         if (formatName.equals(IIOMetadataFormatImpl.standardMetadataFormatName)) {
             if (standardFormatSupported) {
@@ -56,7 +57,7 @@ public class IIOMetadataUtils {
         }
 
         if (className == null) {
-            throw new IllegalArgumentException("Unsupported format name");
+            throw new IllegalArgumentException(Messages.getString("imageio.8A"));
         }
 
         // Get the context class loader and try to use it first
@@ -76,7 +77,7 @@ public class IIOMetadataUtils {
                 // Use current class loader
                 cls = Class.forName(className);
             } catch (ClassNotFoundException e1) {
-                throw new IllegalStateException ("Can't obtain format");
+                throw new IllegalStateException (Messages.getString("imageio.8B"));
             }
         }
 
@@ -84,7 +85,7 @@ public class IIOMetadataUtils {
             Method getInstance = cls.getMethod("getInstance");
             return (IIOMetadataFormat) getInstance.invoke(null);
         } catch (Exception e) {
-            IllegalStateException e1 = new IllegalStateException("Can't obtain format");
+            IllegalStateException e1 = new IllegalStateException(Messages.getString("imageio.8B"));
             e1.initCause(e); // Add some details to the message
             throw e1;
         }

Modified: harmony/enhanced/branches/java6/classlib/modules/imageio/src/main/java/org/apache/harmony/x/imageio/plugins/ImageType.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/branches/java6/classlib/modules/imageio/src/main/java/org/apache/harmony/x/imageio/plugins/ImageType.java?rev=927401&r1=927400&r2=927401&view=diff
==============================================================================
--- harmony/enhanced/branches/java6/classlib/modules/imageio/src/main/java/org/apache/harmony/x/imageio/plugins/ImageType.java (original)
+++ harmony/enhanced/branches/java6/classlib/modules/imageio/src/main/java/org/apache/harmony/x/imageio/plugins/ImageType.java Thu Mar 25 13:48:22 2010
@@ -28,7 +28,7 @@ public enum ImageType {
                         new String[] { "image/gif" }),
         @SuppressWarnings("nls")
         PNG(new String[] { "png", "PNG" }, new String[] { "png" },
-                        new String[] { "image/png" });
+                        new String[] { "image/png", "image/x-png" });
 
     private final String names[];
     private final String suffixes[];

Modified: harmony/enhanced/branches/java6/classlib/modules/imageio/src/main/java/org/apache/harmony/x/imageio/plugins/jpeg/JPEGImageWriter.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/branches/java6/classlib/modules/imageio/src/main/java/org/apache/harmony/x/imageio/plugins/jpeg/JPEGImageWriter.java?rev=927401&r1=927400&r2=927401&view=diff
==============================================================================
--- harmony/enhanced/branches/java6/classlib/modules/imageio/src/main/java/org/apache/harmony/x/imageio/plugins/jpeg/JPEGImageWriter.java (original)
+++ harmony/enhanced/branches/java6/classlib/modules/imageio/src/main/java/org/apache/harmony/x/imageio/plugins/jpeg/JPEGImageWriter.java Thu Mar 25 13:48:22 2010
@@ -34,6 +34,7 @@ import java.io.IOException;
 import java.awt.image.*;
 import java.awt.*;
 import java.awt.color.ColorSpace;
+import org.apache.harmony.x.imageio.internal.nls.Messages;
 
 /**
  * @author Rustem V. Rafikov
@@ -70,7 +71,7 @@ public class JPEGImageWriter extends Ima
             throws IOException {
 
         if (ios == null) {
-            throw new IllegalArgumentException("ios == null");
+            throw new IllegalArgumentException(Messages.getString("imageio.7F"));
         }
 
         RenderedImage img = null;
@@ -276,7 +277,7 @@ public class JPEGImageWriter extends Ima
 
         if (cm instanceof IndexColorModel) {
             // TODO: implement
-            throw new UnsupportedOperationException("IndexColorModel is not supported yet");
+            throw new UnsupportedOperationException(Messages.getString("imageio.80"));
         }
 
         boolean hasAlpha = cm.hasAlpha();

Modified: harmony/enhanced/branches/java6/classlib/modules/imageio/src/main/java/org/apache/harmony/x/imageio/plugins/png/PNGImageWriter.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/branches/java6/classlib/modules/imageio/src/main/java/org/apache/harmony/x/imageio/plugins/png/PNGImageWriter.java?rev=927401&r1=927400&r2=927401&view=diff
==============================================================================
--- harmony/enhanced/branches/java6/classlib/modules/imageio/src/main/java/org/apache/harmony/x/imageio/plugins/png/PNGImageWriter.java (original)
+++ harmony/enhanced/branches/java6/classlib/modules/imageio/src/main/java/org/apache/harmony/x/imageio/plugins/png/PNGImageWriter.java Thu Mar 25 13:48:22 2010
@@ -39,6 +39,7 @@ import javax.imageio.stream.ImageOutputS
 import org.apache.harmony.x.imageio.internal.nls.Messages;
 
 import org.apache.harmony.luni.util.NotImplementedException;
+import org.apache.harmony.x.imageio.internal.nls.Messages;
 
 public class PNGImageWriter extends ImageWriter {
     private static int[][] BAND_OFFSETS = {
@@ -100,13 +101,13 @@ public class PNGImageWriter extends Imag
     @Override
     public void write(IIOMetadata streamMetadata, IIOImage iioimage, ImageWriteParam param) throws IOException {
         if (output == null) {
-            throw new IllegalStateException("Output not been set");
+            throw new IllegalStateException(Messages.getString("imageio.81"));
         }
         if (iioimage == null) {
-            throw new IllegalArgumentException("Image equals null");
+            throw new IllegalArgumentException(Messages.getString("imageio.82"));
         }
         if (iioimage.hasRaster() && !canWriteRasters()) {
-            throw new UnsupportedOperationException("Can't write raster");
+            throw new UnsupportedOperationException(Messages.getString("imageio.83"));
         }// ImageOutputStreamImpl
 
         int imageWidth, imageHeight;

Modified: harmony/enhanced/branches/java6/classlib/modules/imageio/src/main/java/org/apache/harmony/x/imageio/spi/FileIISSpi.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/branches/java6/classlib/modules/imageio/src/main/java/org/apache/harmony/x/imageio/spi/FileIISSpi.java?rev=927401&r1=927400&r2=927401&view=diff
==============================================================================
--- harmony/enhanced/branches/java6/classlib/modules/imageio/src/main/java/org/apache/harmony/x/imageio/spi/FileIISSpi.java (original)
+++ harmony/enhanced/branches/java6/classlib/modules/imageio/src/main/java/org/apache/harmony/x/imageio/spi/FileIISSpi.java Thu Mar 25 13:48:22 2010
@@ -26,6 +26,7 @@ import javax.imageio.stream.FileImageInp
 import java.io.File;
 import java.io.IOException;
 import java.util.Locale;
+import org.apache.harmony.x.imageio.internal.nls.Messages;
 
 public class FileIISSpi extends ImageInputStreamSpi {
     private static final String vendor = "Apache";
@@ -42,7 +43,7 @@ public class FileIISSpi extends ImageInp
         if (File.class.isInstance(input)) {
             return new FileImageInputStream((File) input);
         }
-        throw new IllegalArgumentException("input is not an instance of java.io.File");
+        throw new IllegalArgumentException(Messages.getString("imageio.84"));
     }
 
     @Override

Modified: harmony/enhanced/branches/java6/classlib/modules/imageio/src/main/java/org/apache/harmony/x/imageio/spi/FileIOSSpi.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/branches/java6/classlib/modules/imageio/src/main/java/org/apache/harmony/x/imageio/spi/FileIOSSpi.java?rev=927401&r1=927400&r2=927401&view=diff
==============================================================================
--- harmony/enhanced/branches/java6/classlib/modules/imageio/src/main/java/org/apache/harmony/x/imageio/spi/FileIOSSpi.java (original)
+++ harmony/enhanced/branches/java6/classlib/modules/imageio/src/main/java/org/apache/harmony/x/imageio/spi/FileIOSSpi.java Thu Mar 25 13:48:22 2010
@@ -25,6 +25,7 @@ import javax.imageio.stream.FileImageOut
 import java.io.File;
 import java.io.IOException;
 import java.util.Locale;
+import org.apache.harmony.x.imageio.internal.nls.Messages;
 
 public class FileIOSSpi extends ImageOutputStreamSpi {
     private static final String vendor = "Apache";
@@ -41,7 +42,7 @@ public class FileIOSSpi extends ImageOut
         if (output instanceof File) {
             return new FileImageOutputStream((File) output);
         }
-        throw new IllegalArgumentException("output is not instance of File");
+        throw new IllegalArgumentException(Messages.getString("imageio.86"));
     }
 
     @Override

Modified: harmony/enhanced/branches/java6/classlib/modules/imageio/src/main/java/org/apache/harmony/x/imageio/spi/InputStreamIISSpi.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/branches/java6/classlib/modules/imageio/src/main/java/org/apache/harmony/x/imageio/spi/InputStreamIISSpi.java?rev=927401&r1=927400&r2=927401&view=diff
==============================================================================
--- harmony/enhanced/branches/java6/classlib/modules/imageio/src/main/java/org/apache/harmony/x/imageio/spi/InputStreamIISSpi.java (original)
+++ harmony/enhanced/branches/java6/classlib/modules/imageio/src/main/java/org/apache/harmony/x/imageio/spi/InputStreamIISSpi.java Thu Mar 25 13:48:22 2010
@@ -25,6 +25,7 @@ import java.io.File;
 import java.io.IOException;
 import java.io.InputStream;
 import java.util.Locale;
+import org.apache.harmony.x.imageio.internal.nls.Messages;
 
 public class InputStreamIISSpi  extends ImageInputStreamSpi {
     private static final String vendor = "Apache";
@@ -54,6 +55,6 @@ public class InputStreamIISSpi  extends 
                 return new MemoryCacheImageInputStream((InputStream) input);
             }
         }
-        throw new IllegalArgumentException("Output is not an instance of InputStream");
+        throw new IllegalArgumentException(Messages.getString("imageio.88"));
     }
 }

Modified: harmony/enhanced/branches/java6/classlib/modules/imageio/src/main/java/org/apache/harmony/x/imageio/spi/OutputStreamIOSSpi.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/branches/java6/classlib/modules/imageio/src/main/java/org/apache/harmony/x/imageio/spi/OutputStreamIOSSpi.java?rev=927401&r1=927400&r2=927401&view=diff
==============================================================================
--- harmony/enhanced/branches/java6/classlib/modules/imageio/src/main/java/org/apache/harmony/x/imageio/spi/OutputStreamIOSSpi.java (original)
+++ harmony/enhanced/branches/java6/classlib/modules/imageio/src/main/java/org/apache/harmony/x/imageio/spi/OutputStreamIOSSpi.java Thu Mar 25 13:48:22 2010
@@ -26,6 +26,7 @@ import java.io.File;
 import java.io.IOException;
 import java.io.OutputStream;
 import java.util.Locale;
+import org.apache.harmony.x.imageio.internal.nls.Messages;
 
 public class OutputStreamIOSSpi extends ImageOutputStreamSpi {
     private static final String vendor = "Apache";
@@ -45,7 +46,7 @@ public class OutputStreamIOSSpi extends 
                 return new MemoryCacheImageOutputStream((OutputStream) output);
             }
         }
-        throw new IllegalArgumentException("Output is not an instance of OutputStream");
+        throw new IllegalArgumentException(Messages.getString("imageio.85"));
     }
 
     @Override

Modified: harmony/enhanced/branches/java6/classlib/modules/imageio/src/main/java/org/apache/harmony/x/imageio/spi/RAFIISSpi.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/branches/java6/classlib/modules/imageio/src/main/java/org/apache/harmony/x/imageio/spi/RAFIISSpi.java?rev=927401&r1=927400&r2=927401&view=diff
==============================================================================
--- harmony/enhanced/branches/java6/classlib/modules/imageio/src/main/java/org/apache/harmony/x/imageio/spi/RAFIISSpi.java (original)
+++ harmony/enhanced/branches/java6/classlib/modules/imageio/src/main/java/org/apache/harmony/x/imageio/spi/RAFIISSpi.java Thu Mar 25 13:48:22 2010
@@ -27,6 +27,8 @@ import java.io.IOException;
 import java.io.RandomAccessFile;
 import java.util.Locale;
 
+import org.apache.harmony.x.imageio.internal.nls.Messages;
+
 public class RAFIISSpi extends ImageInputStreamSpi {
     private static final String vendor = "Apache";
 
@@ -42,8 +44,7 @@ public class RAFIISSpi extends ImageInpu
         if (RandomAccessFile.class.isInstance(input)) {
             return new FileImageInputStream((RandomAccessFile) input);
         }
-        throw new IllegalArgumentException(
-                "input is not an instance of java.io.RandomAccessFile");
+        throw new IllegalArgumentException(Messages.getString("imageio.95"));
     }
 
     @Override

Modified: harmony/enhanced/branches/java6/classlib/modules/imageio/src/main/java/org/apache/harmony/x/imageio/spi/RAFIOSSpi.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/branches/java6/classlib/modules/imageio/src/main/java/org/apache/harmony/x/imageio/spi/RAFIOSSpi.java?rev=927401&r1=927400&r2=927401&view=diff
==============================================================================
--- harmony/enhanced/branches/java6/classlib/modules/imageio/src/main/java/org/apache/harmony/x/imageio/spi/RAFIOSSpi.java (original)
+++ harmony/enhanced/branches/java6/classlib/modules/imageio/src/main/java/org/apache/harmony/x/imageio/spi/RAFIOSSpi.java Thu Mar 25 13:48:22 2010
@@ -26,6 +26,7 @@ import java.io.File;
 import java.io.IOException;
 import java.io.RandomAccessFile;
 import java.util.Locale;
+import org.apache.harmony.x.imageio.internal.nls.Messages;
 
 public class RAFIOSSpi extends ImageOutputStreamSpi {
     private static final String vendor = "Apache";
@@ -42,7 +43,7 @@ public class RAFIOSSpi extends ImageOutp
         if (output instanceof RandomAccessFile) {
             return new FileImageOutputStream((RandomAccessFile) output);
         }
-        throw new IllegalArgumentException("output is not instance of java.io.RandomAccessFile");
+        throw new IllegalArgumentException(Messages.getString("imageio.87"));
     }
 
     @Override

Modified: harmony/enhanced/branches/java6/classlib/modules/imageio/src/main/java/org/apache/harmony/x/imageio/stream/RandomAccessMemoryCache.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/branches/java6/classlib/modules/imageio/src/main/java/org/apache/harmony/x/imageio/stream/RandomAccessMemoryCache.java?rev=927401&r1=927400&r2=927401&view=diff
==============================================================================
--- harmony/enhanced/branches/java6/classlib/modules/imageio/src/main/java/org/apache/harmony/x/imageio/stream/RandomAccessMemoryCache.java (original)
+++ harmony/enhanced/branches/java6/classlib/modules/imageio/src/main/java/org/apache/harmony/x/imageio/stream/RandomAccessMemoryCache.java Thu Mar 25 13:48:22 2010
@@ -22,6 +22,7 @@ import java.util.ArrayList;
 import java.io.IOException;
 import java.io.InputStream;
 import java.io.OutputStream;
+import org.apache.harmony.x.imageio.internal.nls.Messages;
 
 public final class RandomAccessMemoryCache {
     private static final int BLOCK_SHIFT = 9;
@@ -121,7 +122,7 @@ public final class RandomAccessMemoryCac
     /*
     public void seek(long pos) throws IOException {
         if (pos < 0) {
-            throw new IOException("seek position is negative");
+            throw new IOException(Messages.getString("imageio.7C"));
         }
         this.pos = pos; 
     }
@@ -204,13 +205,13 @@ public final class RandomAccessMemoryCac
 
     public void getData(OutputStream os, int count, long pos) throws IOException {
         if (pos + count > length) {
-            throw new IndexOutOfBoundsException("Argument out of cache");
+            throw new IndexOutOfBoundsException(Messages.getString("imageio.7D"));
         }
 
         int blockIdx = (int)(pos >> BLOCK_SHIFT);
         int offset = (int) (pos & BLOCK_MASK);
         if (blockIdx < firstUndisposed) {
-            throw new IndexOutOfBoundsException("The requested data are already disposed");
+            throw new IndexOutOfBoundsException(Messages.getString("imageio.7E"));
         }
 
         while (count > 0) {

Propchange: harmony/enhanced/branches/java6/classlib/modules/jmx/META-INF/
            ('svn:mergeinfo' removed)

Modified: harmony/enhanced/branches/java6/classlib/modules/jndi/src/test/java/org/apache/harmony/jndi/tests/javax/naming/ldap/LdapNameTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/branches/java6/classlib/modules/jndi/src/test/java/org/apache/harmony/jndi/tests/javax/naming/ldap/LdapNameTest.java?rev=927401&r1=927400&r2=927401&view=diff
==============================================================================
--- harmony/enhanced/branches/java6/classlib/modules/jndi/src/test/java/org/apache/harmony/jndi/tests/javax/naming/ldap/LdapNameTest.java (original)
+++ harmony/enhanced/branches/java6/classlib/modules/jndi/src/test/java/org/apache/harmony/jndi/tests/javax/naming/ldap/LdapNameTest.java Thu Mar 25 13:48:22 2010
@@ -511,8 +511,7 @@ public class LdapNameTest extends TestCa
      * </p>
      * <p>
      * Here we are testing the constructor, this method should accept a
-     * String notice here that here that we are testing the the special
-     * character "<".
+     * String.  Notice here that we are testing the special character "<".
      * </p>
      * <p>
      * The expected result is an Exception.
@@ -556,8 +555,7 @@ public class LdapNameTest extends TestCa
      * </p>
      * <p>
      * Here we are testing the constructor, this method should accept a
-     * String notice here that here that we are testing the the special
-     * character "\".
+     * String.  Notice here that we are testing the special character "\".
      * </p>
      * <p>
      * The expected result is an Exception.
@@ -591,8 +589,7 @@ public class LdapNameTest extends TestCa
      * </p>
      * <p>
      * Here we are testing the constructor, this method should accept a
-     * String notice here that here that we are testing the the special
-     * character "+".
+     * String.  Notice here that we are testing the special character "+".
      * </p>
      * <p>
      * The expected result is an instance of the class.
@@ -661,7 +658,7 @@ public class LdapNameTest extends TestCa
      * </p>
      * <p>
      * Here we are testing the constructor, this method should accept a
-     * String notice here that here that we are testing the special case
+     * String.  Notice here that we are testing the special case
      * in which the name is quoted and the meta characters in it are ignored.
      * </p>
      * <p>
@@ -786,7 +783,7 @@ public class LdapNameTest extends TestCa
      * </p>
      * <p>
      * Here we are testing the constructor, this method should accept a
-     * String notice here that here that we are testing the special case
+     * String.  Notice here that we are testing the special case
      * in which the name contains \\*, \\%, \\_
      * </p>
      * <p>