harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hinde...@apache.org
Subject svn commit: r909600 - in /harmony/enhanced/classlib/trunk/modules/luni/src/main/java: java/io/ org/apache/harmony/luni/internal/nls/
Date Fri, 12 Feb 2010 20:40:55 GMT
Author: hindessm
Date: Fri Feb 12 20:40:48 2010
New Revision: 909600

URL: http://svn.apache.org/viewvc?rev=909600&view=rev
Log:
More nls refactoring.

Modified:
    harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/io/ObjectInputStream.java
    harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/io/ObjectOutputStream.java
    harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/io/ObjectStreamClass.java
    harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/io/OutputStream.java
    harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/io/OutputStreamWriter.java
    harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/io/PipedInputStream.java
    harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/io/PipedOutputStream.java
    harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/io/PipedReader.java
    harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/io/PipedWriter.java
    harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/io/PrintStream.java
    harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/io/PrintWriter.java
    harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/io/PushbackInputStream.java
    harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/io/PushbackReader.java
    harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/io/StringBufferInputStream.java
    harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/io/StringReader.java
    harmony/enhanced/classlib/trunk/modules/luni/src/main/java/org/apache/harmony/luni/internal/nls/messages.properties

Modified: harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/io/ObjectInputStream.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/io/ObjectInputStream.java?rev=909600&r1=909599&r2=909600&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/io/ObjectInputStream.java (original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/io/ObjectInputStream.java Fri Feb 12 20:40:48 2010
@@ -35,7 +35,7 @@
 
 import org.apache.harmony.kernel.vm.VM;
 import org.apache.harmony.luni.internal.nls.Messages;
-import org.apache.harmony.luni.util.Msg;
+import org.apache.harmony.luni.internal.nls.Messages;
 import org.apache.harmony.luni.util.PriviAction;
 
 /**
@@ -666,12 +666,12 @@
     public int read(byte[] buffer, int offset, int length) throws IOException {
         // Force buffer null check first!
         if (offset > buffer.length || offset < 0) {
-            // K002e=Offset out of bounds \: {0}
-            throw new ArrayIndexOutOfBoundsException(Msg.getString("K002e", offset)); //$NON-NLS-1$
+            // luni.12=Offset out of bounds \: {0}
+            throw new ArrayIndexOutOfBoundsException(Messages.getString("luni.12", offset)); //$NON-NLS-1$
         }
         if (length < 0 || length > buffer.length - offset) {
-            // K0031=Length out of bounds \: {0}
-            throw new ArrayIndexOutOfBoundsException(Msg.getString("K0031", length)); //$NON-NLS-1$
+            // luni.18=Length out of bounds \: {0}
+            throw new ArrayIndexOutOfBoundsException(Messages.getString("luni.18", length)); //$NON-NLS-1$
         }
         if (length == 0) {
             return 0;
@@ -810,8 +810,8 @@
             case TC_NULL:
                 return null;
             default:
-                throw new StreamCorruptedException(Msg.getString(
-                        "K00d2", Integer.toHexString(tc & 0xff))); //$NON-NLS-1$
+                throw new StreamCorruptedException(Messages.getString(
+                        "luni.BC", Integer.toHexString(tc & 0xff))); //$NON-NLS-1$
         }
     }
 
@@ -855,13 +855,13 @@
                 return null;
             case TC_EXCEPTION:
                 Exception exc = readException();
-                throw new WriteAbortedException(Msg.getString("K00d3"), exc); //$NON-NLS-1$
+                throw new WriteAbortedException(Messages.getString("luni.BD"), exc); //$NON-NLS-1$
             case TC_RESET:
                 resetState();
                 return null;
             default:
-                throw new StreamCorruptedException(Msg.getString(
-                        "K00d2", Integer.toHexString(tc & 0xff))); //$NON-NLS-1$
+                throw new StreamCorruptedException(Messages.getString(
+                        "luni.BC", Integer.toHexString(tc & 0xff))); //$NON-NLS-1$
         }
     }
 
@@ -909,14 +909,14 @@
                 case TC_REFERENCE:
                     if (unshared) {
                         readNewHandle();
-                        throw new InvalidObjectException(Msg.getString("KA002")); //$NON-NLS-1$
+                        throw new InvalidObjectException(Messages.getString("luni.BE")); //$NON-NLS-1$
                     }
                     return readCyclicReference();
                 case TC_NULL:
                     return null;
                 case TC_EXCEPTION:
                     Exception exc = readException();
-                    throw new WriteAbortedException(Msg.getString("K00d3"), exc); //$NON-NLS-1$
+                    throw new WriteAbortedException(Messages.getString("luni.BD"), exc); //$NON-NLS-1$
                 case TC_RESET:
                     resetState();
                     break;
@@ -926,8 +926,8 @@
                     e.eof = true;
                     throw e;
                 default:
-                    throw new StreamCorruptedException(Msg.getString(
-                            "K00d2", Integer.toHexString(tc & 0xff))); //$NON-NLS-1$
+                    throw new StreamCorruptedException(Messages.getString(
+                            "luni.BC", Integer.toHexString(tc & 0xff))); //$NON-NLS-1$
             }
             // Only TC_RESET falls through
         } while (true);
@@ -1267,8 +1267,8 @@
                             }
                             break;
                         default:
-                            throw new StreamCorruptedException(Msg.getString(
-                                    "K00d5", fieldDesc.getTypeCode())); //$NON-NLS-1$
+                            throw new StreamCorruptedException(Messages.getString(
+                                    "luni.BF", fieldDesc.getTypeCode())); //$NON-NLS-1$
                     }
                 } catch (NoSuchFieldError err) {
                 }
@@ -1294,8 +1294,8 @@
                         Class<?> fieldType = fieldDesc.getType();
                         Class<?> valueType = toSet.getClass();
                         if (!fieldType.isAssignableFrom(valueType)) {
-                            throw new ClassCastException(Msg.getString(
-                                    "K00d4", new String[] { //$NON-NLS-1$
+                            throw new ClassCastException(Messages.getString(
+                                    "luni.C0", new String[] { //$NON-NLS-1$
                                     fieldType.toString(), valueType.toString(),
                                             classDesc.getName() + "." //$NON-NLS-1$
                                                     + fieldName }));
@@ -1600,7 +1600,7 @@
         ObjectStreamClass classDesc = readClassDesc();
 
         if (classDesc == null) {
-            throw new InvalidClassException(Msg.getString("K00d1")); //$NON-NLS-1$
+            throw new InvalidClassException(Messages.getString("luni.C1")); //$NON-NLS-1$
         }
 
         Integer newHandle = nextHandle();
@@ -1657,8 +1657,8 @@
                     doubleArray[i] = input.readDouble();
                 }
             } else {
-                throw new ClassNotFoundException(Msg.getString(
-                        "K00d7", classDesc.getName())); //$NON-NLS-1$
+                throw new ClassNotFoundException(Messages.getString(
+                        "luni.C2", classDesc.getName())); //$NON-NLS-1$
             }
         } else {
             // Array of Objects
@@ -1702,7 +1702,7 @@
             }
             return localClass;
         }
-        throw new InvalidClassException(Msg.getString("K00d1")); //$NON-NLS-1$
+        throw new InvalidClassException(Messages.getString("luni.C1")); //$NON-NLS-1$
     }
 
     /*
@@ -1720,8 +1720,8 @@
             case TC_NULL:
                 return null;
             default:
-                throw new StreamCorruptedException(Msg.getString(
-                        "K00d2", Integer.toHexString(tc & 0xff))); //$NON-NLS-1$
+                throw new StreamCorruptedException(Messages.getString(
+                        "luni.BC", Integer.toHexString(tc & 0xff))); //$NON-NLS-1$
         }
     }
 
@@ -1743,8 +1743,8 @@
         // Check SUIDs, note all SUID for Enum is 0L
         if (0L != classDesc.getSerialVersionUID()
                 || 0L != superClass.getSerialVersionUID()) {
-            throw new InvalidClassException(superClass.getName(), Msg
-                    .getString("K00da", superClass, //$NON-NLS-1$
+            throw new InvalidClassException(superClass.getName(), Messages
+                    .getString("luni.C3", superClass, //$NON-NLS-1$
                             superClass));
         }
         byte tc = nextTC();
@@ -1772,7 +1772,7 @@
             case TC_REFERENCE:
                 if (unshared) {
                     readNewHandle();
-                    throw new InvalidObjectException(Msg.getString("KA002")); //$NON-NLS-1$
+                    throw new InvalidObjectException(Messages.getString("luni.BE")); //$NON-NLS-1$
                 }
                 name = (String) readCyclicReference();
                 break;
@@ -1780,7 +1780,7 @@
                 name = (String) readNewString(unshared);
                 break;
             default:
-                throw new StreamCorruptedException(Msg.getString("K00d2"));//$NON-NLS-1$
+                throw new StreamCorruptedException(Messages.getString("luni.BC"));//$NON-NLS-1$
         }
 
         Enum<?> result = Enum.valueOf((Class) classDesc.forClass(), name);
@@ -1980,8 +1980,8 @@
 
             // Has to have an empty constructor
             if (constructor == null) {
-                throw new InvalidClassException(constructorClass.getName(), Msg
-                        .getString("K00dc")); //$NON-NLS-1$
+                throw new InvalidClassException(constructorClass.getName(), Messages
+                        .getString("luni.C4")); //$NON-NLS-1$
             }
 
             int constructorModifiers = constructor.getModifiers();
@@ -1991,8 +1991,8 @@
             if (Modifier.isPrivate(constructorModifiers)
                     || (wasExternalizable && !Modifier
                             .isPublic(constructorModifiers))) {
-                throw new InvalidClassException(constructorClass.getName(), Msg
-                        .getString("K00dc")); //$NON-NLS-1$
+                throw new InvalidClassException(constructorClass.getName(), Messages
+                        .getString("luni.C4")); //$NON-NLS-1$
             }
 
             // We know we are testing from a subclass, so the only other case
@@ -2005,7 +2005,7 @@
                 // visibility. Check if same package
                 if (!inSamePackage(constructorClass, objectClass)) {
                     throw new InvalidClassException(constructorClass.getName(),
-                            Msg.getString("K00dc")); //$NON-NLS-1$
+                            Messages.getString("luni.C4")); //$NON-NLS-1$
                 }
             }
 
@@ -2039,7 +2039,7 @@
         ObjectStreamClass classDesc = readClassDesc();
 
         if (classDesc == null) {
-            throw new InvalidClassException(Msg.getString("K00d1")); //$NON-NLS-1$
+            throw new InvalidClassException(Messages.getString("luni.C1")); //$NON-NLS-1$
         }
 
         Integer newHandle = nextHandle();
@@ -2395,7 +2395,7 @@
         Object res = objectsRead.get(handle);
 
         if (res == UNSHARED_OBJ) {
-            throw new InvalidObjectException(Msg.getString("KA010")); //$NON-NLS-1$
+            throw new InvalidObjectException(Messages.getString("luni.C5")); //$NON-NLS-1$
         }
 
         return res;
@@ -2448,7 +2448,7 @@
             throw new NotActiveException();
         }
         if (object == null) {
-            throw new InvalidObjectException(Msg.getString("K00d9")); //$NON-NLS-1$
+            throw new InvalidObjectException(Messages.getString("luni.C6")); //$NON-NLS-1$
         }
         // From now on it is just insertion in a SortedCollection. Since
         // the Java class libraries don't provide that, we have to
@@ -2608,8 +2608,8 @@
 
         if (loadedStreamClass.getSerialVersionUID() != localStreamClass
                 .getSerialVersionUID()) {
-            throw new InvalidClassException(loadedStreamClass.getName(), Msg
-                    .getString("K00da", loadedStreamClass, //$NON-NLS-1$
+            throw new InvalidClassException(loadedStreamClass.getName(), Messages
+                    .getString("luni.C3", loadedStreamClass, //$NON-NLS-1$
                             localStreamClass));
         }
 
@@ -2617,8 +2617,8 @@
         String localClassBaseName = getBaseName(localStreamClass.getName());
 
         if (!loadedClassBaseName.equals(localClassBaseName)) {
-            throw new InvalidClassException(loadedStreamClass.getName(), Msg
-                    .getString("KA015", loadedClassBaseName, //$NON-NLS-1$
+            throw new InvalidClassException(loadedStreamClass.getName(), Messages
+                    .getString("luni.C7", loadedClassBaseName, //$NON-NLS-1$
                             localClassBaseName));
         }
 

Modified: harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/io/ObjectOutputStream.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/io/ObjectOutputStream.java?rev=909600&r1=909599&r2=909600&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/io/ObjectOutputStream.java (original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/io/ObjectOutputStream.java Fri Feb 12 20:40:48 2010
@@ -25,7 +25,7 @@
 import org.apache.harmony.misc.accessors.ObjectAccessor;
 import org.apache.harmony.misc.accessors.AccessorFactory;
 
-import org.apache.harmony.luni.util.Msg;
+import org.apache.harmony.luni.internal.nls.Messages;
 
 /**
  * A specialized {@link OutputStream} that is able to write (serialize) Java
@@ -668,13 +668,13 @@
      */
     public void useProtocolVersion(int version) throws IOException {
         if (!objectsWritten.isEmpty()) {
-            // KA028=Cannot set protocol version when stream in use
-            throw new IllegalStateException(Msg.getString("KA028")); //$NON-NLS-1$
+            // luni.C8=Cannot set protocol version when stream in use
+            throw new IllegalStateException(Messages.getString("luni.C8")); //$NON-NLS-1$
         }
         if (version != ObjectStreamConstants.PROTOCOL_VERSION_1
                 && version != ObjectStreamConstants.PROTOCOL_VERSION_2) {
-            // K00b3=Unknown protocol\: {0}
-            throw new IllegalArgumentException(Msg.getString("K00b3", version)); //$NON-NLS-1$
+            // luni.9C=Unknown protocol\: {0}
+            throw new IllegalArgumentException(Messages.getString("luni.9C", version)); //$NON-NLS-1$
         }
         protocolVersion = version;
     }
@@ -1080,8 +1080,8 @@
                             break;
                         default:
                             throw new IOException(
-                                    org.apache.harmony.luni.util.Msg.getString(
-                                            "K00d5", fieldDesc.getTypeCode())); //$NON-NLS-1$
+                                    Messages.getString(
+                                            "luni.BF", fieldDesc.getTypeCode())); //$NON-NLS-1$
                     }
                 } else {
                     // Object type (array included).
@@ -1307,8 +1307,8 @@
                 }
             } else {
                 throw new InvalidClassException(
-                        org.apache.harmony.luni.util.Msg.getString(
-                                "K00d7", arrayClass.getName())); //$NON-NLS-1$
+                        Messages.getString(
+                                "luni.C2", arrayClass.getName())); //$NON-NLS-1$
             }
         } else {
             // Array of Objects

Modified: harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/io/ObjectStreamClass.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/io/ObjectStreamClass.java?rev=909600&r1=909599&r2=909600&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/io/ObjectStreamClass.java (original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/io/ObjectStreamClass.java Fri Feb 12 20:40:48 2010
@@ -32,7 +32,7 @@
 import java.util.List;
 import java.util.WeakHashMap;
 
-import org.apache.harmony.luni.util.Msg;
+import org.apache.harmony.luni.internal.nls.Messages;
 import org.apache.harmony.luni.util.PriviAction;
 import org.apache.harmony.luni.util.ThreadLocalCache;
 
@@ -418,8 +418,8 @@
                             // Static field, parameter is ignored
                             return field.getLong(null);
                         } catch (IllegalAccessException iae) {
-                            throw new RuntimeException(Msg.getString(
-                                    "K0071", iae)); //$NON-NLS-1$
+                            throw new RuntimeException(Messages.getString(
+                                    "luni.C9", iae)); //$NON-NLS-1$
                         }
                     }
                 }
