harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From telli...@apache.org
Subject svn commit: r578091 [1/8] - /harmony/enhanced/classlib/trunk/modules/nio/src/main/java/java/nio/
Date Fri, 21 Sep 2007 13:06:01 GMT
Author: tellison
Date: Fri Sep 21 06:05:59 2007
New Revision: 578091

URL: http://svn.apache.org/viewvc?rev=578091&view=rev
Log:
Reformatting java.nio (mostly converting tabs to spaces).
No functional change.

Modified:
    harmony/enhanced/classlib/trunk/modules/nio/src/main/java/java/nio/BaseByteBuffer.java
    harmony/enhanced/classlib/trunk/modules/nio/src/main/java/java/nio/Buffer.java
    harmony/enhanced/classlib/trunk/modules/nio/src/main/java/java/nio/BufferFactory.java
    harmony/enhanced/classlib/trunk/modules/nio/src/main/java/java/nio/BufferOverflowException.java
    harmony/enhanced/classlib/trunk/modules/nio/src/main/java/java/nio/BufferUnderflowException.java
    harmony/enhanced/classlib/trunk/modules/nio/src/main/java/java/nio/ByteBuffer.java
    harmony/enhanced/classlib/trunk/modules/nio/src/main/java/java/nio/ByteOrder.java
    harmony/enhanced/classlib/trunk/modules/nio/src/main/java/java/nio/CharArrayBuffer.java
    harmony/enhanced/classlib/trunk/modules/nio/src/main/java/java/nio/CharBuffer.java
    harmony/enhanced/classlib/trunk/modules/nio/src/main/java/java/nio/CharSequenceAdapter.java
    harmony/enhanced/classlib/trunk/modules/nio/src/main/java/java/nio/CharToByteBufferAdapter.java
    harmony/enhanced/classlib/trunk/modules/nio/src/main/java/java/nio/DirectByteBuffer.java
    harmony/enhanced/classlib/trunk/modules/nio/src/main/java/java/nio/DirectByteBuffers.java
    harmony/enhanced/classlib/trunk/modules/nio/src/main/java/java/nio/DoubleArrayBuffer.java
    harmony/enhanced/classlib/trunk/modules/nio/src/main/java/java/nio/DoubleBuffer.java
    harmony/enhanced/classlib/trunk/modules/nio/src/main/java/java/nio/DoubleToByteBufferAdapter.java
    harmony/enhanced/classlib/trunk/modules/nio/src/main/java/java/nio/FloatArrayBuffer.java
    harmony/enhanced/classlib/trunk/modules/nio/src/main/java/java/nio/FloatBuffer.java
    harmony/enhanced/classlib/trunk/modules/nio/src/main/java/java/nio/FloatToByteBufferAdapter.java
    harmony/enhanced/classlib/trunk/modules/nio/src/main/java/java/nio/HeapByteBuffer.java
    harmony/enhanced/classlib/trunk/modules/nio/src/main/java/java/nio/IntArrayBuffer.java
    harmony/enhanced/classlib/trunk/modules/nio/src/main/java/java/nio/IntBuffer.java
    harmony/enhanced/classlib/trunk/modules/nio/src/main/java/java/nio/IntToByteBufferAdapter.java
    harmony/enhanced/classlib/trunk/modules/nio/src/main/java/java/nio/InvalidMarkException.java
    harmony/enhanced/classlib/trunk/modules/nio/src/main/java/java/nio/LongArrayBuffer.java
    harmony/enhanced/classlib/trunk/modules/nio/src/main/java/java/nio/LongBuffer.java
    harmony/enhanced/classlib/trunk/modules/nio/src/main/java/java/nio/LongToByteBufferAdapter.java
    harmony/enhanced/classlib/trunk/modules/nio/src/main/java/java/nio/MappedByteBuffer.java
    harmony/enhanced/classlib/trunk/modules/nio/src/main/java/java/nio/MappedByteBufferAdapter.java
    harmony/enhanced/classlib/trunk/modules/nio/src/main/java/java/nio/ReadOnlyBufferException.java
    harmony/enhanced/classlib/trunk/modules/nio/src/main/java/java/nio/ReadOnlyCharArrayBuffer.java
    harmony/enhanced/classlib/trunk/modules/nio/src/main/java/java/nio/ReadOnlyDirectByteBuffer.java
    harmony/enhanced/classlib/trunk/modules/nio/src/main/java/java/nio/ReadOnlyDoubleArrayBuffer.java
    harmony/enhanced/classlib/trunk/modules/nio/src/main/java/java/nio/ReadOnlyFloatArrayBuffer.java
    harmony/enhanced/classlib/trunk/modules/nio/src/main/java/java/nio/ReadOnlyHeapByteBuffer.java
    harmony/enhanced/classlib/trunk/modules/nio/src/main/java/java/nio/ReadOnlyIntArrayBuffer.java
    harmony/enhanced/classlib/trunk/modules/nio/src/main/java/java/nio/ReadOnlyLongArrayBuffer.java
    harmony/enhanced/classlib/trunk/modules/nio/src/main/java/java/nio/ReadOnlyShortArrayBuffer.java
    harmony/enhanced/classlib/trunk/modules/nio/src/main/java/java/nio/ReadWriteCharArrayBuffer.java
    harmony/enhanced/classlib/trunk/modules/nio/src/main/java/java/nio/ReadWriteDirectByteBuffer.java
    harmony/enhanced/classlib/trunk/modules/nio/src/main/java/java/nio/ReadWriteDoubleArrayBuffer.java
    harmony/enhanced/classlib/trunk/modules/nio/src/main/java/java/nio/ReadWriteFloatArrayBuffer.java
    harmony/enhanced/classlib/trunk/modules/nio/src/main/java/java/nio/ReadWriteHeapByteBuffer.java
    harmony/enhanced/classlib/trunk/modules/nio/src/main/java/java/nio/ReadWriteIntArrayBuffer.java
    harmony/enhanced/classlib/trunk/modules/nio/src/main/java/java/nio/ReadWriteLongArrayBuffer.java
    harmony/enhanced/classlib/trunk/modules/nio/src/main/java/java/nio/ReadWriteShortArrayBuffer.java
    harmony/enhanced/classlib/trunk/modules/nio/src/main/java/java/nio/ShortArrayBuffer.java
    harmony/enhanced/classlib/trunk/modules/nio/src/main/java/java/nio/ShortBuffer.java
    harmony/enhanced/classlib/trunk/modules/nio/src/main/java/java/nio/ShortToByteBufferAdapter.java

