You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by te...@apache.org on 2007/09/22 23:25:00 UTC
svn commit: r578502 [2/10] - in /harmony/enhanced/classlib/branches/java6:
depends/files/ depends/jars/ depends/manifests/xerces_2.9.0/
depends/manifests/xerces_2.9.1/ depends/manifests/xerces_2.9.1/META-INF/
make/ modules/archive/src/main/native/archi...
Modified: harmony/enhanced/classlib/branches/java6/modules/nio/src/main/java/java/nio/BufferFactory.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/nio/src/main/java/java/nio/BufferFactory.java?rev=578502&r1=578501&r2=578502&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/nio/src/main/java/java/nio/BufferFactory.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/nio/src/main/java/java/nio/BufferFactory.java Sat Sep 22 14:24:54 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/branches/java6/modules/nio/src/main/java/java/nio/BufferOverflowException.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/nio/src/main/java/java/nio/BufferOverflowException.java?rev=578502&r1=578501&r2=578502&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/nio/src/main/java/java/nio/BufferOverflowException.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/nio/src/main/java/java/nio/BufferOverflowException.java Sat Sep 22 14:24:54 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/branches/java6/modules/nio/src/main/java/java/nio/BufferUnderflowException.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/nio/src/main/java/java/nio/BufferUnderflowException.java?rev=578502&r1=578501&r2=578502&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/nio/src/main/java/java/nio/BufferUnderflowException.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/nio/src/main/java/java/nio/BufferUnderflowException.java Sat Sep 22 14:24:54 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();
+ }
}