@@ -590,7 +590,7 @@
                 }
             }
         } catch (IOException e) {
-            throw new RuntimeException(Msg.getString("K0072", e));//$NON-NLS-1$
+            throw new RuntimeException(Messages.getString("luni.CA", e));//$NON-NLS-1$
         }
 
         // now compute the UID based on the SHA

Modified: harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/io/OutputStream.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/io/OutputStream.java?rev=909600&r1=909599&r2=909600&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/io/OutputStream.java (original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/io/OutputStream.java Fri Feb 12 20:40:48 2010
@@ -17,7 +17,7 @@
 
 package java.io;
 
-import org.apache.harmony.luni.util.Msg;
+import org.apache.harmony.luni.internal.nls.Messages;
 
 /**
  * The base class for all output streams. An output stream is a means of writing
@@ -101,7 +101,7 @@
         // avoid int overflow, check null buffer
         if (offset > buffer.length || offset < 0 || count < 0
                 || count > buffer.length - offset) {
-            throw new IndexOutOfBoundsException(Msg.getString("K002f")); //$NON-NLS-1$
+            throw new IndexOutOfBoundsException(Messages.getString("luni.13")); //$NON-NLS-1$
         }
         for (int i = offset; i < offset + count; i++) {
             write(buffer[i]);

Modified: harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/io/OutputStreamWriter.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/io/OutputStreamWriter.java?rev=909600&r1=909599&r2=909600&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/io/OutputStreamWriter.java (original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/io/OutputStreamWriter.java Fri Feb 12 20:40:48 2010
@@ -26,7 +26,7 @@
 import java.security.AccessController;
 
 import org.apache.harmony.luni.util.HistoricalNamesUtil;
-import org.apache.harmony.luni.util.Msg;
+import org.apache.harmony.luni.internal.nls.Messages;
 import org.apache.harmony.luni.util.PriviAction;
 
 /**
@@ -181,8 +181,8 @@
 
     private void checkStatus() throws IOException {
         if (encoder == null) {
-            // K005d=Writer is closed.
-            throw new IOException(Msg.getString("K005d")); //$NON-NLS-1$
+            // luni.A7=Writer is closed.
+            throw new IOException(Messages.getString("luni.A7")); //$NON-NLS-1$
         }
     }
 

Modified: harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/io/PipedInputStream.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/io/PipedInputStream.java?rev=909600&r1=909599&r2=909600&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/io/PipedInputStream.java (original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/io/PipedInputStream.java Fri Feb 12 20:40:48 2010
@@ -17,7 +17,7 @@
 
 package java.io;
 
-import org.apache.harmony.luni.util.Msg;
+import org.apache.harmony.luni.internal.nls.Messages;
 
 /**
  * Receives information from a communications pipe. When two threads want to
@@ -150,17 +150,17 @@
     @Override
     public synchronized int read() throws IOException {
         if (!isConnected) {
-            // K0074=Not connected
-            throw new IOException(Msg.getString("K0074")); //$NON-NLS-1$
+            // luni.CB=Not connected
+            throw new IOException(Messages.getString("luni.CB")); //$NON-NLS-1$
         }
         if (buffer == null) {
-            // K0075=InputStream is closed
-            throw new IOException(Msg.getString("K0075")); //$NON-NLS-1$
+            // luni.CC=InputStream is closed
+            throw new IOException(Messages.getString("luni.CC")); //$NON-NLS-1$
         }
 
         if (lastWriter != null && !lastWriter.isAlive() && (in < 0)) {
-            // KA030=Write end dead
-            throw new IOException(Msg.getString("KA030")); //$NON-NLS-1$
+            // luni.CD=Write end dead
+            throw new IOException(Messages.getString("luni.CD")); //$NON-NLS-1$
         }
         /**
          * Set the last thread to be reading on this PipedInputStream. If
@@ -176,8 +176,8 @@
                     return -1;
                 }
                 if ((attempts-- <= 0) && lastWriter != null && !lastWriter.isAlive()) {
-                    // K0076=Pipe broken
-                    throw new IOException(Msg.getString("K0076")); //$NON-NLS-1$
+                    // luni.CE=Pipe broken
+                    throw new IOException(Messages.getString("luni.CE")); //$NON-NLS-1$
                 }
                 // Notify callers of receive()
                 notifyAll();
@@ -247,18 +247,18 @@
         }
 
         if (!isConnected) {
-            // K0074=Not connected
-            throw new IOException(Msg.getString("K0074")); //$NON-NLS-1$
+            // luni.CB=Not connected
+            throw new IOException(Messages.getString("luni.CB")); //$NON-NLS-1$
         }
 
         if (buffer == null) {
-            // K0075=InputStream is closed
-            throw new IOException(Msg.getString("K0075")); //$NON-NLS-1$
+            // luni.CC=InputStream is closed
+            throw new IOException(Messages.getString("luni.CC")); //$NON-NLS-1$
         }
 
         if (lastWriter != null && !lastWriter.isAlive() && (in < 0)) {
-            // KA030=Write end dead
-            throw new IOException(Msg.getString("KA030")); //$NON-NLS-1$
+            // luni.CD=Write end dead
+            throw new IOException(Messages.getString("luni.CD")); //$NON-NLS-1$
         }
 
         /**
@@ -275,8 +275,8 @@
                     return -1;
                 }
                 if ((attempts-- <= 0) && lastWriter != null && !lastWriter.isAlive()) {
-                    // K0076=Pipe broken
-                    throw new IOException(Msg.getString("K0076")); //$NON-NLS-1$
+                    // luni.CE=Pipe broken
+                    throw new IOException(Messages.getString("luni.CE")); //$NON-NLS-1$
                 }
                 // Notify callers of receive()
                 notifyAll();
@@ -344,10 +344,10 @@
      */
     protected synchronized void receive(int oneByte) throws IOException {
         if (buffer == null || isClosed) {
-            throw new IOException(Msg.getString("K0078")); //$NON-NLS-1$
+            throw new IOException(Messages.getString("luni.CF")); //$NON-NLS-1$
         }
         if (lastReader != null && !lastReader.isAlive()) {
-            throw new IOException(Msg.getString("K0076")); //$NON-NLS-1$
+            throw new IOException(Messages.getString("luni.CE")); //$NON-NLS-1$
         }
         /**
          * Set the last thread to be writing on this PipedInputStream. If
@@ -360,7 +360,7 @@
                 notifyAll();
                 wait(1000);
                 if (lastReader != null && !lastReader.isAlive()) {
-                    throw new IOException(Msg.getString("K0076")); //$NON-NLS-1$
+                    throw new IOException(Messages.getString("luni.CE")); //$NON-NLS-1$
                 }
             }
         } catch (InterruptedException e) {

Modified: harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/io/PipedOutputStream.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/io/PipedOutputStream.java?rev=909600&r1=909599&r2=909600&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/io/PipedOutputStream.java (original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/io/PipedOutputStream.java Fri Feb 12 20:40:48 2010
@@ -17,7 +17,7 @@
 
 package java.io;
 
-import org.apache.harmony.luni.util.Msg;
+import org.apache.harmony.luni.internal.nls.Messages;
 
 /**
  * Places information on a communications pipe. When two threads want to pass
@@ -87,11 +87,11 @@
             throw new NullPointerException();
         }
         if (this.dest != null) {
-            throw new IOException(Msg.getString("K0079")); //$NON-NLS-1$
+            throw new IOException(Messages.getString("luni.5F")); //$NON-NLS-1$
         }
         synchronized (stream) {
             if (stream.isConnected) {
-                throw new IOException(Msg.getString("K007a")); //$NON-NLS-1$
+                throw new IOException(Messages.getString("luni.D0")); //$NON-NLS-1$
             }
             stream.buffer = new byte[PipedInputStream.PIPE_SIZE];
             stream.isConnected = true;
@@ -146,8 +146,8 @@
     @Override
     public void write(byte buffer[], int offset, int count) throws IOException {
         if (dest == null) {
-            // K007b=Pipe Not Connected
-            throw new IOException(Msg.getString("K007b")); //$NON-NLS-1$
+            // luni.D1=Pipe Not Connected
+            throw new IOException(Messages.getString("luni.D1")); //$NON-NLS-1$
         }
         super.write(buffer, offset, count);
     }
@@ -175,7 +175,7 @@
     @Override
     public void write(int oneByte) throws IOException {
         if (dest == null) {
-            throw new IOException(Msg.getString("K007b")); //$NON-NLS-1$
+            throw new IOException(Messages.getString("luni.D1")); //$NON-NLS-1$
         }
         dest.receive(oneByte);
     }

Modified: harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/io/PipedReader.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/io/PipedReader.java?rev=909600&r1=909599&r2=909600&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/io/PipedReader.java (original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/io/PipedReader.java Fri Feb 12 20:40:48 2010
@@ -17,7 +17,7 @@
 
 package java.io;
 
-import org.apache.harmony.luni.util.Msg;
+import org.apache.harmony.luni.internal.nls.Messages;
 
 /**
  * Receives information on a communications pipe. When two threads want to pass
@@ -129,10 +129,10 @@
     void establishConnection() throws IOException {
         synchronized (lock) {
             if (data == null) {
-                throw new IOException(Msg.getString("K0078")); //$NON-NLS-1$
+                throw new IOException(Messages.getString("luni.CF")); //$NON-NLS-1$
             }
             if (isConnected) {
-                throw new IOException(Msg.getString("K007a")); //$NON-NLS-1$
+                throw new IOException(Messages.getString("luni.D0")); //$NON-NLS-1$
             }
             isConnected = true;
         }
@@ -195,10 +195,10 @@
     public int read(char[] buffer, int offset, int count) throws IOException {
         synchronized (lock) {
             if (!isConnected) {
-                throw new IOException(Msg.getString("K007b")); //$NON-NLS-1$
+                throw new IOException(Messages.getString("luni.D1")); //$NON-NLS-1$
             }
             if (data == null) {
-                throw new IOException(Msg.getString("K0078")); //$NON-NLS-1$
+                throw new IOException(Messages.getString("luni.CF")); //$NON-NLS-1$
             }
             // avoid int overflow
             if (offset < 0 || count > buffer.length - offset || count < 0) {
@@ -221,7 +221,7 @@
                         return -1;
                     }
                     if (!first && lastWriter != null && !lastWriter.isAlive()) {
-                        throw new IOException(Msg.getString("K0076")); //$NON-NLS-1$
+                        throw new IOException(Messages.getString("luni.CE")); //$NON-NLS-1$
                     }
                     first = false;
                     // Notify callers of receive()
@@ -291,10 +291,10 @@
     public boolean ready() throws IOException {
         synchronized (lock) {
             if (!isConnected) {
-                throw new IOException(Msg.getString("K007b")); //$NON-NLS-1$
+                throw new IOException(Messages.getString("luni.D1")); //$NON-NLS-1$
             }
             if (data == null) {
-                throw new IOException(Msg.getString("K0078")); //$NON-NLS-1$
+                throw new IOException(Messages.getString("luni.CF")); //$NON-NLS-1$
             }
             return in != -1;
         }
@@ -317,10 +317,10 @@
     void receive(char oneChar) throws IOException {
         synchronized (lock) {
             if (data == null) {
-                throw new IOException(Msg.getString("K0078")); //$NON-NLS-1$
+                throw new IOException(Messages.getString("luni.CF")); //$NON-NLS-1$
             }
             if (lastReader != null && !lastReader.isAlive()) {
-                throw new IOException(Msg.getString("K0076")); //$NON-NLS-1$
+                throw new IOException(Messages.getString("luni.CE")); //$NON-NLS-1$
             }
             /*
              * Set the last thread to be writing on this PipedWriter. If
@@ -333,7 +333,7 @@
                     lock.notifyAll();
                     wait(1000);
                     if (lastReader != null && !lastReader.isAlive()) {
-                        throw new IOException(Msg.getString("K0076")); //$NON-NLS-1$
+                        throw new IOException(Messages.getString("luni.CE")); //$NON-NLS-1$
                     }
                 }
             } catch (InterruptedException e) {
@@ -373,10 +373,10 @@
     void receive(char[] chars, int offset, int count) throws IOException {
         synchronized (lock) {
             if (data == null) {
-                throw new IOException(Msg.getString("K0078")); //$NON-NLS-1$
+                throw new IOException(Messages.getString("luni.CF")); //$NON-NLS-1$
             }
             if (lastReader != null && !lastReader.isAlive()) {
-                throw new IOException(Msg.getString("K0076")); //$NON-NLS-1$
+                throw new IOException(Messages.getString("luni.CE")); //$NON-NLS-1$
             }
             /**
              * Set the last thread to be writing on this PipedWriter. If
@@ -390,7 +390,7 @@
                         lock.notifyAll();
                         wait(1000);
                         if (lastReader != null && !lastReader.isAlive()) {
-                            throw new IOException(Msg.getString("K0076")); //$NON-NLS-1$
+                            throw new IOException(Messages.getString("luni.CE")); //$NON-NLS-1$
                         }
                     }
                 } catch (InterruptedException e) {

Modified: harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/io/PipedWriter.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/io/PipedWriter.java?rev=909600&r1=909599&r2=909600&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/io/PipedWriter.java (original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/io/PipedWriter.java Fri Feb 12 20:40:48 2010
@@ -17,7 +17,7 @@
 
 package java.io;
 
-import org.apache.harmony.luni.util.Msg;
+import org.apache.harmony.luni.internal.nls.Messages;
 
 /**
  * Places information on a communications pipe. When two threads want to pass
@@ -93,10 +93,10 @@
     public void connect(PipedReader stream) throws IOException {
         synchronized (lock) {
             if (this.dest != null) {
-                throw new IOException(Msg.getString("K0079")); //$NON-NLS-1$
+                throw new IOException(Messages.getString("luni.5F")); //$NON-NLS-1$
             }
             if (closed) {
-                throw new IOException(Msg.getString("K0078")); //$NON-NLS-1$
+                throw new IOException(Messages.getString("luni.CF")); //$NON-NLS-1$
             }
             stream.establishConnection();
             this.dest = stream;
@@ -152,13 +152,13 @@
     public void write(char buffer[], int offset, int count) throws IOException {
         synchronized (lock) {
             if (closed) {
-                throw new IOException(Msg.getString("K0078")); //$NON-NLS-1$
+                throw new IOException(Messages.getString("luni.CF")); //$NON-NLS-1$
             }
             if (dest == null) {
-                throw new IOException(Msg.getString("K007b")); //$NON-NLS-1$
+                throw new IOException(Messages.getString("luni.D1")); //$NON-NLS-1$
             }
             if (buffer == null) {
-                throw new NullPointerException(Msg.getString("K0047")); //$NON-NLS-1$
+                throw new NullPointerException(Messages.getString("luni.11")); //$NON-NLS-1$
             }
 
             // avoid int overflow
@@ -194,10 +194,10 @@
     public void write(int c) throws IOException {
         synchronized (lock) {
             if (closed) {
-                throw new IOException(Msg.getString("K0078")); //$NON-NLS-1$
+                throw new IOException(Messages.getString("luni.CF")); //$NON-NLS-1$
             }
             if (dest == null) {
-                throw new IOException(Msg.getString("K007b")); //$NON-NLS-1$
+                throw new IOException(Messages.getString("luni.D1")); //$NON-NLS-1$
             }
             dest.receive((char) c);
         }

Modified: harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/io/PrintStream.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/io/PrintStream.java?rev=909600&r1=909599&r2=909600&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/io/PrintStream.java (original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/io/PrintStream.java Fri Feb 12 20:40:48 2010
@@ -24,7 +24,7 @@
 import java.util.IllegalFormatException;
 import java.util.Locale;
 
-import org.apache.harmony.luni.util.Msg;
+import org.apache.harmony.luni.internal.nls.Messages;
 import org.apache.harmony.luni.util.PriviAction;
 
 /**
@@ -324,7 +324,7 @@
      */
     public PrintStream format(Locale l, String format, Object... args) {
         if (format == null) {
-            throw new NullPointerException(Msg.getString("K0351")); //$NON-NLS-1$
+            throw new NullPointerException(Messages.getString("luni.D2")); //$NON-NLS-1$
         }
         new Formatter(this, l).format(format, args);
         return this;
@@ -667,12 +667,12 @@
     public void write(byte[] buffer, int offset, int length) {
         // Force buffer null check first!
         if (offset > buffer.length || offset < 0) {
-            // K002e=Offset out of bounds \: {0}
-            throw new ArrayIndexOutOfBoundsException(Msg.getString("K002e", offset)); //$NON-NLS-1$
+            // luni.12=Offset out of bounds \: {0}
+            throw new ArrayIndexOutOfBoundsException(Messages.getString("luni.12", offset)); //$NON-NLS-1$
         }
         if (length < 0 || length > buffer.length - offset) {
-            // K0031=Length out of bounds \: {0}
-            throw new ArrayIndexOutOfBoundsException(Msg.getString("K0031", length)); //$NON-NLS-1$
+            // luni.18=Length out of bounds \: {0}
+            throw new ArrayIndexOutOfBoundsException(Messages.getString("luni.18", length)); //$NON-NLS-1$
         }
         synchronized (this) {
             if (out == null) {

Modified: harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/io/PrintWriter.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/io/PrintWriter.java?rev=909600&r1=909599&r2=909600&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/io/PrintWriter.java (original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/io/PrintWriter.java Fri Feb 12 20:40:48 2010
@@ -22,7 +22,7 @@
 import java.util.IllegalFormatException;
 import java.util.Locale;
 
-import org.apache.harmony.luni.util.Msg;
+import org.apache.harmony.luni.internal.nls.Messages;
 import org.apache.harmony.luni.util.PriviAction;
 
 /**
@@ -318,7 +318,7 @@
      */
     public PrintWriter format(Locale l, String format, Object... args) {
         if (format == null) {
-            throw new NullPointerException(Msg.getString("K0351")); //$NON-NLS-1$
+            throw new NullPointerException(Messages.getString("luni.D2")); //$NON-NLS-1$
         }
         new Formatter(this, l).format(format, args);
         if (autoflush) {

Modified: harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/io/PushbackInputStream.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/io/PushbackInputStream.java?rev=909600&r1=909599&r2=909600&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/io/PushbackInputStream.java (original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/io/PushbackInputStream.java Fri Feb 12 20:40:48 2010
@@ -17,7 +17,7 @@
 
 package java.io;
 
-import org.apache.harmony.luni.util.Msg;
+import org.apache.harmony.luni.internal.nls.Messages;
 
 /**
  * Wraps an existing {@link InputStream} and adds functionality to "push back"
@@ -67,7 +67,7 @@
     public PushbackInputStream(InputStream in, int size) {
         super(in);
         if (size <= 0) {
-            throw new IllegalArgumentException(Msg.getString("K0058")); //$NON-NLS-1$
+            throw new IllegalArgumentException(Messages.getString("luni.A3")); //$NON-NLS-1$
         }
         buf = (in == null) ? null : new byte[size];
         pos = size;
@@ -177,17 +177,17 @@
     @Override
     public int read(byte[] buffer, int offset, int length) throws IOException {
         if (buf == null) {
-            // K0059=Stream is closed
-            throw new IOException(Msg.getString("K0059")); //$NON-NLS-1$
+            // luni.24=Stream is closed
+            throw new IOException(Messages.getString("luni.24")); //$NON-NLS-1$
         }
         // Force buffer null check first!
         if (offset > buffer.length || offset < 0) {
-            // K002e=Offset out of bounds \: {0}
-            throw new ArrayIndexOutOfBoundsException(Msg.getString("K002e", offset)); //$NON-NLS-1$
+            // luni.12=Offset out of bounds \: {0}
+            throw new ArrayIndexOutOfBoundsException(Messages.getString("luni.12", offset)); //$NON-NLS-1$
         }
         if (length < 0 || length > buffer.length - offset) {
-            // K0031=Length out of bounds \: {0}
-            throw new ArrayIndexOutOfBoundsException(Msg.getString("K0031", length)); //$NON-NLS-1$
+            // luni.18=Length out of bounds \: {0}
+            throw new ArrayIndexOutOfBoundsException(Messages.getString("luni.18", length)); //$NON-NLS-1$
         }
 
         int copiedBytes = 0, copyLength = 0, newOffset = offset;
@@ -228,7 +228,7 @@
     @Override
     public long skip(long count) throws IOException {
         if (in == null) {
-            throw new IOException(Msg.getString("K0059")); //$NON-NLS-1$
+            throw new IOException(Messages.getString("luni.24")); //$NON-NLS-1$
         }
         if (count <= 0) {
             return 0;
@@ -293,20 +293,20 @@
     public void unread(byte[] buffer, int offset, int length)
             throws IOException {
         if (length > pos) {
-            // K007e=Pushback buffer full
-            throw new IOException(Msg.getString("K007e")); //$NON-NLS-1$
+            // luni.D3=Pushback buffer full
+            throw new IOException(Messages.getString("luni.D3")); //$NON-NLS-1$
         }
         if (offset > buffer.length || offset < 0) {
-            // K002e=Offset out of bounds \: {0}
-            throw new ArrayIndexOutOfBoundsException(Msg.getString("K002e", offset)); //$NON-NLS-1$
+            // luni.12=Offset out of bounds \: {0}
+            throw new ArrayIndexOutOfBoundsException(Messages.getString("luni.12", offset)); //$NON-NLS-1$
         }
         if (length < 0 || length > buffer.length - offset) {
-            // K0031=Length out of bounds \: {0}
-            throw new ArrayIndexOutOfBoundsException(Msg.getString("K0031", length)); //$NON-NLS-1$
+            // luni.18=Length out of bounds \: {0}
+            throw new ArrayIndexOutOfBoundsException(Messages.getString("luni.18", length)); //$NON-NLS-1$
         }
         if (buf == null) {
-            // K0059=Stream is closed
-            throw new IOException(Msg.getString("K0059")); //$NON-NLS-1$
+            // luni.24=Stream is closed
+            throw new IOException(Messages.getString("luni.24")); //$NON-NLS-1$
         }
 
         System.arraycopy(buffer, offset, buf, pos - length, length);
@@ -333,7 +333,7 @@
             throw new IOException();
         }
         if (pos == 0) {
-            throw new IOException(Msg.getString("K007e")); //$NON-NLS-1$
+            throw new IOException(Messages.getString("luni.D3")); //$NON-NLS-1$
         }
         buf[--pos] = (byte) oneByte;
     }

Modified: harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/io/PushbackReader.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/io/PushbackReader.java?rev=909600&r1=909599&r2=909600&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/io/PushbackReader.java (original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/io/PushbackReader.java Fri Feb 12 20:40:48 2010
@@ -17,7 +17,7 @@
 
 package java.io;
 
-import org.apache.harmony.luni.util.Msg;
+import org.apache.harmony.luni.internal.nls.Messages;
 
 /**
  * Wraps an existing {@link Reader} and adds functionality to "push back"
@@ -67,7 +67,7 @@
     public PushbackReader(Reader in, int size) {
         super(in);
         if (size <= 0) {
-            throw new IllegalArgumentException(Msg.getString("K0058")); //$NON-NLS-1$
+            throw new IllegalArgumentException(Messages.getString("luni.A3")); //$NON-NLS-1$
         }
         buf = new char[size];
         pos = size;
@@ -101,7 +101,7 @@
      */
     @Override
     public void mark(int readAheadLimit) throws IOException {
-        throw new IOException(Msg.getString("K007f")); //$NON-NLS-1$
+        throw new IOException(Messages.getString("luni.D4")); //$NON-NLS-1$
     }
 
     /**
@@ -136,7 +136,7 @@
     public int read() throws IOException {
         synchronized (lock) {
             if (buf == null) {
-                throw new IOException(Msg.getString("K0059")); //$NON-NLS-1$
+                throw new IOException(Messages.getString("luni.24")); //$NON-NLS-1$
             }
             /* Is there a pushback character available? */
             if (pos < buf.length) {
@@ -179,7 +179,7 @@
     public int read(char[] buffer, int offset, int count) throws IOException {
         synchronized (lock) {
             if (null == buf) {
-                throw new IOException(Msg.getString("K0059")); //$NON-NLS-1$
+                throw new IOException(Messages.getString("luni.24")); //$NON-NLS-1$
             }
             // avoid int overflow
             if (offset < 0 || count < 0 || offset > buffer.length - count) {
@@ -231,7 +231,7 @@
     public boolean ready() throws IOException {
         synchronized (lock) {
             if (buf == null) {
-                throw new IOException(Msg.getString("K0080")); //$NON-NLS-1$
+                throw new IOException(Messages.getString("luni.D5")); //$NON-NLS-1$
             }
             return (buf.length - pos > 0 || in.ready());
         }
@@ -247,7 +247,7 @@
      */
     @Override
     public void reset() throws IOException {
-        throw new IOException(Msg.getString("K007f")); //$NON-NLS-1$
+        throw new IOException(Messages.getString("luni.D4")); //$NON-NLS-1$
     }
 
     /**
@@ -305,21 +305,21 @@
     public void unread(char[] buffer, int offset, int length) throws IOException {
         synchronized (lock) {
             if (buf == null) {
-                // K0059=Stream is closed
-                throw new IOException(Msg.getString("K0059")); //$NON-NLS-1$
+                // luni.24=Stream is closed
+                throw new IOException(Messages.getString("luni.24")); //$NON-NLS-1$
             }
             if (length > pos) {
-                // K007e=Pushback buffer full
-                throw new IOException(Msg.getString("K007e")); //$NON-NLS-1$
+                // luni.D3=Pushback buffer full
+                throw new IOException(Messages.getString("luni.D3")); //$NON-NLS-1$
             }
             // Force buffer null check first!
             if (offset > buffer.length - length || offset < 0) {
-                // K002e=Offset out of bounds \: {0}
-                throw new ArrayIndexOutOfBoundsException(Msg.getString("K002e", offset)); //$NON-NLS-1$
+                // luni.12=Offset out of bounds \: {0}
+                throw new ArrayIndexOutOfBoundsException(Messages.getString("luni.12", offset)); //$NON-NLS-1$
             }
             if (length < 0) {
-                // K0031=Length out of bounds \: {0}
-                throw new ArrayIndexOutOfBoundsException(Msg.getString("K0031", length)); //$NON-NLS-1$
+                // luni.18=Length out of bounds \: {0}
+                throw new ArrayIndexOutOfBoundsException(Messages.getString("luni.18", length)); //$NON-NLS-1$
             }
 
             for (int i = offset + length - 1; i >= offset; i--) {
@@ -345,10 +345,10 @@
     public void unread(int oneChar) throws IOException {
         synchronized (lock) {
             if (buf == null) {
-                throw new IOException(Msg.getString("K0059")); //$NON-NLS-1$
+                throw new IOException(Messages.getString("luni.24")); //$NON-NLS-1$
             }
             if (pos == 0) {
-                throw new IOException(Msg.getString("K007e")); //$NON-NLS-1$
+                throw new IOException(Messages.getString("luni.D3")); //$NON-NLS-1$
             }
             buf[--pos] = (char) oneChar;
         }
@@ -373,7 +373,7 @@
         }
         synchronized (lock) {
             if (buf == null) {
-                throw new IOException(Msg.getString("K0059")); //$NON-NLS-1$
+                throw new IOException(Messages.getString("luni.24")); //$NON-NLS-1$
             }
             if (count == 0) {
                 return 0;

Modified: harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/io/StringBufferInputStream.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/io/StringBufferInputStream.java?rev=909600&r1=909599&r2=909600&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/io/StringBufferInputStream.java (original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/io/StringBufferInputStream.java Fri Feb 12 20:40:48 2010
@@ -17,7 +17,7 @@
 
 package java.io;
 
-import org.apache.harmony.luni.util.Msg;
+import org.apache.harmony.luni.internal.nls.Messages;
 
 /**
  * A specialized {@link InputStream} that reads bytes from a {@code String} in
@@ -112,17 +112,17 @@
             return -1;
         }
         if (b == null) {
-            // K0047=buffer is null
-            throw new NullPointerException(Msg.getString("K0047")); //$NON-NLS-1$
+            // luni.11=buffer is null
+            throw new NullPointerException(Messages.getString("luni.11")); //$NON-NLS-1$
         }
         // avoid int overflow
         if (offset < 0 || offset > b.length) {
-            // K002e=Offset out of bounds \: {0}
-            throw new ArrayIndexOutOfBoundsException(Msg.getString("K002e", offset)); //$NON-NLS-1$
+            // luni.12=Offset out of bounds \: {0}
+            throw new ArrayIndexOutOfBoundsException(Messages.getString("luni.12", offset)); //$NON-NLS-1$
         }
         if (length < 0 || length > b.length - offset) {
-            // K0031=Length out of bounds \: {0}
-            throw new ArrayIndexOutOfBoundsException(Msg.getString("K0031", length)); //$NON-NLS-1$
+            // luni.18=Length out of bounds \: {0}
+            throw new ArrayIndexOutOfBoundsException(Messages.getString("luni.18", length)); //$NON-NLS-1$
         }
 
         if (length == 0) {

Modified: harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/io/StringReader.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/io/StringReader.java?rev=909600&r1=909599&r2=909600&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/io/StringReader.java (original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/io/StringReader.java Fri Feb 12 20:40:48 2010
@@ -17,7 +17,7 @@
 
 package java.io;
 
-import org.apache.harmony.luni.util.Msg;
+import org.apache.harmony.luni.internal.nls.Messages;
 
 /**
  * A specialized {@link Reader} that reads characters from a {@code String} in
@@ -89,7 +89,7 @@
 
         synchronized (lock) {
             if (isClosed()) {
-                throw new IOException(Msg.getString("K0083")); //$NON-NLS-1$
+                throw new IOException(Messages.getString("luni.D6")); //$NON-NLS-1$
             }
             markpos = pos;
         }
@@ -120,7 +120,7 @@
     public int read() throws IOException {
         synchronized (lock) {
             if (isClosed()) {
-                throw new IOException(Msg.getString("K0083")); //$NON-NLS-1$
+                throw new IOException(Messages.getString("luni.D6")); //$NON-NLS-1$
             }
             if (pos != count) {
                 return str.charAt(pos++);
@@ -154,16 +154,16 @@
     public int read(char buf[], int offset, int len) throws IOException {
         synchronized (lock) {
             if (isClosed()) {
-                // K0083=StringReader is closed.
-                throw new IOException(Msg.getString("K0083")); //$NON-NLS-1$
+                // luni.D6=StringReader is closed.
+                throw new IOException(Messages.getString("luni.D6")); //$NON-NLS-1$
             }
             if (offset < 0 || offset > buf.length) {
-                // K002e=Offset out of bounds \: {0}
-                throw new ArrayIndexOutOfBoundsException(Msg.getString("K002e", offset)); //$NON-NLS-1$
+                // luni.12=Offset out of bounds \: {0}
+                throw new ArrayIndexOutOfBoundsException(Messages.getString("luni.12", offset)); //$NON-NLS-1$
             }
             if (len < 0 || len > buf.length - offset) {
-                // K0031=Length out of bounds \: {0}
-                throw new ArrayIndexOutOfBoundsException(Msg.getString("K0031", len)); //$NON-NLS-1$
+                // luni.18=Length out of bounds \: {0}
+                throw new ArrayIndexOutOfBoundsException(Messages.getString("luni.18", len)); //$NON-NLS-1$
             }
             if (len == 0) {
                 return 0;
@@ -193,7 +193,7 @@
     public boolean ready() throws IOException {
         synchronized (lock) {
             if (isClosed()) {
-                throw new IOException(Msg.getString("K0083")); //$NON-NLS-1$
+                throw new IOException(Messages.getString("luni.D6")); //$NON-NLS-1$
             }
             return true;
         }
@@ -214,7 +214,7 @@
     public void reset() throws IOException {
         synchronized (lock) {
             if (isClosed()) {
-                throw new IOException(Msg.getString("K0083")); //$NON-NLS-1$
+                throw new IOException(Messages.getString("luni.D6")); //$NON-NLS-1$
             }
             pos = markpos != -1 ? markpos : 0;
         }
@@ -244,7 +244,7 @@
     public long skip(long ns) throws IOException {
         synchronized (lock) {
             if (isClosed()) {
-                throw new IOException(Msg.getString("K0083")); //$NON-NLS-1$
+                throw new IOException(Messages.getString("luni.D6")); //$NON-NLS-1$
             }
 
             int minSkip = -pos;

Modified: harmony/enhanced/classlib/trunk/modules/luni/src/main/java/org/apache/harmony/luni/internal/nls/messages.properties
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/org/apache/harmony/luni/internal/nls/messages.properties?rev=909600&r1=909599&r2=909600&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/main/java/org/apache/harmony/luni/internal/nls/messages.properties (original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/main/java/org/apache/harmony/luni/internal/nls/messages.properties Fri Feb 12 20:40:48 2010
@@ -202,3 +202,30 @@
 luni.B9=invalid permission\: {0}
 luni.BA=InputStreamReader is closed.
 luni.BB=seek position is negative
+luni.BC=Wrong format\: 0x{0}
+luni.BD=Read an exception
+luni.BE=Unshared read of back reference
+luni.BF=Invalid typecode\: {0}
+luni.C0={2} - {0} not compatible with {1}
+luni.C1=Read null attempting to read class descriptor for an object
+luni.C2=Wrong base type in\: {0}
+luni.C3=Incompatible class (SUID)\: {0} but expected {1}
+luni.C4=IllegalAccessException
+luni.C5=Cannot read back reference to unshared object
+luni.C6=Callback object cannot be null
+luni.C7=Incompatible class (base name)\: {0} but expected {1}
+luni.C8=Cannot set protocol version when stream in use
+luni.C9=Error fetching SUID\: {0}
+luni.CA={0} computing SHA-1 / SUID
+luni.CB=Not connected
+luni.CC=InputStream is closed
+luni.CD=Write end dead
+luni.CE=Pipe broken
+luni.CF=Pipe is closed
+luni.D0=Pipe already connected
+luni.D1=Pipe Not Connected
+luni.D2=format is null
+luni.D3=Pushback buffer full
+luni.D4=Mark/Reset not supported
+luni.D5=Reader is closed
+luni.D6=StringReader is closed.



Mime
View raw message