Modified: harmony/enhanced/classlib/trunk/modules/nio/src/main/java/java/nio/BaseByteBuffer.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/nio/src/main/java/java/nio/BaseByteBuffer.java?rev=578091&r1=578090&r2=578091&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/nio/src/main/java/java/nio/BaseByteBuffer.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/nio/src/main/java/java/nio/BaseByteBuffer.java
Fri Sep 21 06:05:59 2007
@@ -16,55 +16,63 @@
 
 package java.nio;
 
-
 /**
  * Serves as the root of other byte buffer impl classes, implements common
  * methods that can be shared by child classes.
- * 
  */
 abstract class BaseByteBuffer extends ByteBuffer {
 
-	protected BaseByteBuffer(int capacity) {
-		super(capacity);
-	}
-
-	public final CharBuffer asCharBuffer() {
-		return CharToByteBufferAdapter.wrap(this);
-	}
-
-	public final DoubleBuffer asDoubleBuffer() {
-		return DoubleToByteBufferAdapter.wrap(this);
-	}
-
-	public final FloatBuffer asFloatBuffer() {
-		return FloatToByteBufferAdapter.wrap(this);
-	}
-
-	public final IntBuffer asIntBuffer() {
-		return IntToByteBufferAdapter.wrap(this);
-	}
-
-	public final LongBuffer asLongBuffer() {
-		return LongToByteBufferAdapter.wrap(this);
-	}
-
-	public final ShortBuffer asShortBuffer() {
-		return ShortToByteBufferAdapter.wrap(this);
-	}
-
-	public final char getChar() {
-		return (char) getShort();
-	}
-
-	public final char getChar(int index) {
-		return (char) getShort(index);
-	}
-
-	public final ByteBuffer putChar(char value) {
-		return putShort((short) value);
-	}
-
-	public final ByteBuffer putChar(int index, char value) {
-		return putShort(index, (short) value);
-	}
+    protected BaseByteBuffer(int capacity) {
+        super(capacity);
+    }
+
+    @Override
+    public final CharBuffer asCharBuffer() {
+        return CharToByteBufferAdapter.wrap(this);
+    }
+
+    @Override
+    public final DoubleBuffer asDoubleBuffer() {
+        return DoubleToByteBufferAdapter.wrap(this);
+    }
+
+    @Override
+    public final FloatBuffer asFloatBuffer() {
+        return FloatToByteBufferAdapter.wrap(this);
+    }
+
+    @Override
+    public final IntBuffer asIntBuffer() {
+        return IntToByteBufferAdapter.wrap(this);
+    }
+
+    @Override
+    public final LongBuffer asLongBuffer() {
+        return LongToByteBufferAdapter.wrap(this);
+    }
+
+    @Override
+    public final ShortBuffer asShortBuffer() {
+        return ShortToByteBufferAdapter.wrap(this);
+    }
+
+    @Override
+    public final char getChar() {
+        return (char) getShort();
+    }
+
+    @Override
+    public final char getChar(int index) {
+        return (char) getShort(index);
+    }
+
+    @Override
+    public final ByteBuffer putChar(char value) {
+        return putShort((short) value);
+    }
+
+    @Override
+    public final ByteBuffer putChar(int index, char value) {
+        return putShort(index, (short) value);
+    }
 }

