This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
FYI: Patch: java.nio
- From: Michael Koch <konqueror at gmx dot de>
- To: java-patches at gcc dot gnu dot org
- Date: Fri, 9 May 2003 09:57:45 +0200
- Subject: FYI: Patch: java.nio
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi list,
I commited the attached patch to remove unused methods in
gnu.java.nio.
Michael
- --
Homepage: http://www.worldforge.org/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)
iD8DBQE+u196WSOgCCdjSDsRAq6SAJ0VVI4ZZCXGLWX+TxYtHoTlo7RkWgCdFYq2
R4dlJiVGQLyPBEjF8bEuD9E=
=oCk7
-----END PGP SIGNATURE-----
Index: ChangeLog
===================================================================
RCS file: /cvs/gcc/gcc/libjava/ChangeLog,v
retrieving revision 1.1881
diff -u -b -B -r1.1881 ChangeLog
--- ChangeLog 9 May 2003 07:11:11 -0000 1.1881
+++ ChangeLog 9 May 2003 07:54:48 -0000
@@ -1,5 +1,57 @@
2003-05-09 Michael Koch <konqueror@gmx.de>
+ * gnu/java/nio/ByteBufferImpl.java
+ (nio_cast): Removed.
+ (ByteBufferImpl): Removed.
+ (nio_get_Byte): Removed.
+ (nio_put_Byte): Removed.
+ (asByteBuffer): Removed.
+ (asCharBuffer): Removed implementation and throw exception.
+ (asShortBuffer): Likewise.
+ (asIntBuffer): Likewise.
+ (asLongBuffer): Likewise.
+ (asFloatBuffer): Likewise.
+ (asDoubleBuffer): Likewise.
+ * gnu/java/nio/CharBufferImpl.java
+ (CharBufferImpl): Removed.
+ (nio_get_Byte): Removed.
+ (nio_put_Byte): Removed.
+ (asByteBuffer): Removed.
+ * gnu/java/nio/DoubleBufferImpl.java
+ (DoubleBufferImpl): Removed.
+ (nio_get_Byte): Removed.
+ (nio_put_Byte): Removed.
+ (asByteBuffer): Removed.
+ * gnu/java/nio/FloatBufferImpl.java
+ (FloatBufferImpl): Removed.
+ (nio_get_Byte): Removed.
+ (nio_put_Byte): Removed.
+ (asByteBuffer): Removed.
+ * gnu/java/nio/IntBufferImpl.java
+ (IntBufferImpl): Removed.
+ (nio_get_Byte): Removed.
+ (nio_put_Byte): Removed.
+ (asByteBuffer): Removed.
+ * gnu/java/nio/LongBufferImpl.java
+ (LongBufferImpl): Removed.
+ (nio_get_Byte): Removed.
+ (nio_put_Byte): Removed.
+ (asByteBuffer): Removed.
+ * gnu/java/nio/ShortBufferImpl.java
+ (ShortBufferImpl): Removed.
+ (nio_get_Byte): Removed.
+ (nio_put_Byte): Removed.
+ (asByteBuffer): Removed.
+ * gnu/java/nio/natByteBufferImpl.cc
+ (nio_cast): Removed.
+ (nio_get_Byte): Removed.
+ (nio_put_Byte): Removed.
+ * gnu/java/nio/natCharBufferImpl.cc
+ (nio_get_Byte): Removed.
+ (nio_put_Byte): Removed.
+
+2003-05-09 Michael Koch <konqueror@gmx.de>
+
* java/net/JarURLConnection.java
(getJarEntry): Merged documentation from classpath.
(getJarFile): Likewise.
Index: gnu/java/nio/ByteBufferImpl.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/gnu/java/nio/ByteBufferImpl.java,v
retrieving revision 1.5
diff -u -b -B -r1.5 ByteBufferImpl.java
--- gnu/java/nio/ByteBufferImpl.java 11 Mar 2003 10:30:51 -0000 1.5
+++ gnu/java/nio/ByteBufferImpl.java 9 May 2003 07:54:48 -0000
@@ -79,55 +79,13 @@
position (position () + toAdd);
}
- private static native byte[] nio_cast(byte[]copy);
- private static native byte[] nio_cast(char[]copy);
- private static native byte[] nio_cast(short[]copy);
- private static native byte[] nio_cast(long[]copy);
- private static native byte[] nio_cast(int[]copy);
- private static native byte[] nio_cast(float[]copy);
- private static native byte[] nio_cast(double[]copy);
-
- ByteBufferImpl (byte[] copy)
- {
- super (copy.length, copy.length, 0, 0);
- this.backing_buffer = copy != null ? nio_cast (copy) : null;
- readOnly = false;
- }
-
- private static native byte nio_get_Byte (ByteBufferImpl b, int index, int limit);
-
- private static native void nio_put_Byte (ByteBufferImpl b, int index, int limit, byte value);
-
- public ByteBuffer asByteBuffer ()
- {
- ByteBufferImpl res = new ByteBufferImpl (backing_buffer);
- res.limit ((limit () * 1) / 1);
- return res;
- }
-
- ByteBufferImpl (char[] copy)
- {
- super (copy.length * 2, copy.length * 2, 0, 0);
- this.backing_buffer = copy != null ? nio_cast (copy) : null;
- readOnly = false;
- }
-
private static native char nio_get_Char (ByteBufferImpl b, int index, int limit);
private static native void nio_put_Char (ByteBufferImpl b, int index, int limit, char value);
public CharBuffer asCharBuffer ()
{
- CharBufferImpl res = new CharBufferImpl (backing_buffer);
- res.limit ((limit () * 2) / 1);
- return res;
- }
-
- ByteBufferImpl (short[] copy)
- {
- super (copy.length, copy.length, 0, 0);
- this.backing_buffer = copy != null ? nio_cast (copy) : null;
- readOnly = false;
+ throw new Error ("Not implemented");
}
private static native short nio_get_Short (ByteBufferImpl b, int index, int limit);
@@ -136,16 +94,7 @@
public ShortBuffer asShortBuffer ()
{
- ShortBufferImpl res = new ShortBufferImpl (backing_buffer);
- res.limit ((limit () * 2) / 1);
- return res;
- }
-
- ByteBufferImpl (int[] copy)
- {
- super (copy.length * 4, copy.length * 4, 0, 0);
- this.backing_buffer = copy != null ? nio_cast(copy) : null;
- readOnly = false;
+ throw new Error ("Not implemented");
}
private static native int nio_get_Int (ByteBufferImpl b, int index, int limit);
@@ -154,16 +103,7 @@
public IntBuffer asIntBuffer ()
{
- IntBufferImpl res = new IntBufferImpl (backing_buffer);
- res.limit ((limit() * 4) / 1);
- return res;
- }
-
- ByteBufferImpl (long[] copy)
- {
- super (copy.length * 8, copy.length * 8, 0, 0);
- this.backing_buffer = copy != null ? nio_cast (copy) : null;
- readOnly = false;
+ throw new Error ("Not implemented");
}
private static native long nio_get_Long (ByteBufferImpl b, int index, int limit);
@@ -172,16 +112,7 @@
public LongBuffer asLongBuffer ()
{
- LongBufferImpl res = new LongBufferImpl (backing_buffer);
- res.limit ((limit() * 8) / 1);
- return res;
- }
-
- ByteBufferImpl (float[] copy)
- {
- super (copy.length * 4, copy.length * 4, 0, 0);
- this.backing_buffer = copy != null ? nio_cast (copy) : null;
- readOnly = false;
+ throw new Error ("Not implemented");
}
private static native float nio_get_Float (ByteBufferImpl b, int index, int limit);
@@ -190,16 +121,7 @@
public FloatBuffer asFloatBuffer ()
{
- FloatBufferImpl res = new FloatBufferImpl (backing_buffer);
- res.limit ((limit() * 4) / 1);
- return res;
- }
-
- ByteBufferImpl (double[] copy)
- {
- super (copy.length * 8, copy.length * 8, 0, 0);
- this.backing_buffer = copy != null ? nio_cast (copy) : null;
- readOnly = false;
+ throw new Error ("Not implemented");
}
private static native double nio_get_Double (ByteBufferImpl b, int index, int limit);
@@ -208,9 +130,7 @@
public DoubleBuffer asDoubleBuffer ()
{
- DoubleBufferImpl res = new DoubleBufferImpl (backing_buffer);
- res.limit ((limit () * 8) / 1);
- return res;
+ throw new Error ("Not implemented");
}
public boolean isReadOnly()
Index: gnu/java/nio/CharBufferImpl.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/gnu/java/nio/CharBufferImpl.java,v
retrieving revision 1.5
diff -u -b -B -r1.5 CharBufferImpl.java
--- gnu/java/nio/CharBufferImpl.java 11 Mar 2003 10:30:51 -0000 1.5
+++ gnu/java/nio/CharBufferImpl.java 9 May 2003 07:54:48 -0000
@@ -72,25 +72,6 @@
private static native char[] nio_cast (byte[] copy);
- CharBufferImpl (byte[] copy)
- {
- super (copy.length / 2, copy.length / 2, 0, 0);
- this.backing_buffer = (copy != null ? nio_cast (copy) : null);
- readOnly = false;
- }
-
- private static native byte nio_get_Byte (CharBufferImpl b, int index, int limit);
-
- private static native void nio_put_Byte (CharBufferImpl b, int index, int limit, byte value);
-
- public ByteBuffer asByteBuffer ()
- {
- ByteBufferImpl res = new ByteBufferImpl (backing_buffer);
- res.limit ((limit () * 1) / 2);
- return res;
- }
-
-
public boolean isReadOnly()
{
return readOnly;
Index: gnu/java/nio/DoubleBufferImpl.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/gnu/java/nio/DoubleBufferImpl.java,v
retrieving revision 1.4
diff -u -b -B -r1.4 DoubleBufferImpl.java
--- gnu/java/nio/DoubleBufferImpl.java 19 Feb 2003 11:47:49 -0000 1.4
+++ gnu/java/nio/DoubleBufferImpl.java 9 May 2003 07:54:48 -0000
@@ -70,26 +70,6 @@
readOnly = copy.isReadOnly ();
}
- DoubleBufferImpl (byte[] copy)
- {
- super (copy.length, copy.length, 0, 0);
- this.backing_buffer = copy != null ? nio_cast (copy) : null;
- readOnly = false;
- }
-
- private static native byte nio_get_Byte (DoubleBufferImpl b, int index, int limit);
-
- private static native void nio_put_Byte (DoubleBufferImpl b, int index, int limit, byte value);
-
- public ByteBuffer asByteBuffer ()
- {
- ByteBufferImpl res = new ByteBufferImpl (backing_buffer);
- res.limit ((limit () * 1) / 8);
- return res;
- }
-
- private static native double[] nio_cast (byte[] copy);
-
public boolean isReadOnly ()
{
return readOnly;
Index: gnu/java/nio/FloatBufferImpl.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/gnu/java/nio/FloatBufferImpl.java,v
retrieving revision 1.4
diff -u -b -B -r1.4 FloatBufferImpl.java
--- gnu/java/nio/FloatBufferImpl.java 19 Feb 2003 11:47:49 -0000 1.4
+++ gnu/java/nio/FloatBufferImpl.java 9 May 2003 07:54:48 -0000
@@ -70,26 +70,6 @@
readOnly = copy.isReadOnly ();
}
- private static native float[] nio_cast (byte[] copy);
-
- FloatBufferImpl (byte[] copy)
- {
- super (copy.length, copy.length, 0, 0);
- this.backing_buffer = copy != null ? nio_cast (copy) : null;
- readOnly = false;
- }
-
- private static native byte nio_get_Byte (FloatBufferImpl b, int index, int limit);
-
- private static native void nio_put_Byte (FloatBufferImpl b, int index, int limit, byte value);
-
- public ByteBuffer asByteBuffer()
- {
- ByteBufferImpl res = new ByteBufferImpl (backing_buffer);
- res.limit ((limit () * 1) / 4);
- return res;
- }
-
public boolean isReadOnly ()
{
return readOnly;
Index: gnu/java/nio/IntBufferImpl.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/gnu/java/nio/IntBufferImpl.java,v
retrieving revision 1.4
diff -u -b -B -r1.4 IntBufferImpl.java
--- gnu/java/nio/IntBufferImpl.java 19 Feb 2003 11:47:49 -0000 1.4
+++ gnu/java/nio/IntBufferImpl.java 9 May 2003 07:54:48 -0000
@@ -70,26 +70,6 @@
readOnly = copy.isReadOnly ();
}
- private static native int[] nio_cast (byte[] copy);
-
- IntBufferImpl (byte[] copy)
- {
- super (copy.length, copy.length, 0, 0);
- this.backing_buffer = copy != null ? nio_cast (copy) : null;
- readOnly = false;
- }
-
- private static native byte nio_get_Byte (IntBufferImpl b, int index, int limit);
-
- private static native void nio_put_Byte (IntBufferImpl b, int index, int limit, byte value);
-
- public ByteBuffer asByteBuffer ()
- {
- ByteBufferImpl res = new ByteBufferImpl (backing_buffer);
- res.limit ((limit () * 1) / 4);
- return res;
- }
-
public boolean isReadOnly()
{
return readOnly;
Index: gnu/java/nio/LongBufferImpl.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/gnu/java/nio/LongBufferImpl.java,v
retrieving revision 1.4
diff -u -b -B -r1.4 LongBufferImpl.java
--- gnu/java/nio/LongBufferImpl.java 19 Feb 2003 11:47:49 -0000 1.4
+++ gnu/java/nio/LongBufferImpl.java 9 May 2003 07:54:48 -0000
@@ -70,26 +70,6 @@
readOnly = copy.isReadOnly ();
}
- private static native long[] nio_cast (byte[] copy);
-
- LongBufferImpl (byte[] copy)
- {
- super (copy.length, copy.length, 0, 0);
- this.backing_buffer = copy != null ? nio_cast (copy) : null;
- readOnly = false;
- }
-
- private static native byte nio_get_Byte (LongBufferImpl b, int index, int limit);
-
- private static native void nio_put_Byte (LongBufferImpl b, int index, int limit, byte value);
-
- public ByteBuffer asByteBuffer ()
- {
- ByteBufferImpl res = new ByteBufferImpl (backing_buffer);
- res.limit ((limit () * 1) / 8);
- return res;
- }
-
public boolean isReadOnly()
{
return readOnly;
Index: gnu/java/nio/ShortBufferImpl.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/gnu/java/nio/ShortBufferImpl.java,v
retrieving revision 1.4
diff -u -b -B -r1.4 ShortBufferImpl.java
--- gnu/java/nio/ShortBufferImpl.java 19 Feb 2003 11:47:49 -0000 1.4
+++ gnu/java/nio/ShortBufferImpl.java 9 May 2003 07:54:48 -0000
@@ -70,26 +70,6 @@
readOnly = copy.isReadOnly ();
}
- private static native short[] nio_cast (byte[] copy);
-
- ShortBufferImpl (byte[] copy)
- {
- super (copy.length, copy.length, 0, 0);
- this.backing_buffer = copy != null ? nio_cast (copy) : null;
- readOnly = false;
- }
-
- private static native byte nio_get_Byte (ShortBufferImpl b, int index, int limit);
-
- private static native void nio_put_Byte (ShortBufferImpl b, int index, int limit, byte value);
-
- public ByteBuffer asByteBuffer ()
- {
- ByteBufferImpl res = new ByteBufferImpl (backing_buffer);
- res.limit ((limit () * 1) / 2);
- return res;
- }
-
public boolean isReadOnly()
{
return readOnly;
Index: gnu/java/nio/natByteBufferImpl.cc
===================================================================
RCS file: /cvs/gcc/gcc/libjava/gnu/java/nio/natByteBufferImpl.cc,v
retrieving revision 1.2
diff -u -b -B -r1.2 natByteBufferImpl.cc
--- gnu/java/nio/natByteBufferImpl.cc 13 Feb 2003 08:40:35 -0000 1.2
+++ gnu/java/nio/natByteBufferImpl.cc 9 May 2003 07:54:48 -0000
@@ -15,53 +15,6 @@
#include <gnu/java/nio/ByteBufferImpl.h>
-JArray<jbyte>*
-gnu::java::nio::ByteBufferImpl::nio_cast(JArray<jbyte>*)
-{
- return NULL;
-}
-
-JArray<jbyte>*
-gnu::java::nio::ByteBufferImpl::nio_cast(JArray<jshort>*)
-{
- return NULL;
-}
-
-JArray<jbyte>*
-gnu::java::nio::ByteBufferImpl::nio_cast(JArray<jint>*)
-{
- return NULL;
-}
-
-JArray<jbyte>*
-gnu::java::nio::ByteBufferImpl::nio_cast(JArray<jlong>*)
-{
- return NULL;
-}
-
-JArray<jbyte>*
-gnu::java::nio::ByteBufferImpl::nio_cast(JArray<jchar>*)
-{
- return NULL;
-}
-
-JArray<jbyte>*
-gnu::java::nio::ByteBufferImpl::nio_cast(JArray<jfloat>*)
-{
- return NULL;
-}
-
-JArray<jbyte>*
-gnu::java::nio::ByteBufferImpl::nio_cast(JArray<jdouble>*)
-{
- return NULL;
-}
-
-void
-gnu::java::nio::ByteBufferImpl::nio_put_Byte(gnu::java::nio::ByteBufferImpl*, jint, jint, jbyte)
-{
-}
-
void
gnu::java::nio::ByteBufferImpl::nio_put_Char(gnu::java::nio::ByteBufferImpl*, jint, jint, jchar)
{
@@ -90,12 +43,6 @@
void
gnu::java::nio::ByteBufferImpl::nio_put_Double(gnu::java::nio::ByteBufferImpl*, jint, jint, jdouble)
{
-}
-
-jbyte
-gnu::java::nio::ByteBufferImpl::nio_get_Byte(gnu::java::nio::ByteBufferImpl*, jint, jint)
-{
- return 0;
}
jchar
Index: gnu/java/nio/natCharBufferImpl.cc
===================================================================
RCS file: /cvs/gcc/gcc/libjava/gnu/java/nio/natCharBufferImpl.cc,v
retrieving revision 1.3
diff -u -b -B -r1.3 natCharBufferImpl.cc
--- gnu/java/nio/natCharBufferImpl.cc 13 Feb 2003 08:40:35 -0000 1.3
+++ gnu/java/nio/natCharBufferImpl.cc 9 May 2003 07:54:48 -0000
@@ -20,14 +20,3 @@
{
return NULL;
}
-
-void
-gnu::java::nio::CharBufferImpl::nio_put_Byte(gnu::java::nio::CharBufferImpl*, jint, jint, jbyte)
-{
-}
-
-jbyte
-gnu::java::nio::CharBufferImpl::nio_get_Byte(gnu::java::nio::CharBufferImpl*, jint, jint)
-{
- return 0;
-}