harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hinde...@apache.org
Subject svn commit: r926835 [2/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
Modified: harmony/enhanced/trunk/classlib/modules/imageio/src/main/java/javax/imageio/stream/ImageInputStreamImpl.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/trunk/classlib/modules/imageio/src/main/java/javax/imageio/stream/ImageInputStreamImpl.java?rev=926835&r1=926834&r2=926835&view=diff
==============================================================================
--- harmony/enhanced/trunk/classlib/modules/imageio/src/main/java/javax/imageio/stream/ImageInputStreamImpl.java
(original)
+++ harmony/enhanced/trunk/classlib/modules/imageio/src/main/java/javax/imageio/stream/ImageInputStreamImpl.java
Tue Mar 23 22:55:42 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/trunk/classlib/modules/imageio/src/main/java/javax/imageio/stream/MemoryCacheImageInputStream.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/trunk/classlib/modules/imageio/src/main/java/javax/imageio/stream/MemoryCacheImageInputStream.java?rev=926835&r1=926834&r2=926835&view=diff
==============================================================================
--- harmony/enhanced/trunk/classlib/modules/imageio/src/main/java/javax/imageio/stream/MemoryCacheImageInputStream.java
(original)
+++ harmony/enhanced/trunk/classlib/modules/imageio/src/main/java/javax/imageio/stream/MemoryCacheImageInputStream.java
Tue Mar 23 22:55:42 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/trunk/classlib/modules/imageio/src/main/java/javax/imageio/stream/MemoryCacheImageOutputStream.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/trunk/classlib/modules/imageio/src/main/java/javax/imageio/stream/MemoryCacheImageOutputStream.java?rev=926835&r1=926834&r2=926835&view=diff
==============================================================================
--- harmony/enhanced/trunk/classlib/modules/imageio/src/main/java/javax/imageio/stream/MemoryCacheImageOutputStream.java
(original)
+++ harmony/enhanced/trunk/classlib/modules/imageio/src/main/java/javax/imageio/stream/MemoryCacheImageOutputStream.java
Tue Mar 23 22:55:42 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/trunk/classlib/modules/imageio/src/main/java/org/apache/harmony/x/imageio/internal/nls/messages.properties
URL: http://svn.apache.org/viewvc/harmony/enhanced/trunk/classlib/modules/imageio/src/main/java/org/apache/harmony/x/imageio/internal/nls/messages.properties?rev=926835&r1=926834&r2=926835&view=diff
==============================================================================
--- harmony/enhanced/trunk/classlib/modules/imageio/src/main/java/org/apache/harmony/x/imageio/internal/nls/messages.properties
(original)
+++ harmony/enhanced/trunk/classlib/modules/imageio/src/main/java/org/apache/harmony/x/imageio/internal/nls/messages.properties
Tue Mar 23 22:55:42 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/trunk/classlib/modules/imageio/src/main/java/org/apache/harmony/x/imageio/metadata/IIOMetadataUtils.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/trunk/classlib/modules/imageio/src/main/java/org/apache/harmony/x/imageio/metadata/IIOMetadataUtils.java?rev=926835&r1=926834&r2=926835&view=diff
==============================================================================
--- harmony/enhanced/trunk/classlib/modules/imageio/src/main/java/org/apache/harmony/x/imageio/metadata/IIOMetadataUtils.java
(original)
+++ harmony/enhanced/trunk/classlib/modules/imageio/src/main/java/org/apache/harmony/x/imageio/metadata/IIOMetadataUtils.java
Tue Mar 23 22:55:42 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/trunk/classlib/modules/imageio/src/main/java/org/apache/harmony/x/imageio/plugins/jpeg/JPEGImageWriter.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/trunk/classlib/modules/imageio/src/main/java/org/apache/harmony/x/imageio/plugins/jpeg/JPEGImageWriter.java?rev=926835&r1=926834&r2=926835&view=diff
==============================================================================
--- harmony/enhanced/trunk/classlib/modules/imageio/src/main/java/org/apache/harmony/x/imageio/plugins/jpeg/JPEGImageWriter.java
(original)
+++ harmony/enhanced/trunk/classlib/modules/imageio/src/main/java/org/apache/harmony/x/imageio/plugins/jpeg/JPEGImageWriter.java
Tue Mar 23 22:55:42 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/trunk/classlib/modules/imageio/src/main/java/org/apache/harmony/x/imageio/plugins/png/PNGImageWriter.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/trunk/classlib/modules/imageio/src/main/java/org/apache/harmony/x/imageio/plugins/png/PNGImageWriter.java?rev=926835&r1=926834&r2=926835&view=diff
==============================================================================
--- harmony/enhanced/trunk/classlib/modules/imageio/src/main/java/org/apache/harmony/x/imageio/plugins/png/PNGImageWriter.java
(original)
+++ harmony/enhanced/trunk/classlib/modules/imageio/src/main/java/org/apache/harmony/x/imageio/plugins/png/PNGImageWriter.java
Tue Mar 23 22:55:42 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/trunk/classlib/modules/imageio/src/main/java/org/apache/harmony/x/imageio/spi/FileIISSpi.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/trunk/classlib/modules/imageio/src/main/java/org/apache/harmony/x/imageio/spi/FileIISSpi.java?rev=926835&r1=926834&r2=926835&view=diff
==============================================================================
--- harmony/enhanced/trunk/classlib/modules/imageio/src/main/java/org/apache/harmony/x/imageio/spi/FileIISSpi.java
(original)
+++ harmony/enhanced/trunk/classlib/modules/imageio/src/main/java/org/apache/harmony/x/imageio/spi/FileIISSpi.java
Tue Mar 23 22:55:42 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/trunk/classlib/modules/imageio/src/main/java/org/apache/harmony/x/imageio/spi/FileIOSSpi.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/trunk/classlib/modules/imageio/src/main/java/org/apache/harmony/x/imageio/spi/FileIOSSpi.java?rev=926835&r1=926834&r2=926835&view=diff
==============================================================================
--- harmony/enhanced/trunk/classlib/modules/imageio/src/main/java/org/apache/harmony/x/imageio/spi/FileIOSSpi.java
(original)
+++ harmony/enhanced/trunk/classlib/modules/imageio/src/main/java/org/apache/harmony/x/imageio/spi/FileIOSSpi.java
Tue Mar 23 22:55:42 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/trunk/classlib/modules/imageio/src/main/java/org/apache/harmony/x/imageio/spi/InputStreamIISSpi.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/trunk/classlib/modules/imageio/src/main/java/org/apache/harmony/x/imageio/spi/InputStreamIISSpi.java?rev=926835&r1=926834&r2=926835&view=diff
==============================================================================
--- harmony/enhanced/trunk/classlib/modules/imageio/src/main/java/org/apache/harmony/x/imageio/spi/InputStreamIISSpi.java
(original)
+++ harmony/enhanced/trunk/classlib/modules/imageio/src/main/java/org/apache/harmony/x/imageio/spi/InputStreamIISSpi.java
Tue Mar 23 22:55:42 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/trunk/classlib/modules/imageio/src/main/java/org/apache/harmony/x/imageio/spi/OutputStreamIOSSpi.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/trunk/classlib/modules/imageio/src/main/java/org/apache/harmony/x/imageio/spi/OutputStreamIOSSpi.java?rev=926835&r1=926834&r2=926835&view=diff
==============================================================================
--- harmony/enhanced/trunk/classlib/modules/imageio/src/main/java/org/apache/harmony/x/imageio/spi/OutputStreamIOSSpi.java
(original)
+++ harmony/enhanced/trunk/classlib/modules/imageio/src/main/java/org/apache/harmony/x/imageio/spi/OutputStreamIOSSpi.java
Tue Mar 23 22:55:42 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/trunk/classlib/modules/imageio/src/main/java/org/apache/harmony/x/imageio/spi/RAFIISSpi.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/trunk/classlib/modules/imageio/src/main/java/org/apache/harmony/x/imageio/spi/RAFIISSpi.java?rev=926835&r1=926834&r2=926835&view=diff
==============================================================================
--- harmony/enhanced/trunk/classlib/modules/imageio/src/main/java/org/apache/harmony/x/imageio/spi/RAFIISSpi.java
(original)
+++ harmony/enhanced/trunk/classlib/modules/imageio/src/main/java/org/apache/harmony/x/imageio/spi/RAFIISSpi.java
Tue Mar 23 22:55:42 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/trunk/classlib/modules/imageio/src/main/java/org/apache/harmony/x/imageio/spi/RAFIOSSpi.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/trunk/classlib/modules/imageio/src/main/java/org/apache/harmony/x/imageio/spi/RAFIOSSpi.java?rev=926835&r1=926834&r2=926835&view=diff
==============================================================================
--- harmony/enhanced/trunk/classlib/modules/imageio/src/main/java/org/apache/harmony/x/imageio/spi/RAFIOSSpi.java
(original)
+++ harmony/enhanced/trunk/classlib/modules/imageio/src/main/java/org/apache/harmony/x/imageio/spi/RAFIOSSpi.java
Tue Mar 23 22:55:42 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/trunk/classlib/modules/imageio/src/main/java/org/apache/harmony/x/imageio/stream/RandomAccessMemoryCache.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/trunk/classlib/modules/imageio/src/main/java/org/apache/harmony/x/imageio/stream/RandomAccessMemoryCache.java?rev=926835&r1=926834&r2=926835&view=diff
==============================================================================
--- harmony/enhanced/trunk/classlib/modules/imageio/src/main/java/org/apache/harmony/x/imageio/stream/RandomAccessMemoryCache.java
(original)
+++ harmony/enhanced/trunk/classlib/modules/imageio/src/main/java/org/apache/harmony/x/imageio/stream/RandomAccessMemoryCache.java
Tue Mar 23 22:55:42 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) {



Mime
View raw message