Modified: harmony/enhanced/classlib/trunk/modules/nio/src/main/java/java/nio/Buffer.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/nio/src/main/java/java/nio/Buffer.java?rev=578091&r1=578090&r2=578091&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/nio/src/main/java/java/nio/Buffer.java (original)
+++ harmony/enhanced/classlib/trunk/modules/nio/src/main/java/java/nio/Buffer.java Fri Sep
21 06:05:59 2007
@@ -16,7 +16,6 @@
 
 package java.nio;
 
-
 /**
  * A buffer is a list of elements of a specific primitive type.
  * <p>
@@ -46,244 +45,244 @@
  * required, then the callers are responsible to take care of the
  * synchronization issues.
  * </p>
- * 
  */
 public abstract class Buffer {
 
-	/**
-	 * <code>UNSET_MARK</code> means the mark has not been set.
-	 */
-	final static int UNSET_MARK = -1;
-
-	/**
-	 * The capacity of this buffer, which never change.
-	 */
-	final int capacity;
-
-	/**
-	 * <code>limit - 1</code> is the last element that can be read or write.
-	 * Limit must be no less than zero and no greater than <code>capacity</code>.
-	 */
-	int limit;
-
-	/**
-	 * Mark is the position will be set when <code>reset()</code> is called.
-	 * Mark is not set by default. Mark is always no less than zero and no
-	 * greater than <code>position</code>.
-	 */
-	int mark = UNSET_MARK;
-
-	/**
-	 * The current position of this buffer. Position is always no less than zero
-	 * and no greater than <code>limit</code>.
-	 */
-	int position = 0;
-
-	/**
-	 * Construct a buffer with the specified capacity.
-	 * 
-	 * @param capacity
-	 *            The capacity of this buffer
-	 */
-	Buffer(int capacity) {
-		super();
-		if (capacity < 0) {
-			throw new IllegalArgumentException();
-		}
-		this.capacity = this.limit = capacity;
-	}
-
-	/**
-	 * Returns the capacity of this buffer.
-	 * 
-	 * @return The number of elements that are contained in this buffer. 
-	 */
-	public final int capacity() {
-		return capacity;
-	}
-
-	/**
-	 * Clears this buffer.
-	 * <p>
-	 * While the content of this buffer is not changed the following internal 
-	 * changes take place : the current position is reset back to the start of the buffer, 
-	 * the value of the buffer limit is made equal to the capacity and mark is unset.    
-	 * </p>
-	 * 
-	 * @return This buffer
-	 */
-	public final Buffer clear() {
-		position = 0;
-		mark = UNSET_MARK;
-		limit = capacity;
-		return this;
-	}
-
-	/**
-	 * Flips this buffer.
-	 * <p>
-	 * The limit is set to the current position, then the position is set to
-	 * zero, and the mark is cleared.
-	 * </p>
-	 * <p>
-	 * The content of this buffer is not changed.
-	 * </p>
-	 * 
-	 * @return This buffer
-	 */
-	public final Buffer flip() {
-		limit = position;
-		position = 0;
-		mark = UNSET_MARK;
-		return this;
-	}
-
-	/**
-	 * Returns true if there are remaining element(s) in this buffer.
-	 * <p>
-	 * Or more precisely, returns <code>position &lt; limit</code>.
-	 * </p>
-	 * 
-	 * @return True if there are remaining element(s) in this buffer.
-	 */
-	public final boolean hasRemaining() {
-		return position < limit;
-	}
-
-	/**
-	 * Returns whether this buffer is readonly or not.
-	 * 
-	 * @return Whether this buffer is readonly or not.
-	 */
-	public abstract boolean isReadOnly();
-
-	/**
-	 * Returns the limit of this buffer.
-	 * 
-	 * @return The limit of this buffer.
-	 */
-	public final int limit() {
-		return limit;
-	}
-
-	/**
-	 * Sets the limit of this buffer.
-	 * <p>
-	 * If the current position in the buffer is in excess of
-	 * <code>newLimit</code> then, on returning from this call, it will have
-	 * been adjusted to be equivalent to <code>newLimit</code>. If the mark
-	 * is set and is greater than the new limit, then it is cleared.
-	 * </p>
-	 * 
-	 * @param newLimit
-	 *            The new limit, must be no less than zero and no greater than
-	 *            capacity
-	 * @return This buffer
-	 * @exception IllegalArgumentException
-	 *                If <code>newLimit</code> is invalid.
-	 */
-	public final Buffer limit(int newLimit) {
-		if (newLimit < 0 || newLimit > capacity) {
-			throw new IllegalArgumentException();
-		}
-
-		limit = newLimit;
-		if (position > newLimit) {
-			position = newLimit;
-		}
-		if ((mark != UNSET_MARK) && (mark > newLimit)) {
-			mark = UNSET_MARK;
-		}
-		return this;
-	}
-
-	/**
-	 * Mark the current position, so that the position may return to this point
-	 * later by calling <code>reset()</code>.
-	 * 
-	 * @return This buffer
-	 */
-	public final Buffer mark() {
-		mark = position;
-		return this;
-	}
-
-	/**
-	 * Returns the position of this buffer.
-	 * 
-	 * @return The value of this buffer's current position.
-	 */
-	public final int position() {
-		return position;
-	}
-
-	/**
-	 * Sets the position of this buffer.
-	 * <p>
-	 * If the mark is set and is greater than the new position, then it is
-	 * cleared.
-	 * </p>
-	 * 
-	 * @param newPosition
-	 *            The new position, must be no less than zero and no greater
-	 *            than limit
-	 * @return This buffer
-	 * @exception IllegalArgumentException
-	 *                If <code>newPosition</code> is invalid
-	 */
-	public final Buffer position(int newPosition) {
-		if (newPosition < 0 || newPosition > limit) {
-			throw new IllegalArgumentException();
-		}
-
-		position = newPosition;
-		if ((mark != UNSET_MARK) && (mark > position)) {
-			mark = UNSET_MARK;
-		}
-		return this;
-	}
-
-	/**
-	 * Returns the number of remaining elements in this buffer.
-	 * <p>
-	 * Or more precisely, returns <code>limit - position</code>.
-	 * </p>
-	 * 
-	 * @return The number of remaining elements in this buffer.
-	 */
-	public final int remaining() {
-		return limit - position;
-	}
-
-	/**
-	 * Reset the position of this buffer to the <code>mark</code>.
-	 * 
-	 * @return This buffer
-	 * @exception InvalidMarkException
-	 *                If the mark is not set
-	 */
-	public final Buffer reset() {
-		if (mark == UNSET_MARK) {
-			throw new InvalidMarkException();
-		}
-		position = mark;
-		return this;
-	}
-
-	/**
-	 * Rewinds this buffer.
-	 * <p>
-	 * The position is set to zero, and the mark is cleared.
-	 * </p>
-	 * <p>
-	 * The content of this buffer is not changed.
-	 * </p>
-	 * 
-	 * @return This buffer
-	 */
-	public final Buffer rewind() {
-		position = 0;
-		mark = UNSET_MARK;
-		return this;
-	}
+    /**
+     * <code>UNSET_MARK</code> means the mark has not been set.
+     */
+    final static int UNSET_MARK = -1;
+
+    /**
+     * The capacity of this buffer, which never change.
+     */
+    final int capacity;
+
+    /**
+     * <code>limit - 1</code> is the last element that can be read or write.
+     * Limit must be no less than zero and no greater than <code>capacity</code>.
+     */
+    int limit;
+
+    /**
+     * Mark is the position will be set when <code>reset()</code> is called.
+     * Mark is not set by default. Mark is always no less than zero and no
+     * greater than <code>position</code>.
+     */
+    int mark = UNSET_MARK;
+
+    /**
+     * The current position of this buffer. Position is always no less than zero
+     * and no greater than <code>limit</code>.
+     */
+    int position = 0;
+
+    /**
+     * Construct a buffer with the specified capacity.
+     * 
+     * @param capacity
+     *            The capacity of this buffer
+     */
+    Buffer(int capacity) {
+        super();
+        if (capacity < 0) {
+            throw new IllegalArgumentException();
+        }
+        this.capacity = this.limit = capacity;
+    }
+
+    /**
+     * Returns the capacity of this buffer.
+     * 
+     * @return The number of elements that are contained in this buffer.
+     */
+    public final int capacity() {
+        return capacity;
+    }
+
+    /**
+     * Clears this buffer.
+     * <p>
+     * While the content of this buffer is not changed the following internal
+     * changes take place : the current position is reset back to the start of
+     * the buffer, the value of the buffer limit is made equal to the capacity
+     * and mark is unset.
+     * </p>
+     * 
+     * @return This buffer
+     */
+    public final Buffer clear() {
+        position = 0;
+        mark = UNSET_MARK;
+        limit = capacity;
+        return this;
+    }
+
+    /**
+     * Flips this buffer.
+     * <p>
+     * The limit is set to the current position, then the position is set to
+     * zero, and the mark is cleared.
+     * </p>
+     * <p>
+     * The content of this buffer is not changed.
+     * </p>
+     * 
+     * @return This buffer
+     */
+    public final Buffer flip() {
+        limit = position;
+        position = 0;
+        mark = UNSET_MARK;
+        return this;
+    }
+
+    /**
+     * Returns true if there are remaining element(s) in this buffer.
+     * <p>
+     * Or more precisely, returns <code>position &lt; limit</code>.
+     * </p>
+     * 
+     * @return True if there are remaining element(s) in this buffer.
+     */
+    public final boolean hasRemaining() {
+        return position < limit;
+    }
+
+    /**
+     * Returns whether this buffer is readonly or not.
+     * 
+     * @return Whether this buffer is readonly or not.
+     */
+    public abstract boolean isReadOnly();
+
+    /**
+     * Returns the limit of this buffer.
+     * 
+     * @return The limit of this buffer.
+     */
+    public final int limit() {
+        return limit;
+    }
+
+    /**
+     * Sets the limit of this buffer.
+     * <p>
+     * If the current position in the buffer is in excess of
+     * <code>newLimit</code> then, on returning from this call, it will have
+     * been adjusted to be equivalent to <code>newLimit</code>. If the mark
+     * is set and is greater than the new limit, then it is cleared.
+     * </p>
+     * 
+     * @param newLimit
+     *            The new limit, must be no less than zero and no greater than
+     *            capacity
+     * @return This buffer
+     * @exception IllegalArgumentException
+     *                If <code>newLimit</code> is invalid.
+     */
+    public final Buffer limit(int newLimit) {
+        if (newLimit < 0 || newLimit > capacity) {
+            throw new IllegalArgumentException();
+        }
+
+        limit = newLimit;
+        if (position > newLimit) {
+            position = newLimit;
+        }
+        if ((mark != UNSET_MARK) && (mark > newLimit)) {
+            mark = UNSET_MARK;
+        }
+        return this;
+    }
+
+    /**
+     * Mark the current position, so that the position may return to this point
+     * later by calling <code>reset()</code>.
+     * 
+     * @return This buffer
+     */
+    public final Buffer mark() {
+        mark = position;
+        return this;
+    }
+
+    /**
+     * Returns the position of this buffer.
+     * 
+     * @return The value of this buffer's current position.
+     */
+    public final int position() {
+        return position;
+    }
+
+    /**
+     * Sets the position of this buffer.
+     * <p>
+     * If the mark is set and is greater than the new position, then it is
+     * cleared.
+     * </p>
+     * 
+     * @param newPosition
+     *            The new position, must be no less than zero and no greater
+     *            than limit
+     * @return This buffer
+     * @exception IllegalArgumentException
+     *                If <code>newPosition</code> is invalid
+     */
+    public final Buffer position(int newPosition) {
+        if (newPosition < 0 || newPosition > limit) {
+            throw new IllegalArgumentException();
+        }
+
+        position = newPosition;
+        if ((mark != UNSET_MARK) && (mark > position)) {
+            mark = UNSET_MARK;
+        }
+        return this;
+    }
+
+    /**
+     * Returns the number of remaining elements in this buffer.
+     * <p>
+     * Or more precisely, returns <code>limit - position</code>.
+     * </p>
+     * 
+     * @return The number of remaining elements in this buffer.
+     */
+    public final int remaining() {
+        return limit - position;
+    }
+
+    /**
+     * Reset the position of this buffer to the <code>mark</code>.
+     * 
+     * @return This buffer
+     * @exception InvalidMarkException
+     *                If the mark is not set
+     */
+    public final Buffer reset() {
+        if (mark == UNSET_MARK) {
+            throw new InvalidMarkException();
+        }
+        position = mark;
+        return this;
+    }
+
+    /**
+     * Rewinds this buffer.
+     * <p>
+     * The position is set to zero, and the mark is cleared.
+     * </p>
+     * <p>
+     * The content of this buffer is not changed.
+     * </p>
+     * 
+     * @return This buffer
+     */
+    public final Buffer rewind() {
+        position = 0;
+        mark = UNSET_MARK;
+        return this;
+    }
 }

