harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From telli...@apache.org
Subject svn commit: r588245 [5/10] - in /harmony/enhanced/classlib/branches/java6: depends/build/ depends/files/ make/ modules/annotation/src/test/java/org/apache/harmony/annotation/tests/java/lang/annotation/ modules/archive/ modules/archive/src/main/java/jav...
Date Thu, 25 Oct 2007 14:45:48 GMT
Modified: harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/util/ArrayList.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/util/ArrayList.java?rev=588245&r1=588244&r2=588245&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/util/ArrayList.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/util/ArrayList.java Thu Oct 25 07:44:56 2007
@@ -17,7 +17,6 @@
 
 package java.util;
 
-
 import java.io.IOException;
 import java.io.ObjectInputStream;
 import java.io.ObjectOutputStream;
@@ -29,140 +28,143 @@
  * ArrayList is an implementation of List, backed by an array. All optional
  * operations are supported, adding, removing, and replacing. The elements can
  * be any objects.
+ * 
  * @since 1.2
  */
-public class ArrayList<E> extends AbstractList<E> implements List<E>, Cloneable,
-		Serializable, RandomAccess {
+public class ArrayList<E> extends AbstractList<E> implements List<E>,
+        Cloneable, Serializable, RandomAccess {
+
+    private static final long serialVersionUID = 8683452581122892189L;
 
-	private static final long serialVersionUID = 8683452581122892189L;
+    private transient int firstIndex;
 
-	private transient int firstIndex;
-    
     private transient int lastIndex;
 
-	private transient E[] array;
+    private transient E[] array;
+
+    /**
+     * Constructs a new instance of ArrayList with zero capacity.
+     */
+    public ArrayList() {
+        this(0);
+    }
+
+    /**
+     * Constructs a new instance of ArrayList with the specified capacity.
+     * 
+     * @param capacity
+     *            the initial capacity of this ArrayList
+     */
+    public ArrayList(int capacity) {
+        firstIndex = lastIndex = 0;
+        try {
+            array = newElementArray(capacity);
+        } catch (NegativeArraySizeException e) {
+            throw new IllegalArgumentException();
+        }
+    }
 
-	/**
-	 * Constructs a new instance of ArrayList with zero capacity.
-	 */
-	public ArrayList() {
-		this(0);
-	}
-
-	/**
-	 * Constructs a new instance of ArrayList with the specified capacity.
-	 * 
-	 * @param capacity
-	 *            the initial capacity of this ArrayList
-	 */
-	public ArrayList(int capacity) {
-		firstIndex = lastIndex = 0;
-		try {
-			array = newElementArray(capacity);
-		} catch (NegativeArraySizeException e) {
-			throw new IllegalArgumentException();
-		}
-	}
-
-	/**
-	 * Constructs a new instance of ArrayList containing the elements in the
-	 * specified collection. The ArrayList will have an initial capacity which
-	 * is 110% of the size of the collection. The order of the elements in this
-	 * ArrayList is the order they are returned by the collection iterator.
-	 * 
-	 * @param collection
-	 *            the collection of elements to add
-	 */
-	public ArrayList(Collection<? extends E> collection) {
-		int size = collection.size();
-		firstIndex = 0;
-		array = newElementArray(size + (size / 10));
+    /**
+     * Constructs a new instance of ArrayList containing the elements in the
+     * specified collection. The ArrayList will have an initial capacity which
+     * is 110% of the size of the collection. The order of the elements in this
+     * ArrayList is the order they are returned by the collection iterator.
+     * 
+     * @param collection
+     *            the collection of elements to add
+     */
+    public ArrayList(Collection<? extends E> collection) {
+        int size = collection.size();
+        firstIndex = 0;
+        array = newElementArray(size + (size / 10));
         collection.toArray(array);
         lastIndex = size;
         modCount = 1;
-	}
-    
+    }
+
     @SuppressWarnings("unchecked")
     private E[] newElementArray(int size) {
-        return (E[])new Object[size];
+        return (E[]) new Object[size];
     }
 
-	/**
-	 * Inserts the specified object into this ArrayList at the specified
-	 * location. The object is inserted before any previous element at the
-	 * specified location. If the location is equal to the size of this
-	 * ArrayList, the object is added at the end.
-	 * 
-	 * @param location
-	 *            the index at which to insert
-	 * @param object
-	 *            the object to add
-	 * 
-	 * @exception IndexOutOfBoundsException
-	 *                when <code>location < 0 || >= size()</code>
-	 */
-	@Override
+    /**
+     * Inserts the specified object into this ArrayList at the specified
+     * location. The object is inserted before any previous element at the
+     * specified location. If the location is equal to the size of this
+     * ArrayList, the object is added at the end.
+     * 
+     * @param location
+     *            the index at which to insert
+     * @param object
+     *            the object to add
+     * 
+     * @exception IndexOutOfBoundsException
+     *                when <code>location < 0 || >= size()</code>
+     */
+    @Override
     public void add(int location, E object) {
-		int size = size();
-		if (0 < location && location < size) {
-			if (firstIndex == 0 && lastIndex == array.length) {
-				growForInsert(location, 1);
-			} else if ((location < size / 2 && firstIndex > 0)
-					|| lastIndex == array.length) {
-				System.arraycopy(array, firstIndex, array, --firstIndex,
-						location);
-			} else {
-				int index = location + firstIndex;
-				System.arraycopy(array, index, array, index + 1, size
-						- location);
-				lastIndex++;
-			}
-			array[location + firstIndex] = object;
-		} else if (location == 0) {
-			if (firstIndex == 0) {
+        int size = size();
+        if (0 < location && location < size) {
+            if (firstIndex == 0 && lastIndex == array.length) {
+                growForInsert(location, 1);
+            } else if ((location < size / 2 && firstIndex > 0)
+                    || lastIndex == array.length) {
+                System.arraycopy(array, firstIndex, array, --firstIndex,
+                        location);
+            } else {
+                int index = location + firstIndex;
+                System.arraycopy(array, index, array, index + 1, size
+                        - location);
+                lastIndex++;
+            }
+            array[location + firstIndex] = object;
+        } else if (location == 0) {
+            if (firstIndex == 0) {
                 growAtFront(1);
             }
-			array[--firstIndex] = object;
-		} else if (location == size) {
-			if (lastIndex == array.length) {
+            array[--firstIndex] = object;
+        } else if (location == size) {
+            if (lastIndex == array.length) {
                 growAtEnd(1);
             }
-			array[lastIndex++] = object;
-		} else {
+            array[lastIndex++] = object;
+        } else {
             throw new IndexOutOfBoundsException();
         }
 
-		modCount++;
-	}
+        modCount++;
+    }
 
-	/**
-	 * Adds the specified object at the end of this ArrayList.
-	 * 
-	 * @param object
-	 *            the object to add
-	 * @return true
-	 */
-	@Override
+    /**
+     * Adds the specified object at the end of this ArrayList.
+     * 
+     * @param object
+     *            the object to add
+     * @return true
+     */
+    @Override
     public boolean add(E object) {
-		if (lastIndex == array.length) {
+        if (lastIndex == array.length) {
             growAtEnd(1);
         }
-		array[lastIndex++] = object;
-		modCount++;
-		return true;
-	}
+        array[lastIndex++] = object;
+        modCount++;
+        return true;
+    }
 
-	/**
+    /**
      * Inserts the objects in the specified Collection at the specified location
      * in this ArrayList. The objects are added in the order they are returned
      * from the Collection iterator.
      * 
-     * @param location the index at which to insert
-     * @param collection the Collection of objects
+     * @param location
+     *            the index at which to insert
+     * @param collection
+     *            the Collection of objects
      * @return true if this ArrayList is modified, false otherwise
      * 
-     * @exception IndexOutOfBoundsException when
-     *            <code>location < 0 || > size()</code>
+     * @exception IndexOutOfBoundsException
+     *                when <code>location < 0 || > size()</code>
      */
     @Override
     public boolean addAll(int location, Collection<? extends E> collection) {
@@ -205,327 +207,329 @@
         if (growSize > 0) {
             Object[] dumparray = new Object[growSize];
             collection.toArray(dumparray);
-            System.arraycopy(dumparray, 0, this.array, location+firstIndex, growSize);
+            System.arraycopy(dumparray, 0, this.array, location + firstIndex,
+                    growSize);
             modCount++;
             return true;
         }
         return false;
     }
 
-	/**
-	 * Adds the objects in the specified Collection to this ArrayList.
-	 * 
-	 * @param collection
-	 *            the Collection of objects
-	 * @return true if this ArrayList is modified, false otherwise
-	 */
-	@Override
+    /**
+     * Adds the objects in the specified Collection to this ArrayList.
+     * 
+     * @param collection
+     *            the Collection of objects
+     * @return true if this ArrayList is modified, false otherwise
+     */
+    @Override
     public boolean addAll(Collection<? extends E> collection) {
-		int growSize = collection.size();
-		if (growSize > 0) {
-			if (lastIndex > array.length - growSize) {
+        int growSize = collection.size();
+        if (growSize > 0) {
+            if (lastIndex > array.length - growSize) {
                 growAtEnd(growSize);
             }
             Object[] dumparray = new Object[growSize];
             collection.toArray(dumparray);
             System.arraycopy(dumparray, 0, this.array, lastIndex, growSize);
             lastIndex += growSize;
-			modCount++;
-			return true;
-		}
-		return false;
-	}
-
-	/**
-	 * Removes all elements from this ArrayList, leaving it empty.
-	 * 
-	 * @see #isEmpty
-	 * @see #size
-	 */
-	@Override
+            modCount++;
+            return true;
+        }
+        return false;
+    }
+
+    /**
+     * Removes all elements from this ArrayList, leaving it empty.
+     * 
+     * @see #isEmpty
+     * @see #size
+     */
+    @Override
     public void clear() {
-		if (firstIndex != lastIndex) {
-			Arrays.fill(array, firstIndex, lastIndex, null);
-			firstIndex = lastIndex = 0;
-			modCount++;
-		}
-	}
-
-	/**
-	 * Answers a new ArrayList with the same elements, size and capacity as this
-	 * ArrayList.
-	 * 
-	 * @return a shallow copy of this ArrayList
-	 * 
-	 * @see java.lang.Cloneable
-	 */
-	@Override
+        if (firstIndex != lastIndex) {
+            Arrays.fill(array, firstIndex, lastIndex, null);
+            firstIndex = lastIndex = 0;
+            modCount++;
+        }
+    }
+
+    /**
+     * Answers a new ArrayList with the same elements, size and capacity as this
+     * ArrayList.
+     * 
+     * @return a shallow copy of this ArrayList
+     * 
+     * @see java.lang.Cloneable
+     */
+    @Override
     @SuppressWarnings("unchecked")
     public Object clone() {
-		try {
-			ArrayList<E> newList = (ArrayList<E>) super.clone();
-			newList.array = array.clone();
-			return newList;
-		} catch (CloneNotSupportedException e) {
-			return null;
-		}
-	}
-
-	/**
-	 * Searches this ArrayList for the specified object.
-	 * 
-	 * @param object
-	 *            the object to search for
-	 * @return true if <code>object</code> is an element of this ArrayList,
-	 *         false otherwise
-	 */
-	@Override
+        try {
+            ArrayList<E> newList = (ArrayList<E>) super.clone();
+            newList.array = array.clone();
+            return newList;
+        } catch (CloneNotSupportedException e) {
+            return null;
+        }
+    }
+
+    /**
+     * Searches this ArrayList for the specified object.
+     * 
+     * @param object
+     *            the object to search for
+     * @return true if <code>object</code> is an element of this ArrayList,
+     *         false otherwise
+     */
+    @Override
     public boolean contains(Object object) {
-		if (object != null) {
-			for (int i = firstIndex; i < lastIndex; i++) {
+        if (object != null) {
+            for (int i = firstIndex; i < lastIndex; i++) {
                 if (object.equals(array[i])) {
                     return true;
                 }
             }
-		} else {
-			for (int i = firstIndex; i < lastIndex; i++) {
+        } else {
+            for (int i = firstIndex; i < lastIndex; i++) {
                 if (array[i] == null) {
                     return true;
                 }
             }
-		}
-		return false;
-	}
-
-	/**
-	 * Ensures that this ArrayList can hold the specified number of elements
-	 * without growing.
-	 * 
-	 * @param minimumCapacity
-	 *            the minimum number of elements that this ArrayList will hold
-	 *            before growing
-	 */
-	public void ensureCapacity(int minimumCapacity) {
-		if (array.length < minimumCapacity) {
-			if (firstIndex > 0) {
+        }
+        return false;
+    }
+
+    /**
+     * Ensures that this ArrayList can hold the specified number of elements
+     * without growing.
+     * 
+     * @param minimumCapacity
+     *            the minimum number of elements that this ArrayList will hold
+     *            before growing
+     */
+    public void ensureCapacity(int minimumCapacity) {
+        if (array.length < minimumCapacity) {
+            if (firstIndex > 0) {
                 growAtFront(minimumCapacity - array.length);
             } else {
                 growAtEnd(minimumCapacity - array.length);
             }
-		}
-	}
+        }
+    }
 
-	/**
-	 * Answers the element at the specified location in this ArrayList.
-	 * 
-	 * @param location
-	 *            the index of the element to return
-	 * @return the element at the specified index
-	 * 
-	 * @exception IndexOutOfBoundsException
-	 *                when <code>location < 0 || >= size()</code>
-	 */
-	@Override
+    /**
+     * Answers the element at the specified location in this ArrayList.
+     * 
+     * @param location
+     *            the index of the element to return
+     * @return the element at the specified index
+     * 
+     * @exception IndexOutOfBoundsException
+     *                when <code>location < 0 || >= size()</code>
+     */
+    @Override
     public E get(int location) {
-		if (0 <= location && location < size()) {
-			return array[firstIndex + location];
+        if (0 <= location && location < size()) {
+            return array[firstIndex + location];
         }
-		throw new IndexOutOfBoundsException();
-	}
+        throw new IndexOutOfBoundsException();
+    }
 
-	private void growAtEnd(int required) {
-		int size = size();
-		if (firstIndex >= required - (array.length - lastIndex)) {
-			int newLast = lastIndex - firstIndex;
-			if (size > 0) {
-				System.arraycopy(array, firstIndex, array, 0, size);
-				int start = newLast < firstIndex ? firstIndex : newLast;
-				Arrays.fill(array, start, array.length, null);
-			}
-			firstIndex = 0;
-			lastIndex = newLast;
-		} else {
-			int increment = size / 2;
-			if (required > increment) {
+    private void growAtEnd(int required) {
+        int size = lastIndex - firstIndex;
+        if (firstIndex >= required - (array.length - lastIndex)) {
+            int newLast = lastIndex - firstIndex;
+            if (size > 0) {
+                System.arraycopy(array, firstIndex, array, 0, size);
+                int start = newLast < firstIndex ? firstIndex : newLast;
+                Arrays.fill(array, start, array.length, null);
+            }
+            firstIndex = 0;
+            lastIndex = newLast;
+        } else {
+            int increment = size / 2;
+            if (required > increment) {
                 increment = required;
             }
-			if (increment < 12) {
+            if (increment < 12) {
                 increment = 12;
             }
-			E[] newArray = newElementArray(size + increment);
-			if (size > 0) {
+            E[] newArray = newElementArray(size + increment);
+            if (size > 0) {
                 System.arraycopy(array, firstIndex, newArray, 0, size);
                 firstIndex = 0;
                 lastIndex = size;
             }
-			array = newArray;
-		}
-	}
-
-	private void growAtFront(int required) {
-		int size = size();
-		if (array.length - lastIndex + firstIndex >= required) {
-			int newFirst = array.length - size;
-			if (size > 0) {
-				System.arraycopy(array, firstIndex, array, newFirst, size);
-				int length = firstIndex + size > newFirst ? newFirst
-						: firstIndex + size;
-				Arrays.fill(array, firstIndex, length, null);
-			}
-			firstIndex = newFirst;
-			lastIndex = array.length;
-		} else {
-			int increment = size / 2;
-			if (required > increment) {
+            array = newArray;
+        }
+    }
+
+    private void growAtFront(int required) {
+        int size = lastIndex - firstIndex;
+        if (array.length - lastIndex + firstIndex >= required) {
+            int newFirst = array.length - size;
+            if (size > 0) {
+                System.arraycopy(array, firstIndex, array, newFirst, size);
+                int length = firstIndex + size > newFirst ? newFirst
+                        : firstIndex + size;
+                Arrays.fill(array, firstIndex, length, null);
+            }
+            firstIndex = newFirst;
+            lastIndex = array.length;
+        } else {
+            int increment = size / 2;
+            if (required > increment) {
                 increment = required;
             }
-			if (increment < 12) {
+            if (increment < 12) {
                 increment = 12;
             }
-			E[] newArray = newElementArray(size + increment);
-			if (size > 0) {
+            E[] newArray = newElementArray(size + increment);
+            if (size > 0) {
                 System.arraycopy(array, firstIndex, newArray, newArray.length
-						- size, size);
+                        - size, size);
             }
-			firstIndex = newArray.length - size;
-			lastIndex = newArray.length;
-			array = newArray;
-		}
-	}
-
-	private void growForInsert(int location, int required) {
-		int size = size(), increment = size / 2;
-		if (required > increment) {
+            firstIndex = newArray.length - size;
+            lastIndex = newArray.length;
+            array = newArray;
+        }
+    }
+
+    private void growForInsert(int location, int required) {
+        int size = lastIndex - firstIndex;
+        int increment = size / 2;
+        if (required > increment) {
             increment = required;
         }
-		if (increment < 12) {
+        if (increment < 12) {
             increment = 12;
         }
-		E[] newArray = newElementArray(size + increment);
-		if (location < size / 2) {
-			int newFirst = newArray.length - (size + required);
-			System.arraycopy(array, location, newArray, location + increment,
-					size - location);
-			System.arraycopy(array, firstIndex, newArray, newFirst, location);
-			firstIndex = newFirst;
-			lastIndex = newArray.length;
-		} else {
-			System.arraycopy(array, firstIndex, newArray, 0, location);
-			System.arraycopy(array, location, newArray, location + required,
-					size - location);
-			firstIndex = 0;
-			lastIndex += required;
-		}
-		array = newArray;
-	}
-
-	/**
-	 * Searches this ArrayList for the specified object and returns the index of
-	 * the first occurrence.
-	 * 
-	 * @param object
-	 *            the object to search for
-	 * @return the index of the first occurrence of the object
-	 */
-	@Override
+        E[] newArray = newElementArray(size + increment);
+        if (location < size / 2) {
+            int newFirst = newArray.length - (size + required);
+            System.arraycopy(array, location, newArray, location + increment,
+                    size - location);
+            System.arraycopy(array, firstIndex, newArray, newFirst, location);
+            firstIndex = newFirst;
+            lastIndex = newArray.length;
+        } else {
+            System.arraycopy(array, firstIndex, newArray, 0, location);
+            System.arraycopy(array, location, newArray, location + required,
+                    size - location);
+            firstIndex = 0;
+            lastIndex += required;
+        }
+        array = newArray;
+    }
+
+    /**
+     * Searches this ArrayList for the specified object and returns the index of
+     * the first occurrence.
+     * 
+     * @param object
+     *            the object to search for
+     * @return the index of the first occurrence of the object
+     */
+    @Override
     public int indexOf(Object object) {
-		if (object != null) {
-			for (int i = firstIndex; i < lastIndex; i++) {
+        if (object != null) {
+            for (int i = firstIndex; i < lastIndex; i++) {
                 if (object.equals(array[i])) {
                     return i - firstIndex;
                 }
             }
-		} else {
-			for (int i = firstIndex; i < lastIndex; i++) {
+        } else {
+            for (int i = firstIndex; i < lastIndex; i++) {
                 if (array[i] == null) {
                     return i - firstIndex;
                 }
             }
-		}
-		return -1;
-	}
-
-	/**
-	 * Answers if this ArrayList has no elements, a size of zero.
-	 * 
-	 * @return true if this ArrayList has no elements, false otherwise
-	 * 
-	 * @see #size
-	 */
-	@Override
+        }
+        return -1;
+    }
+
+    /**
+     * Answers if this ArrayList has no elements, a size of zero.
+     * 
+     * @return true if this ArrayList has no elements, false otherwise
+     * 
+     * @see #size
+     */
+    @Override
     public boolean isEmpty() {
-		return lastIndex == firstIndex;
-	}
+        return lastIndex == firstIndex;
+    }
 
-	/**
-	 * Searches this ArrayList for the specified object and returns the index of
-	 * the last occurrence.
-	 * 
-	 * @param object
-	 *            the object to search for
-	 * @return the index of the last occurrence of the object
-	 */
-	@Override
+    /**
+     * Searches this ArrayList for the specified object and returns the index of
+     * the last occurrence.
+     * 
+     * @param object
+     *            the object to search for
+     * @return the index of the last occurrence of the object
+     */
+    @Override
     public int lastIndexOf(Object object) {
-		if (object != null) {
-			for (int i = lastIndex - 1; i >= firstIndex; i--) {
+        if (object != null) {
+            for (int i = lastIndex - 1; i >= firstIndex; i--) {
                 if (object.equals(array[i])) {
                     return i - firstIndex;
                 }
             }
-		} else {
-			for (int i = lastIndex - 1; i >= firstIndex; i--) {
+        } else {
+            for (int i = lastIndex - 1; i >= firstIndex; i--) {
                 if (array[i] == null) {
                     return i - firstIndex;
                 }
             }
-		}
-		return -1;
-	}
-
-	/**
-	 * Removes the object at the specified location from this ArrayList.
-	 * 
-	 * @param location
-	 *            the index of the object to remove
-	 * @return the removed object
-	 * 
-	 * @exception IndexOutOfBoundsException
-	 *                when <code>location < 0 || >= size()</code>
-	 */
-	@Override
+        }
+        return -1;
+    }
+
+    /**
+     * Removes the object at the specified location from this ArrayList.
+     * 
+     * @param location
+     *            the index of the object to remove
+     * @return the removed object
+     * 
+     * @exception IndexOutOfBoundsException
+     *                when <code>location < 0 || >= size()</code>
+     */
+    @Override
     public E remove(int location) {
-		E result;
-		int size = size();
-		if (0 <= location && location < size) {
-			if (location == size - 1) {
-				result = array[--lastIndex];
-				array[lastIndex] = null;
-			} else if (location == 0) {
-				result = array[firstIndex];
-				array[firstIndex++] = null;
-			} else {
-				int elementIndex = firstIndex + location;
-				result = array[elementIndex];
-				if (location < size / 2) {
-					System.arraycopy(array, firstIndex, array, firstIndex + 1,
-							location);
-					array[firstIndex++] = null;
-				} else {
-					System.arraycopy(array, elementIndex + 1, array,
-							elementIndex, size - location - 1);
-					array[--lastIndex] = null;
-				}
-			}
-		} else {
+        E result;
+        int size = size();
+        if (0 <= location && location < size) {
+            if (location == size - 1) {
+                result = array[--lastIndex];
+                array[lastIndex] = null;
+            } else if (location == 0) {
+                result = array[firstIndex];
+                array[firstIndex++] = null;
+            } else {
+                int elementIndex = firstIndex + location;
+                result = array[elementIndex];
+                if (location < size / 2) {
+                    System.arraycopy(array, firstIndex, array, firstIndex + 1,
+                            location);
+                    array[firstIndex++] = null;
+                } else {
+                    System.arraycopy(array, elementIndex + 1, array,
+                            elementIndex, size - location - 1);
+                    array[--lastIndex] = null;
+                }
+            }
+        } else {
             throw new IndexOutOfBoundsException();
         }
 
-		modCount++;
-		return result;
-	}
-    
-	/**
+        modCount++;
+        return result;
+    }
+
+    /**
      * Removes the first one of the specified object in this list, if present.
      * 
      * @param object
@@ -544,157 +548,157 @@
     }
 
     /**
-	 * Removes the objects in the specified range from the start to the end, but
-	 * not including the end index.
-	 * 
-	 * @param start
-	 *            the index at which to start removing
-	 * @param end
-	 *            the index one past the end of the range to remove
-	 * 
-	 * @exception IndexOutOfBoundsException
-	 *                when <code>start < 0, start > end</code> or
-	 *                <code>end > size()</code>
-	 */
-	@Override
+     * Removes the objects in the specified range from the start to the end, but
+     * not including the end index.
+     * 
+     * @param start
+     *            the index at which to start removing
+     * @param end
+     *            the index one past the end of the range to remove
+     * 
+     * @exception IndexOutOfBoundsException
+     *                when <code>start < 0, start > end</code> or
+     *                <code>end > size()</code>
+     */
+    @Override
     protected void removeRange(int start, int end) {
-		if (start >= 0 && start <= end && end <= size()) {
-			if (start == end) {
+        if (start >= 0 && start <= end && end <= size()) {
+            if (start == end) {
                 return;
             }
-			int size = size();
-			if (end == size) {
-				Arrays.fill(array, firstIndex + start, lastIndex, null);
-				lastIndex = firstIndex + start;
-			} else if (start == 0) {
-				Arrays.fill(array, firstIndex, firstIndex + end, null);
-				firstIndex += end;
-			} else {
-				System.arraycopy(array, firstIndex + end, array, firstIndex
-						+ start, size - end);
-				int newLast = lastIndex + start - end;
-				Arrays.fill(array, newLast, lastIndex, null);
-				lastIndex = newLast;
-			}
-			modCount++;
-		} else {
+            int size = size();
+            if (end == size) {
+                Arrays.fill(array, firstIndex + start, lastIndex, null);
+                lastIndex = firstIndex + start;
+            } else if (start == 0) {
+                Arrays.fill(array, firstIndex, firstIndex + end, null);
+                firstIndex += end;
+            } else {
+                System.arraycopy(array, firstIndex + end, array, firstIndex
+                        + start, size - end);
+                int newLast = lastIndex + start - end;
+                Arrays.fill(array, newLast, lastIndex, null);
+                lastIndex = newLast;
+            }
+            modCount++;
+        } else {
             throw new IndexOutOfBoundsException();
         }
-	}
+    }
 
-	/**
-	 * Replaces the element at the specified location in this ArrayList with the
-	 * specified object.
-	 * 
-	 * @param location
-	 *            the index at which to put the specified object
-	 * @param object
-	 *            the object to add
-	 * @return the previous element at the index
-	 * 
-	 * @exception IndexOutOfBoundsException
-	 *                when <code>location < 0 || >= size()</code>
-	 */
-	@Override
+    /**
+     * Replaces the element at the specified location in this ArrayList with the
+     * specified object.
+     * 
+     * @param location
+     *            the index at which to put the specified object
+     * @param object
+     *            the object to add
+     * @return the previous element at the index
+     * 
+     * @exception IndexOutOfBoundsException
+     *                when <code>location < 0 || >= size()</code>
+     */
+    @Override
     public E set(int location, E object) {
-		if (0 <= location && location < size()) {
-			E result = array[firstIndex + location];
-			array[firstIndex + location] = object;
-			return result;
-		}
-		throw new IndexOutOfBoundsException();
-	}
-
-	/**
-	 * Answers the number of elements in this ArrayList.
-	 * 
-	 * @return the number of elements in this ArrayList
-	 */
-	@Override
+        if (0 <= location && location < size()) {
+            E result = array[firstIndex + location];
+            array[firstIndex + location] = object;
+            return result;
+        }
+        throw new IndexOutOfBoundsException();
+    }
+
+    /**
+     * Answers the number of elements in this ArrayList.
+     * 
+     * @return the number of elements in this ArrayList
+     */
+    @Override
     public int size() {
-		return lastIndex - firstIndex;
-	}
+        return lastIndex - firstIndex;
+    }
 
-	/**
-	 * Answers a new array containing all elements contained in this ArrayList.
-	 * 
-	 * @return an array of the elements from this ArrayList
-	 */
-	@Override
+    /**
+     * Answers a new array containing all elements contained in this ArrayList.
+     * 
+     * @return an array of the elements from this ArrayList
+     */
+    @Override
     public Object[] toArray() {
-		int size = size();
-		Object[] result = new Object[size];
-		System.arraycopy(array, firstIndex, result, 0, size);
-		return result;
-	}
-
-	/**
-	 * Answers an array containing all elements contained in this ArrayList. If
-	 * the specified array is large enough to hold the elements, the specified
-	 * array is used, otherwise an array of the same type is created. If the
-	 * specified array is used and is larger than this ArrayList, the array
-	 * element following the collection elements is set to null.
-	 * 
-	 * @param contents
-	 *            the array
-	 * @return an array of the elements from this ArrayList
-	 * 
-	 * @exception ArrayStoreException
-	 *                when the type of an element in this ArrayList cannot be
-	 *                stored in the type of the specified array
-	 */
-	@Override
+        int size = size();
+        Object[] result = new Object[size];
+        System.arraycopy(array, firstIndex, result, 0, size);
+        return result;
+    }
+
+    /**
+     * Answers an array containing all elements contained in this ArrayList. If
+     * the specified array is large enough to hold the elements, the specified
+     * array is used, otherwise an array of the same type is created. If the
+     * specified array is used and is larger than this ArrayList, the array
+     * element following the collection elements is set to null.
+     * 
+     * @param contents
+     *            the array
+     * @return an array of the elements from this ArrayList
+     * 
+     * @exception ArrayStoreException
+     *                when the type of an element in this ArrayList cannot be
+     *                stored in the type of the specified array
+     */
+    @Override
     @SuppressWarnings("unchecked")
     public <T> T[] toArray(T[] contents) {
-		int size = size();
-		if (size > contents.length) {
+        int size = size();
+        if (size > contents.length) {
             Class<?> ct = contents.getClass().getComponentType();
-			contents = (T[]) Array.newInstance(ct, size);
+            contents = (T[]) Array.newInstance(ct, size);
         }
-		System.arraycopy(array, firstIndex, contents, 0, size);
-		if (size < contents.length) {
+        System.arraycopy(array, firstIndex, contents, 0, size);
+        if (size < contents.length) {
             contents[size] = null;
         }
-		return contents;
-	}
+        return contents;
+    }
 
-	/**
-	 * Sets the capacity of this ArrayList to be the same as the size.
-	 * 
-	 * @see #size
-	 */
-	public void trimToSize() {
-		int size = size();
-		E[] newArray = newElementArray(size);
-		System.arraycopy(array, firstIndex, newArray, 0, size);
-		array = newArray;
-		firstIndex = 0;
-		lastIndex = array.length;
-		modCount = 0;
-	}
-
-	private static final ObjectStreamField[] serialPersistentFields = { new ObjectStreamField(
-			"size", Integer.TYPE) }; //$NON-NLS-1$
-
-	private void writeObject(ObjectOutputStream stream) throws IOException {
-		ObjectOutputStream.PutField fields = stream.putFields();
-		fields.put("size", size()); //$NON-NLS-1$
-		stream.writeFields();
-		stream.writeInt(array.length);
-		Iterator<?> it = iterator();
-		while (it.hasNext()) {
+    /**
+     * Sets the capacity of this ArrayList to be the same as the size.
+     * 
+     * @see #size
+     */
+    public void trimToSize() {
+        int size = size();
+        E[] newArray = newElementArray(size);
+        System.arraycopy(array, firstIndex, newArray, 0, size);
+        array = newArray;
+        firstIndex = 0;
+        lastIndex = array.length;
+        modCount = 0;
+    }
+
+    private static final ObjectStreamField[] serialPersistentFields = { new ObjectStreamField(
+            "size", Integer.TYPE) }; //$NON-NLS-1$
+
+    private void writeObject(ObjectOutputStream stream) throws IOException {
+        ObjectOutputStream.PutField fields = stream.putFields();
+        fields.put("size", size()); //$NON-NLS-1$
+        stream.writeFields();
+        stream.writeInt(array.length);
+        Iterator<?> it = iterator();
+        while (it.hasNext()) {
             stream.writeObject(it.next());
         }
-	}
+    }
 
-	@SuppressWarnings("unchecked")
+    @SuppressWarnings("unchecked")
     private void readObject(ObjectInputStream stream) throws IOException,
-			ClassNotFoundException {
-		ObjectInputStream.GetField fields = stream.readFields();
-		lastIndex = fields.get("size", 0); //$NON-NLS-1$
-		array = newElementArray(stream.readInt());
-		for (int i = 0; i < lastIndex; i++) {
-            array[i] = (E)stream.readObject();
+            ClassNotFoundException {
+        ObjectInputStream.GetField fields = stream.readFields();
+        lastIndex = fields.get("size", 0); //$NON-NLS-1$
+        array = newElementArray(stream.readInt());
+        for (int i = 0; i < lastIndex; i++) {
+            array[i] = (E) stream.readObject();
         }
-	}
+    }
 }

Modified: harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/util/FormattableFlags.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/util/FormattableFlags.java?rev=588245&r1=588244&r2=588245&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/util/FormattableFlags.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/util/FormattableFlags.java Thu Oct 25 07:44:56 2007
@@ -24,7 +24,7 @@
 public class FormattableFlags {
     
     private FormattableFlags(){
-        //prevent this class to be instantialized
+        //prevent this class from being instantiated
     }
     
     /**

Modified: harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/util/Formatter.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/util/Formatter.java?rev=588245&r1=588244&r2=588245&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/util/Formatter.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/util/Formatter.java Thu Oct 25 07:44:56 2007
@@ -876,7 +876,7 @@
                     break;
                 }
                 case 'n': {
-                    result = transfromFromLineSeparator();
+                    result = transformFromLineSeparator();
                     break;
                 }
                 case 't':
@@ -1100,7 +1100,7 @@
          * Transforms line separator to a formatted string. Any flag, the width
          * or the precision is illegal.
          */
-        private String transfromFromLineSeparator() {
+        private String transformFromLineSeparator() {
             if (formatToken.isPrecisionSet()) {
                 throw new IllegalFormatPrecisionException(formatToken
                         .getPrecision());

Modified: harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/util/FormatterClosedException.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/util/FormatterClosedException.java?rev=588245&r1=588244&r2=588245&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/util/FormatterClosedException.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/util/FormatterClosedException.java Thu Oct 25 07:44:56 2007
@@ -27,7 +27,7 @@
 	private static final long serialVersionUID = 18111216L;
 
 	/**
-	 * Constucts an instance of FormatterClosedException.
+	 * Constructs an instance of FormatterClosedException.
 	 * 
 	 */
 	public FormatterClosedException() {

Modified: harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/util/IllegalFormatCodePointException.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/util/IllegalFormatCodePointException.java?rev=588245&r1=588244&r2=588245&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/util/IllegalFormatCodePointException.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/util/IllegalFormatCodePointException.java Thu Oct 25 07:44:56 2007
@@ -52,7 +52,7 @@
 	/**
 	 * Return the message string of the IllegalFormatCodePointException.
 	 * 
-	 * @retun The message string of the IllegalFormatCodePointException.
+	 * @return The message string of the IllegalFormatCodePointException.
 	 */
 	@Override
     public String getMessage() {

Modified: harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/util/IllegalFormatException.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/util/IllegalFormatException.java?rev=588245&r1=588244&r2=588245&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/util/IllegalFormatException.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/util/IllegalFormatException.java Thu Oct 25 07:44:56 2007
@@ -20,10 +20,8 @@
 /**
  * Unchecked Exception that is to be thrown out when a format string that
  * contains either an illegal syntax or format specifier is transferred as a
- * parameter. Only subclass that is inherited explicitly from this exception is
- * allowed to be instantialized.
- * 
- * 
+ * parameter. Only a subclass that is inherited explicitly from this exception
+ * is allowed to be instantiated.
  */
 public class IllegalFormatException extends IllegalArgumentException implements
 		Serializable {

Modified: harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/org/apache/harmony/luni/internal/net/www/MimeTable.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/org/apache/harmony/luni/internal/net/www/MimeTable.java?rev=588245&r1=588244&r2=588245&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/org/apache/harmony/luni/internal/net/www/MimeTable.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/org/apache/harmony/luni/internal/net/www/MimeTable.java Thu Oct 25 07:44:56 2007
@@ -51,7 +51,7 @@
     }
 
     /**
-     * Contructs a MIME table using the default values defined in this class.
+     * Constructs a MIME table using the default values defined in this class.
      * 
      * It then augments this table by reading pairs of extensions and
      * corresponding content types from the file "content-types.properties",

Modified: harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/org/apache/harmony/luni/util/HexStringParser.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/org/apache/harmony/luni/util/HexStringParser.java?rev=588245&r1=588244&r2=588245&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/org/apache/harmony/luni/util/HexStringParser.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/org/apache/harmony/luni/util/HexStringParser.java Thu Oct 25 07:44:56 2007
@@ -304,13 +304,13 @@
     private int getOffset(String strIntegerPart, String strDecimalPart) {
         strIntegerPart = strIntegerPart.replaceFirst("^0+", ""); //$NON-NLS-1$ //$NON-NLS-2$
         
-        //If the Interger part is a nonzero number.
+        //If the Integer part is a nonzero number.
         if (strIntegerPart.length() != 0) {
             String leadingNumber = strIntegerPart.substring(0, 1);
             return (strIntegerPart.length() - 1) * 4 + countBitsLength(Long.parseLong(leadingNumber,HEX_RADIX)) - 1;
         }
         
-        //If the Interger part is a zero number.
+        //If the Integer part is a zero number.
         int i;
         for (i = 0; i < strDecimalPart.length() && strDecimalPart.charAt(i) == '0'; i++);   
         if (i == strDecimalPart.length()) {

Modified: harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/org/apache/harmony/luni/util/Util.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/org/apache/harmony/luni/util/Util.java?rev=588245&r1=588244&r2=588245&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/org/apache/harmony/luni/util/Util.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/org/apache/harmony/luni/util/Util.java Thu Oct 25 07:44:56 2007
@@ -39,29 +39,33 @@
 		if (encoding != null) {
 			try {
 				"".getBytes(encoding);
-			} catch (java.io.UnsupportedEncodingException e) {
-				encoding = null;
+            } catch (Throwable t) {
+                encoding = null;
 			}
 		}
-		defaultEncoding = encoding;
+        defaultEncoding = encoding;
 	}
 
-	public static byte[] getBytes(String name) {
+    /**
+     * Get bytes from String using default encoding; default encoding can
+     *   be changed via "os.encoding" property
+     * @param name input String
+     * @return byte array
+     */
+    public static byte[] getBytes(String name) {
 		if (defaultEncoding != null) {
 			try {
 				return name.getBytes(defaultEncoding);
 			} catch (java.io.UnsupportedEncodingException e) {
 			}
-		}
-		return name.getBytes();
+		}      
+        return name.getBytes();
 	}
     
     /**
-     * Get bytes from String with specific encoding
+     * Get bytes from String with UTF8 encoding
      * @param name
      *          input String
-     * @param encoding
-     *          specific encoding
      * @return byte array
      */
     public static byte[] getUTF8Bytes(String name) {

Modified: harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/hyzip/shared/hyzip.nls
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/hyzip/shared/hyzip.nls?rev=588245&r1=588244&r2=588245&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/hyzip/shared/hyzip.nls (original)
+++ harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/hyzip/shared/hyzip.nls Thu Oct 25 07:44:56 2007
@@ -26,7 +26,7 @@
 # Note to translators:
 #
 # This file uses printf style substitutions. Sequences such as %s, %.*s, %10d
-# etc. will be subsituted at runtime. The special case of %% is not a substitution.
+# etc. will be substituted at runtime. The special case of %% is not a substitution.
 # It indicates a single percent sign. Please do not modify the format specifiers, or 
 # change their order. For instance, in a message like "from %d to %s", %d
 # MUST appear before %s in any translated message, or a run-time crash

Modified: harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/hyzip/shared/zipsup.h
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/hyzip/shared/zipsup.h?rev=588245&r1=588244&r2=588245&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/hyzip/shared/zipsup.h (original)
+++ harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/hyzip/shared/zipsup.h Thu Oct 25 07:44:56 2007
@@ -28,7 +28,11 @@
 #include "hyport.h"
 #include "hyzip.h"
 
+#if defined(HY_LOCAL_ZLIB)
+#define HY_ZIP_DLL_NAME "z"
+#else
 #define HY_ZIP_DLL_NAME "hyzlib"
+#endif
 
   typedef struct HyZipCache
   {

Modified: harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/include/unix/jclprots.h
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/include/unix/jclprots.h?rev=588245&r1=588244&r2=588245&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/include/unix/jclprots.h (original)
+++ harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/include/unix/jclprots.h Thu Oct 25 07:44:56 2007
@@ -28,10 +28,6 @@
  ** COMPONENT: NativesCommon
  ************************************************************/
 
-/* NativesCommonPlainServerSocketImpl*/
-void JNICALL Java_java_net_PlainServerSocketImpl_createServerStreamSocketImpl PROTOTYPE((
-	JNIEnv* env, jclass thisClz, jobject thisObjFD, jboolean preferIPv4Stack));
-
 /* NativesCommonDeflater*/
 void JNICALL Java_java_util_zip_Deflater_setDictionaryImpl PROTOTYPE(( JNIEnv * env, jobject recv,  jbyteArray dict, int off, int len, jlong handle));
 void JNICALL Java_java_util_zip_Deflater_resetImpl PROTOTYPE(( JNIEnv * env, jobject recv,  jlong handle));
@@ -46,27 +42,6 @@
 jlong JNICALL Java_java_util_zip_Deflater_getTotalInImpl PROTOTYPE(( JNIEnv * env, jobject recv, jlong handle));
 jint JNICALL Java_java_util_zip_Deflater_getAdlerImpl PROTOTYPE(( JNIEnv * env, jobject recv, jlong handle));
 
-/* NativesCommonPlainSocketImpl2*/
-void JNICALL Java_java_net_PlainSocketImpl2_connectStreamWithTimeoutSocketImpl2 PROTOTYPE((JNIEnv *env, jclass thisClz,
-	jobject fileDescriptor, jint remotePort, jint timeout, jint trafficClass, jobject inetAddress));
-void JNICALL Java_java_net_PlainSocketImpl2_socketBindImpl2 PROTOTYPE((JNIEnv *env, jclass thisClz,
-	jobject fileDescriptor, jint localPort,  jobject inetAddress));
-void JNICALL Java_java_net_PlainSocketImpl2_createStreamSocketImpl2 PROTOTYPE((
-	JNIEnv* env, jclass thisClz, jobject thisObjFD, jboolean preferIPv4Stack));
-void JNICALL Java_java_net_PlainSocketImpl2_connectStreamSocketImpl2 PROTOTYPE((JNIEnv *env, jclass thisClz,
-	jobject fileDescriptor, jint remotePort, jint trafficClass, jobject inetAddress));
-jint JNICALL Java_java_net_PlainSocketImpl2_sendDatagramImpl2 PROTOTYPE((
-	JNIEnv* env, jclass thisClz,
-	jobject fileDescriptor, jbyteArray data, jint offset, jint msgLength,
-	jint targetPort, jobject inetAddress));
-
-/* NativesCommonFileOutputStream*/
-jint JNICALL Java_java_io_FileOutputStream_openImpl PROTOTYPE((JNIEnv * env, jobject recv, jbyteArray path, jboolean append));
-void JNICALL Java_java_io_FileOutputStream_closeImpl PROTOTYPE((JNIEnv * env, jobject recv));
-void JNICALL Java_java_io_FileOutputStream_writeByteImpl PROTOTYPE((JNIEnv *env, jobject recv, jint c, jlong descriptor));
-void JNICALL Java_java_io_FileOutputStream_writeImpl PROTOTYPE((JNIEnv *env, jobject recv, jbyteArray buffer, jint offset, jint count, jlong descriptor));
-void JNICALL Java_java_io_FileOutputStream_oneTimeInitialization PROTOTYPE((JNIEnv * env, jclass clazz));
-
 /* NativesCommonDoubleParsing*/
 JNIEXPORT jdouble JNICALL Java_org_apache_harmony_luni_util_FloatingPointParser_parseDblImpl
    PROTOTYPE((JNIEnv *env, jclass clazz, jstring s, jint e));
@@ -81,28 +56,6 @@
 jlong JNICALL Java_java_util_zip_CRC32_updateByteImpl PROTOTYPE(( JNIEnv * env, jobject recv, jbyte val, jlong crc));
 jlong JNICALL Java_java_util_zip_CRC32_updateImpl PROTOTYPE(( JNIEnv * env, jobject recv, jbyteArray buf, int off, int len, jlong crc));
 
-/* NativesCommonAnnotationHelper*/
-
-/* NativesCommonSocketImpl*/
-void JNICALL Java_java_net_SocketImpl_listenStreamSocketImpl PROTOTYPE(( JNIEnv *env, jclass thisClz, jobject fileDescriptor, jint backlog));
-void JNICALL Java_java_net_SocketImpl_acceptStreamSocketImpl PROTOTYPE((JNIEnv *env, jclass thisClz,
-	jobject fileDescriptorServer, jobject socketImpl, jobject fileDescriptorSocketImpl, jint timeout));
-void JNICALL Java_java_net_SocketImpl_sendUrgentDataImpl PROTOTYPE((JNIEnv * env, jclass thisClz, jobject fileDescriptor, jbyte data));
-jint JNICALL Java_java_net_SocketImpl_receiveStreamImpl PROTOTYPE((JNIEnv * env, jclass thisClz,
-														jobject fileDescriptor, jbyteArray data, jint offset,
-														jint count, jint timeout));
-void JNICALL Java_java_net_SocketImpl_createStreamSocketImpl PROTOTYPE((
-	JNIEnv* env, jclass thisClz, jobject thisObjFD, jboolean preferIPv4Stack));
-jint JNICALL Java_java_net_SocketImpl_sendStreamImpl PROTOTYPE((JNIEnv * env, jclass thisClz, jobject fileDescriptor,
-													 jbyteArray data, jint offset, jint count));
-void JNICALL Java_java_net_SocketImpl_shutdownOutputImpl PROTOTYPE(( JNIEnv * env, jclass thisClz, jobject fileDescriptor));
-void JNICALL Java_java_net_SocketImpl_createDatagramSocketImpl PROTOTYPE((
-JNIEnv* env, jclass thisClz, jobject thisObjFD, jboolean preferIPv4Stack));
-jint JNICALL Java_java_net_SocketImpl_availableStreamImpl PROTOTYPE(( JNIEnv *env, jclass thisClz, jobject fileDescriptor));
-jboolean JNICALL Java_java_net_SocketImpl_supportsUrgentDataImpl PROTOTYPE((JNIEnv * env, jclass thisClz, jobject fileDescriptor));
-void JNICALL Java_java_net_SocketImpl_shutdownInputImpl PROTOTYPE(( JNIEnv * env, jclass thisClz, jobject fileDescriptor));
-void JNICALL Java_java_net_SocketImpl_oneTimeInitialization PROTOTYPE((JNIEnv * env, jclass clazz, jboolean jcl_supports_ipv6 ));
-
 /* NativesCommonFile*/
 jboolean JNICALL Java_java_io_File_mkdirImpl PROTOTYPE((JNIEnv *env, jobject recv, jbyteArray path));
 jboolean JNICALL Java_java_io_File_setLastModifiedImpl PROTOTYPE((JNIEnv *env, jobject recv, jbyteArray path, jlong time));
@@ -128,15 +81,6 @@
 jboolean JNICALL Java_java_io_File_existsImpl PROTOTYPE((JNIEnv *env, jobject recv, jbyteArray path));
 jboolean JNICALL Java_java_io_File_setReadOnlyImpl PROTOTYPE((JNIEnv *env, jobject recv, jbyteArray path));
 
-/* NativesCommonFileInputStream*/
-jint JNICALL Java_java_io_FileInputStream_readByteImpl PROTOTYPE((JNIEnv * env, jobject recv, jlong descriptor));
-jint JNICALL Java_java_io_FileInputStream_readImpl PROTOTYPE((JNIEnv * env, jobject recv, jbyteArray buffer, jint offset, jint count, jlong descriptor));
-void JNICALL Java_java_io_FileInputStream_oneTimeInitialization PROTOTYPE((JNIEnv * env, jclass clazz));
-void JNICALL Java_java_io_FileInputStream_closeImpl PROTOTYPE((JNIEnv * env, jobject recv));
-jlong JNICALL Java_java_io_FileInputStream_skip PROTOTYPE((JNIEnv * env, jobject recv, jlong count));
-jint JNICALL Java_java_io_FileInputStream_available PROTOTYPE((JNIEnv * env, jobject recv));
-jint JNICALL Java_java_io_FileInputStream_openImpl PROTOTYPE((JNIEnv * env, jobject recv, jbyteArray path));
-
 /* NativesCommonObjectInputStream*/
 void JNICALL Java_java_io_ObjectInputStream_setField__Ljava_lang_Object_2Ljava_lang_Class_2Ljava_lang_String_2I PROTOTYPE((JNIEnv *env, jclass clazz, jobject targetObject, jobject declaringClass, jobject fieldName, jint newValue));
 void JNICALL Java_java_io_ObjectInputStream_objSetField PROTOTYPE((JNIEnv *env, jclass clazz, jobject targetObject, jobject declaringClass, jobject fieldName, jobject fieldTypeName, jobject newValue));
@@ -190,33 +134,13 @@
 
 /* NativesCommonProxy*/
 jclass JNICALL Java_java_lang_reflect_Proxy_defineClassImpl PROTOTYPE((JNIEnv * env, jclass recvClass, jobject classLoader, jstring className, jbyteArray classBytes));
-jclass JNICALL 
-Java_java_lang_reflect_Proxy_defineClass0__Ljava_lang_ClassLoader_2Ljava_lang_String_2_3BIILjava_lang_Object_2_3Ljava_lang_Object_2Ljava_lang_Object_2 PROTOTYPE((JNIEnv * env, jclass recvClass, jobject classLoader, jstring className, jbyteArray classBytes, jint offset, jint length, jobject pd, jobject signers, jobject source));
-jclass JNICALL 
-Java_java_lang_reflect_Proxy_defineClass0__Ljava_lang_ClassLoader_2Ljava_lang_String_2_3BII PROTOTYPE((JNIEnv * env, jclass recvClass, jobject classLoader, jstring className, jbyteArray classBytes, jint offset, jint length));
 
 /* NativesCommonGlobals*/
 void JNICALL JNI_OnUnload PROTOTYPE((JavaVM * vm, void *reserved));
 jint JNICALL JCL_OnLoad PROTOTYPE((JavaVM * vm, void *reserved));
 
-/* NativesCommonRuntime*/
-jlong JNICALL Java_java_lang_Runtime_maxMemoryImpl PROTOTYPE((JNIEnv * env, jclass cls));
-jint JNICALL Java_java_lang_Runtime_availableProcessorsImpl PROTOTYPE((JNIEnv * env, jclass cls));
-
 /* NativesCommonJarFile*/
 jarray JNICALL Java_java_util_jar_JarFile_getMetaEntriesImpl PROTOTYPE((JNIEnv * env, jobject recv, jbyteArray zipName));
-/* NativesCommonRandomAccessFile*/
-jint JNICALL Java_java_io_RandomAccessFile_readImpl PROTOTYPE((JNIEnv *env, jobject recv, jbyteArray buffer, jint offset, jint count, jlong descriptor));
-void JNICALL Java_java_io_RandomAccessFile_seek PROTOTYPE((JNIEnv * env, jobject recv, jlong pos));
-void JNICALL Java_java_io_RandomAccessFile_closeImpl PROTOTYPE((JNIEnv * env, jobject recv));
-jlong JNICALL Java_java_io_RandomAccessFile_length PROTOTYPE((JNIEnv * env, jobject recv));
-jlong JNICALL Java_java_io_RandomAccessFile_getFilePointer PROTOTYPE((JNIEnv * env, jobject recv));
-void JNICALL Java_java_io_RandomAccessFile_setLengthImpl PROTOTYPE((JNIEnv * env, jobject recv, jlong newLength));
-void JNICALL Java_java_io_RandomAccessFile_writeImpl PROTOTYPE((JNIEnv *env, jobject recv, jbyteArray buffer, jint offset, jint count, jlong descriptor));
-jint JNICALL Java_java_io_RandomAccessFile_readByteImpl PROTOTYPE((JNIEnv *env, jobject recv, jlong descriptor));
-void JNICALL Java_java_io_RandomAccessFile_oneTimeInitialization PROTOTYPE((JNIEnv * env, jclass rafClazz));
-jint JNICALL Java_java_io_RandomAccessFile_openImpl PROTOTYPE((JNIEnv * env, jobject recv, jbyteArray path, jboolean writable));
-void JNICALL Java_java_io_RandomAccessFile_writeByteImpl PROTOTYPE((JNIEnv *env, jobject recv, jint c, jlong descriptor));
 
 /* NativesCommonObjectOutputStream*/
 jfloat JNICALL Java_java_io_ObjectOutputStream_getFieldFloat PROTOTYPE((JNIEnv *env, jclass clazz, jobject targetObject, jobject declaringClass, jobject fieldName));
@@ -229,23 +153,10 @@
 jint JNICALL Java_java_io_ObjectOutputStream_getFieldInt PROTOTYPE((JNIEnv *env, jclass clazz, jobject targetObject, jobject declaringClass, jobject fieldName));
 jchar JNICALL Java_java_io_ObjectOutputStream_getFieldChar PROTOTYPE((JNIEnv *env, jclass clazz, jobject targetObject, jobject declaringClass, jobject fieldName));
 
-/* NativesCommonFileInputStream*/
-
 /* NativesCommonSocket*/
 void createSocket PROTOTYPE((JNIEnv* env, jobject thisObjFD, int sockType, jboolean preferIPv4Stack));
-void JNICALL Java_java_net_Socket_socketCloseImpl PROTOTYPE(( JNIEnv * env, jclass thisClz, jobject fileDescriptor));
-void JNICALL Java_java_net_Socket_oneTimeInitialization PROTOTYPE((JNIEnv * env, jclass clazz, jboolean jcl_supports_ipv6));
-jobject JNICALL Java_java_net_Socket_getSocketLocalAddressImpl PROTOTYPE((JNIEnv *env, jclass thisClz, jobject fileDescriptor, jboolean preferIPv6Addresses));
-jobject JNICALL Java_java_net_Socket_getSocketOptionImpl PROTOTYPE((JNIEnv *env, jclass thisClz, jobject aFileDescriptor, jint anOption));
-void JNICALL Java_java_net_Socket_setSocketOptionImpl PROTOTYPE((JNIEnv *env, jclass thisClz, jobject aFileDescriptor, jint anOption, jobject aValue));
-jint JNICALL Java_java_net_Socket_getSocketFlags PROTOTYPE((JNIEnv *env, jclass thisClz));
-jint JNICALL Java_java_net_Socket_getSocketLocalPortImpl PROTOTYPE((JNIEnv *env, jclass thisClz, jobject fileDescriptor, jboolean preferIPv6Addresses));
 I_32 pollSelectRead PROTOTYPE((JNIEnv * env, jobject fileDescriptor, jint timeout, BOOLEAN poll));
 
-/* NativesCommonPlainMulticastSocketImpl*/
-void JNICALL Java_java_net_PlainMulticastSocketImpl_createMulticastSocketImpl PROTOTYPE((
-	JNIEnv* env, jclass thisClz, jobject thisObjFD, jboolean preferIPv4Stack));
-
 /* NativesCommonZipFile*/
 void throwJavaZIOException PROTOTYPE((JNIEnv * env, const char *message));
 void throwNewInternalError PROTOTYPE((JNIEnv * env, const char * message));
@@ -267,7 +178,6 @@
 jstring JNICALL Java_java_net_InetAddress_inetNtoaImpl PROTOTYPE((JNIEnv* env, jclass clazz, jint hipAddr));
 jobject JNICALL Java_java_net_InetAddress_getHostByAddrImpl PROTOTYPE((JNIEnv* env, jclass clazz, jbyteArray addr));
 jobject JNICALL Java_java_net_InetAddress_getHostByNameImpl PROTOTYPE((JNIEnv* env, jclass clazz, jstring aName, jboolean preferIPv6Addresses));
-jobjectArray JNICALL Java_java_net_InetAddress_getAliasesByAddrImpl PROTOTYPE((JNIEnv* env, jclass clazz, jstring addr));
 
 /* NativesCommonTimeZone*/
 jstring JNICALL Java_java_util_TimeZone_getCustomTimeZone PROTOTYPE((JNIEnv *env, jclass clazz, jintArray tzinfo, jbooleanArray isCustomTimeZone));
@@ -288,7 +198,6 @@
 jobject newJavaByteArray PROTOTYPE((JNIEnv * env, jbyte *bytes, jint length));
 jobjectArray createAliasArrayFromAddrinfo PROTOTYPE((JNIEnv* env, hyaddrinfo_t addresses, char* hName ));
 BOOLEAN booleanValue PROTOTYPE((JNIEnv * env, jobject aBoolean));
-BOOLEAN jcl_supports_ipv6 PROTOTYPE((JNIEnv * env));
 jobject newJavaLangInteger PROTOTYPE((JNIEnv * env, I_32 anInt));
 BOOLEAN preferIPv4Stack PROTOTYPE((JNIEnv * env));
 char* netLookupErrorString PROTOTYPE((JNIEnv* env, I_32 anErrorNum));
@@ -307,34 +216,15 @@
 I_32 netGetSockAddr PROTOTYPE((JNIEnv *env, jobject fileDescriptor, hysockaddr_t sockaddrP, jboolean preferIPv6Addresses));
 
 /* NativesCommonIoHelpers*/
-void* getJavaIoFileDescriptorContentsAsPointer PROTOTYPE((JNIEnv *env, jobject fd));
 void throwNewExceptionByName PROTOTYPE((JNIEnv* env,
                                         const char* name, const char* message));
 void throwNewOutOfMemoryError PROTOTYPE((JNIEnv* env, const char* message));
-jint ioh_readcharImpl PROTOTYPE((JNIEnv * env, jobject recv, IDATA descriptor));
 void throwJavaIoIOException PROTOTYPE((JNIEnv* env, const char* message));
 void throwJavaIoIOExceptionClosed PROTOTYPE((JNIEnv* env));
 void ioh_convertToPlatform PROTOTYPE((char *path));
-jint new_ioh_available PROTOTYPE((JNIEnv * env, jobject recv, jfieldID fdFID));
 void throwNPException PROTOTYPE((JNIEnv* env, const char* message));
-void setJavaIoFileDescriptorContentsAsPointer PROTOTYPE((JNIEnv * env, jobject fd, void *value));
-void ioh_writebytesImpl PROTOTYPE((JNIEnv * env, jobject recv, jbyteArray buffer, jint offset, jint count, IDATA descriptor));
-char* ioLookupErrorString PROTOTYPE((JNIEnv* env, I_32 anErrorNum));
-void ioh_writecharImpl PROTOTYPE((JNIEnv *env, jobject recv, jint c, IDATA descriptor));
-jint ioh_readbytesImpl PROTOTYPE((JNIEnv * env, jobject recv, jbyteArray buffer, jint offset, jint count, IDATA descriptor));
-void new_ioh_close PROTOTYPE((JNIEnv * env, jobject recv, jfieldID fdFID));
 void throwIndexOutOfBoundsException PROTOTYPE((JNIEnv* env));
 
-/* NativesCommonSocket*/
-void throwSocketException PROTOTYPE((JNIEnv* env, I_32 errorNumber));
-I_32 conPollSelectRead PROTOTYPE((JNIEnv * env, jobject socket, jint timeout, BOOLEAN poll, BOOLEAN accept));
-void* getSocketDescriptor PROTOTYPE((JNIEnv *env, jobject fd));
-void setSocketDescriptor PROTOTYPE((JNIEnv * env, jobject fd, void *value));
-jstring JNICALL Java_java_lang_System_getHostnameImpl PROTOTYPE((
-	JNIEnv* env, jclass clazz));
-void conUpdateSocket PROTOTYPE((JNIEnv *env, hysockaddr_t sockaddrP, jobject socket, int remote));
-hysocket_t createAndBindSocket PROTOTYPE((JNIEnv* env, jobject socket, int sockType, int localPort));
-
 /* NativesCommonFileDescriptor*/
 void JNICALL Java_java_io_FileDescriptor_oneTimeInitialization PROTOTYPE((JNIEnv * env, jclass fdClazz));
 void JNICALL Java_java_io_FileDescriptor_sync PROTOTYPE((JNIEnv * env, jobject recv));
@@ -357,32 +247,6 @@
 void JNICALL Java_org_apache_harmony_luni_internal_process_ProcessInputStream_setFDImpl PROTOTYPE((JNIEnv *env, jobject recv, jobject arg1, jlong arg2));
 void JNICALL Java_org_apache_harmony_luni_internal_process_SystemProcess_oneTimeInitialization PROTOTYPE((JNIEnv * env, jclass clazz));
 
-/* NativesCommonPlainDatagramSocketImpl*/
-jint JNICALL Java_java_net_PlainDatagramSocketImpl_sendDatagramImpl2 PROTOTYPE((
-	JNIEnv* env, jclass thisClz,
-	jobject fileDescriptor, jbyteArray data, jint offset, jint msgLength,
-    jint targetPort, jboolean bindToDevice, jint trafficClass, jobject inetAddress));
-void JNICALL Java_java_net_PlainDatagramSocketImpl_createDatagramSocketImpl PROTOTYPE((
-	JNIEnv* env, jclass thisClz, jobject thisObjFD, jboolean preferIPv4Stack));
-jint JNICALL Java_java_net_PlainDatagramSocketImpl_peekDatagramImpl PROTOTYPE(( JNIEnv *env, jclass thisClz,
-	jobject fileDescriptor, jobject senderAddress, jint timeout));
-jint JNICALL Java_java_net_PlainDatagramSocketImpl_sendConnectedDatagramImpl PROTOTYPE((
-	JNIEnv* env, jclass thisClz,
-	jobject fileDescriptor, jbyteArray data, jint offset, jint msgLength, jboolean bindToDevice));
-void JNICALL Java_java_net_PlainDatagramSocketImpl_oneTimeInitialization PROTOTYPE((JNIEnv * env, jclass clazz, jboolean ipv6support ));
-void JNICALL Java_java_net_PlainDatagramSocketImpl_connectDatagramImpl2 PROTOTYPE((JNIEnv *env, jclass thisClz,
-	jobject fileDescriptor, jint remotePort, jint trafficClass, jobject inetAddress));
-jint JNICALL Java_java_net_PlainDatagramSocketImpl_receiveDatagramImpl2 PROTOTYPE(( JNIEnv *env, jclass thisClz,
-	jobject fileDescriptor, jobject datagramPacket, jbyteArray data, jint offset, jint msgLength, jint timeout, jboolean peek));
-jint JNICALL Java_java_net_PlainDatagramSocketImpl_receiveDatagramImpl PROTOTYPE(( JNIEnv *env, jclass thisClz,
-	jobject fileDescriptor, jobject datagramPacket, jbyteArray data, jint offset, jint msgLength, jint timeout));
-jboolean JNICALL Java_java_net_PlainDatagramSocketImpl_socketBindImpl2 PROTOTYPE((JNIEnv *env, jclass thisClz,
-	jobject fileDescriptor, jint localPort,jboolean doDevice, jobject inetAddress));
-void JNICALL Java_java_net_PlainDatagramSocketImpl_disconnectDatagramImpl PROTOTYPE((JNIEnv *env, jclass thisClz,
-	jobject fileDescriptor));
-jint JNICALL Java_java_net_PlainDatagramSocketImpl_recvConnectedDatagramImpl PROTOTYPE(( JNIEnv *env, jclass thisClz,
-	jobject fileDescriptor, jobject datagramPacket, jbyteArray data, jint offset, jint msgLength, jint timeout, jboolean peek));
-
 /************************************************************
  ** COMPONENT: NativesCommonFileSystem
  ************************************************************/
@@ -412,10 +276,6 @@
 void setPlatformBindOptions PROTOTYPE((JNIEnv *env, hysocket_t socketP));
 I_32 setPlatformLastModified PROTOTYPE((JNIEnv *env, char * path, I_64 time));
 I_32 setPlatformReadOnly PROTOTYPE((JNIEnv *env, char * path));
-
-/* NativesUNIXcomm*/
-jint baudValueToConst PROTOTYPE((jint baudRate));
-jint baudConstToValue PROTOTYPE((jint baudRate));
 
 /* NativesUNIXSystemHelpers*/
 char *getPlatformFileEncoding PROTOTYPE((JNIEnv * env, char *codepageProp, int propSize));

Modified: harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/include/windows/jclprots.h
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/include/windows/jclprots.h?rev=588245&r1=588244&r2=588245&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/include/windows/jclprots.h (original)
+++ harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/include/windows/jclprots.h Thu Oct 25 07:44:56 2007
@@ -25,12 +25,6 @@
 #include "vmi.h"
 
 
-  /* NativesCommonPlainServerSocketImpl*/
-  JNIEXPORT void JNICALL
-    Java_java_net_PlainServerSocketImpl_createServerStreamSocketImpl
-    PROTOTYPE ((JNIEnv * env, jclass thisClz, jobject thisObjFD,
-                jboolean preferIPv4Stack));
-                
   /* NativesCommonDeflater*/
   JNIEXPORT void JNICALL Java_java_util_zip_Deflater_setDictionaryImpl
     PROTOTYPE ((JNIEnv * env, jobject recv, jbyteArray dict, int off, int len,
@@ -60,40 +54,6 @@
   JNIEXPORT jint JNICALL Java_java_util_zip_Deflater_getAdlerImpl
     PROTOTYPE ((JNIEnv * env, jobject recv, jlong handle));
 
-  /* NativesCommonPlainSocketImpl2*/
-  JNIEXPORT void JNICALL
-    Java_java_net_PlainSocketImpl2_connectStreamWithTimeoutSocketImpl2
-    PROTOTYPE ((JNIEnv * env, jclass thisClz, jobject fileDescriptor,
-                jint remotePort, jint timeout, jint trafficClass,
-                jobject inetAddress));
-  JNIEXPORT void JNICALL Java_java_net_PlainSocketImpl2_socketBindImpl2
-    PROTOTYPE ((JNIEnv * env, jclass thisClz, jobject fileDescriptor,
-                jint localPort, jobject inetAddress));
-  JNIEXPORT void JNICALL Java_java_net_PlainSocketImpl2_createStreamSocketImpl2
-    PROTOTYPE ((JNIEnv * env, jclass thisClz, jobject thisObjFD,
-                jboolean preferIPv4Stack));
-  JNIEXPORT void JNICALL Java_java_net_PlainSocketImpl2_connectStreamSocketImpl2
-    PROTOTYPE ((JNIEnv * env, jclass thisClz, jobject fileDescriptor,
-                jint remotePort, jint trafficClass, jobject inetAddress));
-  JNIEXPORT jint JNICALL Java_java_net_PlainSocketImpl2_sendDatagramImpl2
-    PROTOTYPE ((JNIEnv * env, jclass thisClz, jobject fileDescriptor,
-                jbyteArray data, jint offset, jint msgLength, jint targetPort,
-                jobject inetAddress));
-                
-  /* NativesCommonFileOutputStream*/
-  JNIEXPORT jint JNICALL Java_java_io_FileOutputStream_openImpl
-    PROTOTYPE ((JNIEnv * env, jobject recv, jbyteArray path,
-                jboolean append));
-  JNIEXPORT void JNICALL Java_java_io_FileOutputStream_closeImpl
-    PROTOTYPE ((JNIEnv * env, jobject recv));
-  JNIEXPORT void JNICALL Java_java_io_FileOutputStream_writeByteImpl
-    PROTOTYPE ((JNIEnv * env, jobject recv, jint c, jlong descriptor));
-  JNIEXPORT void JNICALL Java_java_io_FileOutputStream_writeImpl
-    PROTOTYPE ((JNIEnv * env, jobject recv, jbyteArray buffer, jint offset,
-                jint count, jlong descriptor));
-  JNIEXPORT void JNICALL Java_java_io_FileOutputStream_oneTimeInitialization
-    PROTOTYPE ((JNIEnv * env, jclass clazz));
-    
   /* NativesCommonDoubleParsing*/
   JNIEXPORT jdouble JNICALL
     Java_org_apache_harmony_luni_util_FloatingPointParser_parseDblImpl
@@ -117,40 +77,6 @@
     PROTOTYPE ((JNIEnv * env, jobject recv, jbyteArray buf, int off, int len,
                 jlong crc));
                 
-  /* NativesCommonSocketImpl*/
-  JNIEXPORT void JNICALL Java_java_net_SocketImpl_listenStreamSocketImpl
-    PROTOTYPE ((JNIEnv * env, jclass thisClz, jobject fileDescriptor,
-                jint backlog));
-  JNIEXPORT void JNICALL Java_java_net_SocketImpl_acceptStreamSocketImpl
-    PROTOTYPE ((JNIEnv * env, jclass thisClz, jobject fileDescriptorServer,
-                jobject socketImpl, jobject fileDescriptorSocketImpl,
-                jint timeout));
-  JNIEXPORT void JNICALL Java_java_net_SocketImpl_sendUrgentDataImpl
-    PROTOTYPE ((JNIEnv * env, jclass thisClz, jobject fileDescriptor,
-                jbyte data));
-  JNIEXPORT jint JNICALL Java_java_net_SocketImpl_receiveStreamImpl
-    PROTOTYPE ((JNIEnv * env, jclass thisClz, jobject fileDescriptor,
-                jbyteArray data, jint offset, jint count, jint timeout));
-  JNIEXPORT void JNICALL Java_java_net_SocketImpl_createStreamSocketImpl
-    PROTOTYPE ((JNIEnv * env, jclass thisClz, jobject thisObjFD,
-                jboolean preferIPv4Stack));
-  JNIEXPORT jint JNICALL Java_java_net_SocketImpl_sendStreamImpl
-    PROTOTYPE ((JNIEnv * env, jclass thisClz, jobject fileDescriptor,
-                jbyteArray data, jint offset, jint count));
-  JNIEXPORT void JNICALL Java_java_net_SocketImpl_shutdownOutputImpl
-    PROTOTYPE ((JNIEnv * env, jclass thisClz, jobject fileDescriptor));
-  JNIEXPORT void JNICALL Java_java_net_SocketImpl_createDatagramSocketImpl
-    PROTOTYPE ((JNIEnv * env, jclass thisClz, jobject thisObjFD,
-                jboolean preferIPv4Stack));
-  JNIEXPORT jint JNICALL Java_java_net_SocketImpl_availableStreamImpl
-    PROTOTYPE ((JNIEnv * env, jclass thisClz, jobject fileDescriptor));
-  JNIEXPORT jboolean JNICALL Java_java_net_SocketImpl_supportsUrgentDataImpl
-    PROTOTYPE ((JNIEnv * env, jclass thisClz, jobject fileDescriptor));
-  JNIEXPORT void JNICALL Java_java_net_SocketImpl_shutdownInputImpl
-    PROTOTYPE ((JNIEnv * env, jclass thisClz, jobject fileDescriptor));
-  JNIEXPORT void JNICALL Java_java_net_SocketImpl_oneTimeInitialization
-    PROTOTYPE ((JNIEnv * env, jclass clazz, jboolean jcl_supports_ipv6));
-    
   /* NativesCommonFile*/
   JNIEXPORT jboolean JNICALL Java_java_io_File_mkdirImpl
     PROTOTYPE ((JNIEnv * env, jobject recv, jbyteArray path));
@@ -200,23 +126,6 @@
   JNIEXPORT jboolean JNICALL Java_java_io_File_setReadOnlyImpl
     PROTOTYPE ((JNIEnv * env, jobject recv, jbyteArray path));
     
-  /* NativesCommonFileInputStream*/
-  JNIEXPORT jint JNICALL Java_java_io_FileInputStream_readByteImpl
-    PROTOTYPE ((JNIEnv * env, jobject recv, jlong descriptor));
-  JNIEXPORT jint JNICALL Java_java_io_FileInputStream_readImpl
-    PROTOTYPE ((JNIEnv * env, jobject recv, jbyteArray buffer, jint offset,
-                jint count, jlong descriptor));
-  JNIEXPORT void JNICALL Java_java_io_FileInputStream_oneTimeInitialization
-    PROTOTYPE ((JNIEnv * env, jclass clazz));
-  JNIEXPORT void JNICALL Java_java_io_FileInputStream_closeImpl
-    PROTOTYPE ((JNIEnv * env, jobject recv));
-  JNIEXPORT jlong JNICALL Java_java_io_FileInputStream_skip
-    PROTOTYPE ((JNIEnv * env, jobject recv, jlong count));
-  JNIEXPORT jint JNICALL Java_java_io_FileInputStream_available
-    PROTOTYPE ((JNIEnv * env, jobject recv));
-  JNIEXPORT jint JNICALL Java_java_io_FileInputStream_openImpl
-    PROTOTYPE ((JNIEnv * env, jobject recv, jbyteArray path));
-    
   /* NativesCommonObjectInputStream*/
   JNIEXPORT void JNICALL
     Java_java_io_ObjectInputStream_setField__Ljava_lang_Object_2Ljava_lang_Class_2Ljava_lang_String_2I
@@ -327,63 +236,20 @@
   char *readCodepageMappings
     PROTOTYPE ((JNIEnv * env, char *codepage, char *codepageResult,
                 int resultSize));
-                
+
   /* NativesCommonProxy*/
   JNIEXPORT jclass JNICALL Java_java_lang_reflect_Proxy_defineClassImpl
     PROTOTYPE ((JNIEnv * env, jclass recvClass, jobject classLoader,
                 jstring className, jbyteArray classBytes));
-  JNIEXPORT jclass JNICALL
-    Java_java_lang_reflect_Proxy_defineClass0__Ljava_lang_ClassLoader_2Ljava_lang_String_2_3BIILjava_lang_Object_2_3Ljava_lang_Object_2Ljava_lang_Object_2
-    PROTOTYPE ((JNIEnv * env, jclass recvClass, jobject classLoader,
-                jstring className, jbyteArray classBytes, jint offset,
-                jint length, jobject pd, jobject signers, jobject source));
-  JNIEXPORT jclass JNICALL
-    Java_java_lang_reflect_Proxy_defineClass0__Ljava_lang_ClassLoader_2Ljava_lang_String_2_3BII
-    PROTOTYPE ((JNIEnv * env, jclass recvClass, jobject classLoader,
-                jstring className, jbyteArray classBytes, jint offset,
-                jint length));
-                
+ 
   /* NativesCommonGlobals*/
   JNIEXPORT void JNICALL JNI_OnUnload PROTOTYPE ((JavaVM * vm, void *reserved));
   JNIEXPORT jint JNICALL JCL_OnLoad PROTOTYPE ((JavaVM * vm, void *reserved));
   
-  /* NativesCommonRuntime*/
-  JNIEXPORT jlong JNICALL Java_java_lang_Runtime_maxMemoryImpl
-    PROTOTYPE ((JNIEnv * env, jclass cls));
-  JNIEXPORT jint JNICALL Java_java_lang_Runtime_availableProcessorsImpl
-    PROTOTYPE ((JNIEnv * env, jclass cls));
-    
   /* NativesCommonJarFile*/
   JNIEXPORT jarray JNICALL Java_java_util_jar_JarFile_getMetaEntriesImpl
     PROTOTYPE ((JNIEnv * env, jobject recv, jbyteArray zipName));
     
-  /* NativesCommonRandomAccessFile*/
-  JNIEXPORT jint JNICALL Java_java_io_RandomAccessFile_readImpl
-    PROTOTYPE ((JNIEnv * env, jobject recv, jbyteArray buffer, jint offset,
-                jint count, jlong descriptor));
-  JNIEXPORT void JNICALL Java_java_io_RandomAccessFile_seek
-    PROTOTYPE ((JNIEnv * env, jobject recv, jlong pos));
-  JNIEXPORT void JNICALL Java_java_io_RandomAccessFile_closeImpl
-    PROTOTYPE ((JNIEnv * env, jobject recv));
-  JNIEXPORT jlong JNICALL Java_java_io_RandomAccessFile_length
-    PROTOTYPE ((JNIEnv * env, jobject recv));
-  JNIEXPORT jlong JNICALL Java_java_io_RandomAccessFile_getFilePointer
-    PROTOTYPE ((JNIEnv * env, jobject recv));
-  JNIEXPORT void JNICALL Java_java_io_RandomAccessFile_setLengthImpl
-    PROTOTYPE ((JNIEnv * env, jobject recv, jlong newLength));
-  JNIEXPORT void JNICALL Java_java_io_RandomAccessFile_writeImpl
-    PROTOTYPE ((JNIEnv * env, jobject recv, jbyteArray buffer, jint offset,
-                jint count, jlong descriptor));
-  JNIEXPORT jint JNICALL Java_java_io_RandomAccessFile_readByteImpl
-    PROTOTYPE ((JNIEnv * env, jobject recv, jlong descriptor));
-  JNIEXPORT void JNICALL Java_java_io_RandomAccessFile_oneTimeInitialization
-    PROTOTYPE ((JNIEnv * env, jclass rafClazz));
-  JNIEXPORT jint JNICALL Java_java_io_RandomAccessFile_openImpl
-    PROTOTYPE ((JNIEnv * env, jobject recv, jbyteArray path,
-                jboolean writable));
-  JNIEXPORT void JNICALL Java_java_io_RandomAccessFile_writeByteImpl
-    PROTOTYPE ((JNIEnv * env, jobject recv, jint c, jlong descriptor));
-    
   /* NativesCommonObjectOutputStream*/
   JNIEXPORT jfloat JNICALL Java_java_io_ObjectOutputStream_getFieldFloat
     PROTOTYPE ((JNIEnv * env, jclass clazz, jobject targetObject,
@@ -418,34 +284,10 @@
   void createSocket
     PROTOTYPE ((JNIEnv * env, jobject thisObjFD, int sockType,
                 jboolean preferIPv4Stack));
-  JNIEXPORT void JNICALL Java_java_net_Socket_socketCloseImpl
-    PROTOTYPE ((JNIEnv * env, jclass thisClz, jobject fileDescriptor));
-  JNIEXPORT void JNICALL Java_java_net_Socket_oneTimeInitialization
-    PROTOTYPE ((JNIEnv * env, jclass clazz, jboolean jcl_supports_ipv6));
-  JNIEXPORT jobject JNICALL Java_java_net_Socket_getSocketLocalAddressImpl
-    PROTOTYPE ((JNIEnv * env, jclass thisClz, jobject fileDescriptor,
-                jboolean preferIPv6Addresses));
-  JNIEXPORT jobject JNICALL Java_java_net_Socket_getSocketOptionImpl
-    PROTOTYPE ((JNIEnv * env, jclass thisClz, jobject aFileDescriptor,
-                jint anOption));
-  JNIEXPORT void JNICALL Java_java_net_Socket_setSocketOptionImpl
-    PROTOTYPE ((JNIEnv * env, jclass thisClz, jobject aFileDescriptor,
-                jint anOption, jobject aValue));
-  JNIEXPORT jint JNICALL Java_java_net_Socket_getSocketFlags
-    PROTOTYPE ((JNIEnv * env, jclass thisClz));
-  JNIEXPORT jint JNICALL Java_java_net_Socket_getSocketLocalPortImpl
-    PROTOTYPE ((JNIEnv * env, jclass thisClz, jobject fileDescriptor,
-                jboolean preferIPv6Addresses));
   I_32 pollSelectRead
     PROTOTYPE ((JNIEnv * env, jobject fileDescriptor, jint timeout,
                 BOOLEAN poll));
                 
-  /* NativesCommonPlainMulticastSocketImpl*/
-  JNIEXPORT void JNICALL
-    Java_java_net_PlainMulticastSocketImpl_createMulticastSocketImpl
-    PROTOTYPE ((JNIEnv * env, jclass thisClz, jobject thisObjFD,
-                jboolean preferIPv4Stack));
-                
   /* NativesCommonZipFile*/
   void throwJavaZIOException PROTOTYPE ((JNIEnv * env, const char *message));
   void throwNewInternalError PROTOTYPE ((JNIEnv * env, const char *message));
@@ -487,9 +329,7 @@
   JNIEXPORT jobject JNICALL Java_java_net_InetAddress_getHostByNameImpl
     PROTOTYPE ((JNIEnv * env, jclass clazz, jstring aName,
                 jboolean preferIPv6Addresses));
-  JNIEXPORT jobjectArray JNICALL Java_java_net_InetAddress_getAliasesByAddrImpl
-    PROTOTYPE ((JNIEnv * env, jclass clazz, jstring addr));
-    
+
   /* NativesCommonTimeZone*/
   JNIEXPORT jstring JNICALL Java_java_util_TimeZone_getCustomTimeZone
     PROTOTYPE ((JNIEnv * env, jclass clazz, jintArray tzinfo,
@@ -519,7 +359,6 @@
   jobjectArray createAliasArrayFromAddrinfo
     PROTOTYPE ((JNIEnv * env, hyaddrinfo_t addresses, char *hName));
   BOOLEAN booleanValue PROTOTYPE ((JNIEnv * env, jobject aBoolean));
-  BOOLEAN jcl_supports_ipv6 PROTOTYPE ((JNIEnv * env));
   jobject newJavaLangInteger PROTOTYPE ((JNIEnv * env, I_32 anInt));
   BOOLEAN preferIPv4Stack PROTOTYPE ((JNIEnv * env));
   char *netLookupErrorString PROTOTYPE ((JNIEnv * env, I_32 anErrorNum));
@@ -551,50 +390,16 @@
                 jboolean preferIPv6Addresses));
                 
   /* NativesCommonIoHelpers*/
-  void *getJavaIoFileDescriptorContentsAsPointer
-    PROTOTYPE ((JNIEnv * env, jobject fd));
   void throwNewExceptionByName PROTOTYPE((JNIEnv* env,
                                           const char* name,
                                           const char* message));
   void throwNewOutOfMemoryError PROTOTYPE ((JNIEnv* env, const char* message));
-  jint ioh_readcharImpl
-    PROTOTYPE ((JNIEnv * env, jobject recv, IDATA descriptor));
   void throwJavaIoIOException PROTOTYPE ((JNIEnv* env, const char* message));
   void throwJavaIoIOExceptionClosed PROTOTYPE ((JNIEnv* env));
   void ioh_convertToPlatform PROTOTYPE ((char *path));
-  jint new_ioh_available
-    PROTOTYPE ((JNIEnv * env, jobject recv, jfieldID fdFID));
   void throwNPException PROTOTYPE ((JNIEnv* env, const char* message));
-  void setJavaIoFileDescriptorContentsAsPointer
-    PROTOTYPE ((JNIEnv * env, jobject fd, void *value));
-  void ioh_writebytesImpl
-    PROTOTYPE ((JNIEnv * env, jobject recv, jbyteArray buffer, jint offset,
-                jint count, IDATA descriptor));
-  char *ioLookupErrorString PROTOTYPE ((JNIEnv * env, I_32 anErrorNum));
-  void ioh_writecharImpl
-    PROTOTYPE ((JNIEnv * env, jobject recv, jint c, IDATA descriptor));
-  jint ioh_readbytesImpl
-    PROTOTYPE ((JNIEnv * env, jobject recv, jbyteArray buffer, jint offset,
-                jint count, IDATA descriptor));
-  void new_ioh_close PROTOTYPE ((JNIEnv * env, jobject recv, jfieldID fdFID));
   void throwIndexOutOfBoundsException PROTOTYPE ((JNIEnv* env));
 
-  /* NativesCommonSocket*/
-  void throwSocketException PROTOTYPE ((JNIEnv * env, I_32 errorNumber));
-  I_32 conPollSelectRead
-    PROTOTYPE ((JNIEnv * env, jobject socket, jint timeout, BOOLEAN poll,
-                BOOLEAN accept));
-  void *getSocketDescriptor PROTOTYPE ((JNIEnv * env, jobject fd));
-  void setSocketDescriptor
-    PROTOTYPE ((JNIEnv * env, jobject fd, void *value));
-  JNIEXPORT jstring JNICALL Java_java_lang_System_getHostnameImpl
-    PROTOTYPE ((JNIEnv * env, jclass clazz));
-  void conUpdateSocket
-    PROTOTYPE ((JNIEnv * env, hysockaddr_t sockaddrP, jobject socket,
-                int remote));
-  hysocket_t createAndBindSocket
-    PROTOTYPE ((JNIEnv * env, jobject socket, int sockType, int localPort));
-                
   /* NativesCommonFileDescriptor*/
   JNIEXPORT void JNICALL Java_java_io_FileDescriptor_oneTimeInitialization
     PROTOTYPE ((JNIEnv * env, jclass fdClazz));
@@ -635,45 +440,6 @@
     PROTOTYPE ((JNIEnv * env, jobject recv, jobject arg1, jlong arg2));
   JNIEXPORT void JNICALL Java_org_apache_harmony_luni_internal_process_SystemProcess_oneTimeInitialization
     PROTOTYPE ((JNIEnv * env, jclass clazz));
-    
-  /* NativesCommonPlainDatagramSocketImpl*/
-  JNIEXPORT jint JNICALL Java_java_net_PlainDatagramSocketImpl_sendDatagramImpl2
-    PROTOTYPE ((JNIEnv * env, jclass thisClz, jobject fileDescriptor,
-                jbyteArray data, jint offset, jint msgLength, jint targetPort,
-                jboolean bindToDevice, jint trafficClass,
-                jobject inetAddress));
-  JNIEXPORT void JNICALL Java_java_net_PlainDatagramSocketImpl_createDatagramSocketImpl
-    PROTOTYPE ((JNIEnv * env, jclass thisClz, jobject thisObjFD,
-                jboolean preferIPv4Stack));
-  JNIEXPORT jint JNICALL Java_java_net_PlainDatagramSocketImpl_peekDatagramImpl
-    PROTOTYPE ((JNIEnv * env, jclass thisClz, jobject fileDescriptor,
-                jobject senderAddress, jint timeout));
-  JNIEXPORT jint JNICALL Java_java_net_PlainDatagramSocketImpl_sendConnectedDatagramImpl
-    PROTOTYPE ((JNIEnv * env, jclass thisClz, jobject fileDescriptor,
-                jbyteArray data, jint offset, jint msgLength,
-                jboolean bindToDevice));
-  JNIEXPORT void JNICALL Java_java_net_PlainDatagramSocketImpl_oneTimeInitialization
-    PROTOTYPE ((JNIEnv * env, jclass clazz, jboolean ipv6support));
-  JNIEXPORT void JNICALL Java_java_net_PlainDatagramSocketImpl_connectDatagramImpl2
-    PROTOTYPE ((JNIEnv * env, jclass thisClz, jobject fileDescriptor,
-                jint remotePort, jint trafficClass, jobject inetAddress));
-  JNIEXPORT jint JNICALL Java_java_net_PlainDatagramSocketImpl_receiveDatagramImpl2
-    PROTOTYPE ((JNIEnv * env, jclass thisClz, jobject fileDescriptor,
-                jobject datagramPacket, jbyteArray data, jint offset,
-                jint msgLength, jint timeout, jboolean peek));
-  JNIEXPORT jint JNICALL Java_java_net_PlainDatagramSocketImpl_receiveDatagramImpl
-    PROTOTYPE ((JNIEnv * env, jclass thisClz, jobject fileDescriptor,
-                jobject datagramPacket, jbyteArray data, jint offset,
-                jint msgLength, jint timeout));
-  JNIEXPORT jboolean JNICALL Java_java_net_PlainDatagramSocketImpl_socketBindImpl2
-    PROTOTYPE ((JNIEnv * env, jclass thisClz, jobject fileDescriptor,
-                jint localPort, jboolean doDevice, jobject inetAddress));
-  JNIEXPORT void JNICALL Java_java_net_PlainDatagramSocketImpl_disconnectDatagramImpl
-    PROTOTYPE ((JNIEnv * env, jclass thisClz, jobject fileDescriptor));
-  JNIEXPORT jint JNICALL Java_java_net_PlainDatagramSocketImpl_recvConnectedDatagramImpl
-    PROTOTYPE ((JNIEnv * env, jclass thisClz, jobject fileDescriptor,
-                jobject datagramPacket, jbyteArray data, jint offset,
-                jint msgLength, jint timeout, jboolean peek));
     
   /************************************************************
   ** COMPONENT: NativesWin32

Modified: harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/launcher/shared/main.c
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/launcher/shared/main.c?rev=588245&r1=588244&r2=588245&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/launcher/shared/main.c (original)
+++ harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/launcher/shared/main.c Thu Oct 25 07:44:56 2007
@@ -752,7 +752,9 @@
       hymem_free_memory (mainClassJar);
     }
 
-  // by spec we must call DestroyJavaVM without detaching main thread
+  /* Updated in the 6.0 spec, we can now detach the main thread before calling DestroyJavaVM, 
+     and we must if we wish main thread uncaught exception handlers to be called. */
+  (*jvm)->DetachCurrentThread(jvm);
   (*jvm)->DestroyJavaVM (jvm);
   /*if ((*jvm)->DestroyJavaVM(jvm)) {
      hytty_printf (PORTLIB, "Failed to destroy JVM\n");

Modified: harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/luni/shared/OSNetworkSystem.c
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/luni/shared/OSNetworkSystem.c?rev=588245&r1=588244&r2=588245&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/luni/shared/OSNetworkSystem.c (original)
+++ harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/luni/shared/OSNetworkSystem.c Thu Oct 25 07:44:56 2007
@@ -1442,7 +1442,7 @@
     }
   else
     {
-     /* update	the packet with	the legth of data received.
+     /* update	the packet with	the length of data received.
 	 Since we are connected	we did not get back an address.	 This
 	 address is cached within the PlainDatagramSocket  java	object and is filled in	at
 	 the java level	*/

Modified: harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/luni/shared/bigint.c
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/luni/shared/bigint.c?rev=588245&r1=588244&r2=588245&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/luni/shared/bigint.c (original)
+++ harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/luni/shared/bigint.c Thu Oct 25 07:44:56 2007
@@ -951,7 +951,7 @@
       shiftvalr = 64 - shiftval;
       lenR = len + newAt + 1;
 
-      /* attemp to pre-normalize */
+      /* attempt to pre-normalize */
       if (!(ar = (U_64 *) GET_ELEMENTS_CRITICAL (src)))
         goto error;
       if (shiftval == 0
@@ -1013,7 +1013,7 @@
             lenR = 1;
           else
             {
-              /* attemp to pre-normalize */
+              /* attempt to pre-normalize */
               if (!(ar = (U_64 *) GET_ELEMENTS_CRITICAL (src)))
                 goto error;
               if (shiftval != 0

Modified: harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/luni/shared/cbigint.c
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/luni/shared/cbigint.c?rev=588245&r1=588244&r2=588245&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/luni/shared/cbigint.c (original)
+++ harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/luni/shared/cbigint.c Thu Oct 25 07:44:56 2007
@@ -691,7 +691,7 @@
    */
   /* Replace the current implementaion which performs a
    * "multiplication" by 10 e number of times with an actual
-   * mulitplication. 10e19 is the largest exponent to the power of ten
+   * multiplication. 10e19 is the largest exponent to the power of ten
    * that will fit in a 64-bit integer, and 10e9 is the largest exponent to
    * the power of ten that will fit in a 64-bit integer. Not sure where the
    * break-even point is between an actual multiplication and a



Mime
View raw message