Modified: harmony/enhanced/classlib/trunk/modules/nio/src/main/java/java/nio/BufferFactory.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/nio/src/main/java/java/nio/BufferFactory.java?rev=578091&r1=578090&r2=578091&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/nio/src/main/java/java/nio/BufferFactory.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/nio/src/main/java/java/nio/BufferFactory.java
Fri Sep 21 06:05:59 2007
@@ -17,7 +17,6 @@
 
 package java.nio;
 
-
 /**
  * Provide factory service of buffer classes.
  * <p>
@@ -25,184 +24,183 @@
  * this factory is the only entrance to access buffer functions from outside of
  * the impl package.
  * </p>
- * 
  */
 final class BufferFactory {
 
-	/**
-	 * Returns a new byte buffer based on the specified byte array.
-	 * 
-	 * @param array
-	 *            The byte array
-	 * @return A new byte buffer based on the specified byte array.
-	 */
-	public static ByteBuffer newByteBuffer(byte array[]) {
-		return new ReadWriteHeapByteBuffer(array);
-	}
-
-	/**
-	 * Returns a new array based byte buffer with the specified capacity.
-	 * 
-	 * @param capacity
-	 *            The capacity of the new buffer
-	 * @return A new array based byte buffer with the specified capacity.
-	 */
-	public static ByteBuffer newByteBuffer(int capacity) {
-		return new ReadWriteHeapByteBuffer(capacity);
-	}
-
-	/**
-	 * Returns a new char buffer based on the specified char array.
-	 * 
-	 * @param array
-	 *            The char array
-	 * @return A new char buffer based on the specified char array.
-	 */
-	public static CharBuffer newCharBuffer(char array[]) {
-		return new ReadWriteCharArrayBuffer(array);
-	}
-
-	/**
-	 * Returns a new readonly char buffer based on the specified char sequence.
-	 * 
-	 * @param chseq
-	 *            The char sequence
-	 * @return A new readonly char buffer based on the specified char sequence.
-	 */
-	public static CharBuffer newCharBuffer(CharSequence chseq) {
-		return new CharSequenceAdapter(chseq);
-	}
-
-	/**
-	 * Returns a new array based char buffer with the specified capacity.
-	 * 
-	 * @param capacity
-	 *            The capacity of the new buffer
-	 * @return A new array based char buffer with the specified capacity.
-	 */
-	public static CharBuffer newCharBuffer(int capacity) {
-		return new ReadWriteCharArrayBuffer(capacity);
-	}
-
-	/**
-	 * Returns a new direct byte buffer with the specified capacity.
-	 * 
-	 * @param capacity
-	 *            The capacity of the new buffer
-	 * @return A new direct byte buffer with the specified capacity.
-	 */
-	public static ByteBuffer newDirectByteBuffer(int capacity) {
-		return new ReadWriteDirectByteBuffer(capacity);
-	}
-
-	/**
-	 * Returns a new double buffer based on the specified double array.
-	 * 
-	 * @param array
-	 *            The double array
-	 * @return A new double buffer based on the specified double array.
-	 */
-	public static DoubleBuffer newDoubleBuffer(double array[]) {
-		return new ReadWriteDoubleArrayBuffer(array);
-	}
-
-	/**
-	 * Returns a new array based double buffer with the specified capacity.
-	 * 
-	 * @param capacity
-	 *            The capacity of the new buffer
-	 * @return A new array based double buffer with the specified capacity.
-	 */
-	public static DoubleBuffer newDoubleBuffer(int capacity) {
-		return new ReadWriteDoubleArrayBuffer(capacity);
-	}
-
-	/**
-	 * Returns a new float buffer based on the specified float array.
-	 * 
-	 * @param array
-	 *            The float array
-	 * @return A new float buffer based on the specified float array.
-	 */
-	public static FloatBuffer newFloatBuffer(float array[]) {
-		return new ReadWriteFloatArrayBuffer(array);
-	}
-
-	/**
-	 * Returns a new array based float buffer with the specified capacity.
-	 * 
-	 * @param capacity
-	 *            The capacity of the new buffer
-	 * @return A new array based float buffer with the specified capacity.
-	 */
-	public static FloatBuffer newFloatBuffer(int capacity) {
-		return new ReadWriteFloatArrayBuffer(capacity);
-	}
-
-	/**
-	 * Returns a new array based int buffer with the specified capacity.
-	 * 
-	 * @param capacity
-	 *            The capacity of the new buffer
-	 * @return A new array based int buffer with the specified capacity.
-	 */
-	public static IntBuffer newIntBuffer(int capacity) {
-		return new ReadWriteIntArrayBuffer(capacity);
-	}
-
-	/**
-	 * Returns a new int buffer based on the specified int array.
-	 * 
-	 * @param array
-	 *            The int array
-	 * @return A new int buffer based on the specified int array.
-	 */
-	public static IntBuffer newIntBuffer(int array[]) {
-		return new ReadWriteIntArrayBuffer(array);
-	}
-
-	/**
-	 * Returns a new array based long buffer with the specified capacity.
-	 * 
-	 * @param capacity
-	 *            The capacity of the new buffer
-	 * @return A new array based long buffer with the specified capacity.
-	 */
-	public static LongBuffer newLongBuffer(int capacity) {
-		return new ReadWriteLongArrayBuffer(capacity);
-	}
-
-	/**
-	 * Returns a new long buffer based on the specified long array.
-	 * 
-	 * @param array
-	 *            The long array
-	 * @return A new long buffer based on the specified long array.
-	 */
-	public static LongBuffer newLongBuffer(long array[]) {
-		return new ReadWriteLongArrayBuffer(array);
-	}
-
-	/**
-	 * Returns a new array based short buffer with the specified capacity.
-	 * 
-	 * @param capacity
-	 *            The capacity of the new buffer
-	 * @return A new array based short buffer with the specified capacity.
-	 */
-	public static ShortBuffer newShortBuffer(int capacity) {
-		return new ReadWriteShortArrayBuffer(capacity);
-	}
-
-	/**
-	 * Returns a new short buffer based on the specified short array.
-	 * 
-	 * @param array
-	 *            The short array
-	 * @return A new short buffer based on the specified short array.
-	 */
-	public static ShortBuffer newShortBuffer(short array[]) {
-		return new ReadWriteShortArrayBuffer(array);
-	}
+    /**
+     * Returns a new byte buffer based on the specified byte array.
+     * 
+     * @param array
+     *            The byte array
+     * @return A new byte buffer based on the specified byte array.
+     */
+    public static ByteBuffer newByteBuffer(byte array[]) {
+        return new ReadWriteHeapByteBuffer(array);
+    }
+
+    /**
+     * Returns a new array based byte buffer with the specified capacity.
+     * 
+     * @param capacity
+     *            The capacity of the new buffer
+     * @return A new array based byte buffer with the specified capacity.
+     */
+    public static ByteBuffer newByteBuffer(int capacity) {
+        return new ReadWriteHeapByteBuffer(capacity);
+    }
+
+    /**
+     * Returns a new char buffer based on the specified char array.
+     * 
+     * @param array
+     *            The char array
+     * @return A new char buffer based on the specified char array.
+     */
+    public static CharBuffer newCharBuffer(char array[]) {
+        return new ReadWriteCharArrayBuffer(array);
+    }
+
+    /**
+     * Returns a new readonly char buffer based on the specified char sequence.
+     * 
+     * @param chseq
+     *            The char sequence
+     * @return A new readonly char buffer based on the specified char sequence.
+     */
+    public static CharBuffer newCharBuffer(CharSequence chseq) {
+        return new CharSequenceAdapter(chseq);
+    }
+
+    /**
+     * Returns a new array based char buffer with the specified capacity.
+     * 
+     * @param capacity
+     *            The capacity of the new buffer
+     * @return A new array based char buffer with the specified capacity.
+     */
+    public static CharBuffer newCharBuffer(int capacity) {
+        return new ReadWriteCharArrayBuffer(capacity);
+    }
+
+    /**
+     * Returns a new direct byte buffer with the specified capacity.
+     * 
+     * @param capacity
+     *            The capacity of the new buffer
+     * @return A new direct byte buffer with the specified capacity.
+     */
+    public static ByteBuffer newDirectByteBuffer(int capacity) {
+        return new ReadWriteDirectByteBuffer(capacity);
+    }
+
+    /**
+     * Returns a new double buffer based on the specified double array.
+     * 
+     * @param array
+     *            The double array
+     * @return A new double buffer based on the specified double array.
+     */
+    public static DoubleBuffer newDoubleBuffer(double array[]) {
+        return new ReadWriteDoubleArrayBuffer(array);
+    }
+
+    /**
+     * Returns a new array based double buffer with the specified capacity.
+     * 
+     * @param capacity
+     *            The capacity of the new buffer
+     * @return A new array based double buffer with the specified capacity.
+     */
+    public static DoubleBuffer newDoubleBuffer(int capacity) {
+        return new ReadWriteDoubleArrayBuffer(capacity);
+    }
+
+    /**
+     * Returns a new float buffer based on the specified float array.
+     * 
+     * @param array
+     *            The float array
+     * @return A new float buffer based on the specified float array.
+     */
+    public static FloatBuffer newFloatBuffer(float array[]) {
+        return new ReadWriteFloatArrayBuffer(array);
+    }
+
+    /**
+     * Returns a new array based float buffer with the specified capacity.
+     * 
+     * @param capacity
+     *            The capacity of the new buffer
+     * @return A new array based float buffer with the specified capacity.
+     */
+    public static FloatBuffer newFloatBuffer(int capacity) {
+        return new ReadWriteFloatArrayBuffer(capacity);
+    }
+
+    /**
+     * Returns a new array based int buffer with the specified capacity.
+     * 
+     * @param capacity
+     *            The capacity of the new buffer
+     * @return A new array based int buffer with the specified capacity.
+     */
+    public static IntBuffer newIntBuffer(int capacity) {
+        return new ReadWriteIntArrayBuffer(capacity);
+    }
+
+    /**
+     * Returns a new int buffer based on the specified int array.
+     * 
+     * @param array
+     *            The int array
+     * @return A new int buffer based on the specified int array.
+     */
+    public static IntBuffer newIntBuffer(int array[]) {
+        return new ReadWriteIntArrayBuffer(array);
+    }
+
+    /**
+     * Returns a new array based long buffer with the specified capacity.
+     * 
+     * @param capacity
+     *            The capacity of the new buffer
+     * @return A new array based long buffer with the specified capacity.
+     */
+    public static LongBuffer newLongBuffer(int capacity) {
+        return new ReadWriteLongArrayBuffer(capacity);
+    }
+
+    /**
+     * Returns a new long buffer based on the specified long array.
+     * 
+     * @param array
+     *            The long array
+     * @return A new long buffer based on the specified long array.
+     */
+    public static LongBuffer newLongBuffer(long array[]) {
+        return new ReadWriteLongArrayBuffer(array);
+    }
+
+    /**
+     * Returns a new array based short buffer with the specified capacity.
+     * 
+     * @param capacity
+     *            The capacity of the new buffer
+     * @return A new array based short buffer with the specified capacity.
+     */
+    public static ShortBuffer newShortBuffer(int capacity) {
+        return new ReadWriteShortArrayBuffer(capacity);
+    }
+
+    /**
+     * Returns a new short buffer based on the specified short array.
+     * 
+     * @param array
+     *            The short array
+     * @return A new short buffer based on the specified short array.
+     */
+    public static ShortBuffer newShortBuffer(short array[]) {
+        return new ReadWriteShortArrayBuffer(array);
+    }
 
 }

Modified: harmony/enhanced/classlib/trunk/modules/nio/src/main/java/java/nio/BufferOverflowException.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/nio/src/main/java/java/nio/BufferOverflowException.java?rev=578091&r1=578090&r2=578091&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/nio/src/main/java/java/nio/BufferOverflowException.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/nio/src/main/java/java/nio/BufferOverflowException.java
Fri Sep 21 06:05:59 2007
@@ -16,21 +16,19 @@
 
 package java.nio;
 
-
 /**
- * A <code>BufferOverflowException</code> is thrown when you try to write 
- * elements to a buffer, but there is not enough remaining space in the 
- * buffer.
+ * A <code>BufferOverflowException</code> is thrown when you try to write
+ * elements to a buffer, but there is not enough remaining space in the buffer.
  * 
  */
 public class BufferOverflowException extends RuntimeException {
 
-	private static final long serialVersionUID = -5484897634319144535L;
+    private static final long serialVersionUID = -5484897634319144535L;
 
-	/**
-	 * Constructs a <code>BufferOverflowException</code>.
-	 */
-	public BufferOverflowException() {
-		super();
-	}
+    /**
+     * Constructs a <code>BufferOverflowException</code>.
+     */
+    public BufferOverflowException() {
+        super();
+    }
 }

Modified: harmony/enhanced/classlib/trunk/modules/nio/src/main/java/java/nio/BufferUnderflowException.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/nio/src/main/java/java/nio/BufferUnderflowException.java?rev=578091&r1=578090&r2=578091&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/nio/src/main/java/java/nio/BufferUnderflowException.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/nio/src/main/java/java/nio/BufferUnderflowException.java
Fri Sep 21 06:05:59 2007
@@ -16,7 +16,6 @@
 
 package java.nio;
 
-
 /**
  * A <code>BufferUnderflowException</code> is thrown when you try to read
  * elements from a buffer, but there is not enough remaining elements in the
@@ -25,12 +24,12 @@
  */
 public class BufferUnderflowException extends RuntimeException {
 
-	private static final long serialVersionUID = -1713313658691622206L;
+    private static final long serialVersionUID = -1713313658691622206L;
 
-	/**
-	 * Constructs a <code>BufferUnderflowException</code>.
-	 */
-	public BufferUnderflowException() {
-		super();
-	}
+    /**
+     * Constructs a <code>BufferUnderflowException</code>.
+     */
+    public BufferUnderflowException() {
+        super();
+    }
 }



Mime
View raw message