diff options
author | dnovillo <dnovillo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-05-13 02:18:51 +0000 |
---|---|---|
committer | dnovillo <dnovillo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-05-13 02:18:51 +0000 |
commit | dc496b3088e7afe723b5eac5ca876aaa7aef9e92 (patch) | |
tree | 84db540e9506cd306c69b1fbc1b56e67fcd9d6e6 /libjava | |
parent | 7129a9507606aec4a82c4f7c035b4dc061724414 (diff) |
Mainline merge as of 2003-05-11
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/tree-ssa-20020619-branch@66748 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libjava')
85 files changed, 2099 insertions, 689 deletions
diff --git a/libjava/ChangeLog b/libjava/ChangeLog index 7a62c156e79..fc89fb9d29f 100644 --- a/libjava/ChangeLog +++ b/libjava/ChangeLog @@ -1,3 +1,264 @@ +2003-05-10 Michael Koch <konqueror@gmx.de> + + * javax/swing/plaf/ButtonUI.java, + javax/swing/plaf/ColorUIResource.java, + javax/swing/plaf/ComponentUI.java, + javax/swing/plaf/DimensionUIResource.java, + javax/swing/plaf/FontUIResource.java, + javax/swing/plaf/IconUIResource.java, + javax/swing/plaf/InsetsUIResource.java, + javax/swing/plaf/LabelUI.java, + javax/swing/plaf/ListUI.java, + javax/swing/plaf/OptionPaneUI.java, + javax/swing/plaf/PanelUI.java, + javax/swing/plaf/TabbedPaneUI.java, + javax/swing/plaf/TextUI.java, + javax/swing/plaf/TreeUI.java, + javax/swing/plaf/ViewportUI.java, + javax/swing/plaf/basic/BasicBorders.java, + javax/swing/plaf/basic/BasicButtonUI.java, + javax/swing/plaf/basic/BasicCheckBoxUI.java, + javax/swing/plaf/basic/BasicDefaults.java, + javax/swing/plaf/basic/BasicGraphicsUtils.java, + javax/swing/plaf/basic/BasicIconFactory.java, + javax/swing/plaf/basic/BasicLabelUI.java, + javax/swing/plaf/basic/BasicListUI.java, + javax/swing/plaf/basic/BasicOptionPaneUI.java, + javax/swing/plaf/basic/BasicPanelUI.java, + javax/swing/plaf/basic/BasicRadioButtonUI.java, + javax/swing/plaf/basic/BasicScrollPaneUI.java, + javax/swing/plaf/basic/BasicTabbedPaneUI.java, + javax/swing/plaf/basic/BasicTextUI.java, + javax/swing/plaf/basic/BasicToggleButtonUI.java, + javax/swing/plaf/basic/BasicTreeUI.java, + javax/swing/plaf/basic/BasicViewportUI.java, + javax/swing/plaf/metal/MetalLookAndFeel.java: + New versions from classpath. This adds copyrights to all files and + some serialVersionUIDs. + +2003-05-10 Michael Koch <konqueror@gmx.de> + + * java/nio/CharBuffer.java + (offset): Make it package-private. + (backing_buffer): Likewise. + * java/nio/DoubleBuffer.java + (offset): Make it package-private. + (backing_buffer): Likewise. + (put): Reformatted. + * java/nio/FloatBuffer.java + (offset): Make it package-private. + (backing_buffer): Likewise. + * java/nio/IntBuffer.java + (offset): Make it package-private. + (backing_buffer): Likewise. + * java/nio/LongBuffer.java + (offset): Make it package-private. + (backing_buffer): Likewise. + * java/nio/ShortBuffer.java + (offset): Make it package-private. + (backing_buffer): Likewise. + +2003-05-10 Michael Koch <konqueror@gmx.de> + + * java/nio/CharBuffer.java + (put): Fixed precondtion check. + (toString): Make it work without backing array. + (put): Skip one level of method calling. + +2003-05-10 Michael Koch <konqueror@gmx.de> + + * java/security/Identity.java, + java/security/IdentityScope.java, + java/security/Key.java, + java/security/KeyPair.java, + java/security/PrivateKey.java, + java/security/Provider.java, + java/security/PublicKey.java, + java/security/SecureRandom.java, + java/security/SecureRandomSpi.java, + java/security/SignedObject.java, + java/security/Signer.java, + java/security/cert/Certificate.java, + java/security/cert/PKIXCertPathBuilderResult.java, + java/security/cert/X509Certificate.java: + New versions from classpath. + +2003-05-09 Tom Tromey <tromey@redhat.com> + + * Makefile.in: Rebuilt. + * Makefile.am (nat_source_files): Removed old files. + * gnu/java/nio/natDoubleBufferImpl.cc: Removed. + * gnu/java/nio/natFloatBufferImpl.cc: Removed. + * gnu/java/nio/natIntBufferImpl.cc: Removed. + * gnu/java/nio/natLongBufferImpl.cc: Removed. + * gnu/java/nio/natShortBufferImpl.cc: Removed. + +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. + (getMainAttributes): Likewise. + (getAttributes): Likewise. + (getManifest): Likewise. + (getCertificates): Reformatted. + * java/net/URLConnection.java: + Little classpath merge. + +2003-05-09 Michael Koch <konqueror@gmx.de> + + * java/io/DataOutputStream.java + (writeShort): Made it synchronized. + (writeChar): Likewise. + (writeInt): Likewise. + (writeLong): Liekwise. + (writeUTF): Made it synchronized, renamed argument to match classpath. + * java/io/InputStreamReader.java + (converter): Added documentation. + (read): Merged documentation from classpath. + * java/io/OutputStreamWriter.java + (OutputStreamWriter): Merged documentation from classpath. + (close): Reformatted. + (getEncoding): Likewise. + (flush): Likewise. + (write): Merged documentation from classpath, reformatted. + +2003-05-08 Tom Tromey <tromey@redhat.com> + + * configure.host <powerpc64*-*>: Set with_libffi_default and + libgcj_interpreter to "yes". + +2003-05-08 Scott Gilbertson <scottg@mantatest.com> + + * gnu/gcj/xlib/natGC.cc (drawString): Removed obsolete code. + +2003-05-06 Tom Tromey <tromey@redhat.com> + + * verify.cc: Reverted previous patch. + +2003-05-06 Michael Koch <konqueror@gmx.de> + + * java/io/DataOutputStream.java + (write): Renamed argument to "value", merged documentation from + classpath. + (writeBoolean): Likewise. + (writeByte): Likewise. + (writeShort): Likewise. + (writeChar): Likewise. + (writeInt): Likewise. + (writeLong): Likewise. + (writeFloat): Likewise. + (writeDouble): Likewise. + (writeBytes): Likewise. + (writeChars): Likewise. + (writeUTF): Likewise. + * java/io/File.java + (performDelete): Added documentation. + (performList): Likewise. + (performMkdir): Likewise. + (performSetReadOnly): Likewise. + (performRenameTo): Likewise. + (performSetLastModified): Likewise. + (delete): Made it sychronized. + (renameTo): Made it sychronized. + (equals): Reformatted. + (isHidden): Likewise. + (listFiles): Likewise. + (setReadOnly): Likewise. + (listRoots): Likewise. + (setLastModified): Likewise. + (checkRead): Likewise. + (checkWrite): Likewise. + * java/io/FileInputStream.java + (skip): Made it sychronized, merged from classpath. + * java/io/FileOutputStream.java + (write): Merged from classpath. + * java/io/InputStreamReader.java: + (InputStreamReader): Merged documentation from classpath. + +2003-05-05 Michael Koch <konqueror@gmx.de> + + * java/net/NetworkInterface.java + (networkInterfaces): Removed. + (getByName): Use getRealNetworkInterfaces() instead of + networkInterfaces. + (getByInetAddress): Likewise. + (getNetworkInterfaces): Likewise. + (toString): Fix output of addresses of an interface. + +2003-05-05 Michael Koch <konqueror@gmx.de> + + * java/io/DataInputStream.java: + Merged new documentation from classpath. + +2003-05-03 Matt Kraai <kraai@alumni.cmu.edu> + + * gnu/awt/gtk/GtkButtonPeer.java: Fix misspelling of + "version". + * gnu/awt/gtk/GtkComponentPeer.java: Likewise. + * gnu/awt/gtk/GtkContainerPeer.java: Likewise. + * gnu/awt/gtk/GtkFramePeer.java: Likewise. + * gnu/awt/gtk/GtkLabelPeer.java: Likewise. + * gnu/awt/gtk/GtkMainThread.java: Likewise. + * gnu/awt/gtk/GtkToolkit.java: Likewise. + * gnu/awt/gtk/GtkWindowPeer.java: Likewise. + * java/security/Key.java: Likewise. + * java/security/PrivateKey.java: Likewise. + * java/security/Provider.java: Likewise. + * java/security/PublicKey.java: Likewise. + 2003-05-02 Michael Koch <konqueror@gmx.de> * java/net/URI.java diff --git a/libjava/Makefile.am b/libjava/Makefile.am index 9d0b8a527db..71858819c54 100644 --- a/libjava/Makefile.am +++ b/libjava/Makefile.am @@ -2557,14 +2557,9 @@ gnu/gcj/runtime/natStringBuffer.cc \ gnu/gcj/runtime/natVMClassLoader.cc \ gnu/java/nio/natByteBufferImpl.cc \ gnu/java/nio/natCharBufferImpl.cc \ -gnu/java/nio/natDoubleBufferImpl.cc \ gnu/java/nio/natFileChannelImpl.cc \ -gnu/java/nio/natFloatBufferImpl.cc \ -gnu/java/nio/natIntBufferImpl.cc \ -gnu/java/nio/natLongBufferImpl.cc \ gnu/java/nio/natMappedByteFileBuffer.cc \ gnu/java/nio/natSelectorImpl.cc \ -gnu/java/nio/natShortBufferImpl.cc \ gnu/java/nio/natSocketChannelImpl.cc \ java/io/natFile.cc \ java/io/natFileDescriptor.cc \ diff --git a/libjava/Makefile.in b/libjava/Makefile.in index 8b91e15e44f..cbe0cc02d47 100644 --- a/libjava/Makefile.in +++ b/libjava/Makefile.in @@ -2318,14 +2318,9 @@ gnu/gcj/runtime/natStringBuffer.cc \ gnu/gcj/runtime/natVMClassLoader.cc \ gnu/java/nio/natByteBufferImpl.cc \ gnu/java/nio/natCharBufferImpl.cc \ -gnu/java/nio/natDoubleBufferImpl.cc \ gnu/java/nio/natFileChannelImpl.cc \ -gnu/java/nio/natFloatBufferImpl.cc \ -gnu/java/nio/natIntBufferImpl.cc \ -gnu/java/nio/natLongBufferImpl.cc \ gnu/java/nio/natMappedByteFileBuffer.cc \ gnu/java/nio/natSelectorImpl.cc \ -gnu/java/nio/natShortBufferImpl.cc \ gnu/java/nio/natSocketChannelImpl.cc \ java/io/natFile.cc \ java/io/natFileDescriptor.cc \ @@ -2498,17 +2493,15 @@ gnu/gcj/runtime/natFinalizerThread.lo gnu/gcj/runtime/natFirstThread.lo \ gnu/gcj/runtime/natNameFinder.lo gnu/gcj/runtime/natSharedLibLoader.lo \ gnu/gcj/runtime/natStackTrace.lo gnu/gcj/runtime/natStringBuffer.lo \ gnu/gcj/runtime/natVMClassLoader.lo gnu/java/nio/natByteBufferImpl.lo \ -gnu/java/nio/natCharBufferImpl.lo gnu/java/nio/natDoubleBufferImpl.lo \ -gnu/java/nio/natFileChannelImpl.lo gnu/java/nio/natFloatBufferImpl.lo \ -gnu/java/nio/natIntBufferImpl.lo gnu/java/nio/natLongBufferImpl.lo \ +gnu/java/nio/natCharBufferImpl.lo gnu/java/nio/natFileChannelImpl.lo \ gnu/java/nio/natMappedByteFileBuffer.lo gnu/java/nio/natSelectorImpl.lo \ -gnu/java/nio/natShortBufferImpl.lo gnu/java/nio/natSocketChannelImpl.lo \ -java/io/natFile.lo java/io/natFileDescriptor.lo \ -java/io/natObjectInputStream.lo java/io/natVMObjectStreamClass.lo \ -java/lang/natCharacter.lo java/lang/natClass.lo \ -java/lang/natClassLoader.lo java/lang/natConcreteProcess.lo \ -java/lang/natDouble.lo java/lang/natFloat.lo java/lang/natMath.lo \ -java/lang/natObject.lo java/lang/natRuntime.lo java/lang/natString.lo \ +gnu/java/nio/natSocketChannelImpl.lo java/io/natFile.lo \ +java/io/natFileDescriptor.lo java/io/natObjectInputStream.lo \ +java/io/natVMObjectStreamClass.lo java/lang/natCharacter.lo \ +java/lang/natClass.lo java/lang/natClassLoader.lo \ +java/lang/natConcreteProcess.lo java/lang/natDouble.lo \ +java/lang/natFloat.lo java/lang/natMath.lo java/lang/natObject.lo \ +java/lang/natRuntime.lo java/lang/natString.lo \ java/lang/natStringBuffer.lo java/lang/natSystem.lo \ java/lang/natThread.lo java/lang/natVMSecurityManager.lo \ java/lang/ref/natReference.lo java/lang/reflect/natArray.lo \ @@ -2987,14 +2980,9 @@ DEP_FILES = .deps/$(srcdir)/$(CONVERT_DIR)/gen-from-JIS.P \ .deps/gnu/java/nio/charset/UTF_8.P \ .deps/gnu/java/nio/natByteBufferImpl.P \ .deps/gnu/java/nio/natCharBufferImpl.P \ -.deps/gnu/java/nio/natDoubleBufferImpl.P \ .deps/gnu/java/nio/natFileChannelImpl.P \ -.deps/gnu/java/nio/natFloatBufferImpl.P \ -.deps/gnu/java/nio/natIntBufferImpl.P \ -.deps/gnu/java/nio/natLongBufferImpl.P \ .deps/gnu/java/nio/natMappedByteFileBuffer.P \ .deps/gnu/java/nio/natSelectorImpl.P \ -.deps/gnu/java/nio/natShortBufferImpl.P \ .deps/gnu/java/nio/natSocketChannelImpl.P \ .deps/gnu/java/rmi/RMIMarshalledObjectInputStream.P \ .deps/gnu/java/rmi/RMIMarshalledObjectOutputStream.P \ diff --git a/libjava/configure.host b/libjava/configure.host index f1c65bcc50e..1e2183184e4 100644 --- a/libjava/configure.host +++ b/libjava/configure.host @@ -114,8 +114,8 @@ case "${host}" in ;; powerpc64*-*) # libffi not ported. - with_libffi_default=no - libgcj_interpreter=no + with_libffi_default=yes + libgcj_interpreter=yes libgcj_flags="${libgcj_flags} -mminimal-toc" # this may not be correct sysdeps_dir=powerpc diff --git a/libjava/gnu/gcj/xlib/natGC.cc b/libjava/gnu/gcj/xlib/natGC.cc index 16b0bc50199..71f83f5dcce 100644 --- a/libjava/gnu/gcj/xlib/natGC.cc +++ b/libjava/gnu/gcj/xlib/natGC.cc @@ -115,14 +115,6 @@ void gnu::gcj::xlib::GC::drawString(jstring text, jint x, jint y) xc->byte2 = jc & 0xff; } XDrawString16(dpy, drawableXID, gc, x, y, xwchars, length); - - // FIXME, temporary code: - int len = JvGetStringUTFLength(text); - char ctxt[len+1]; - JvGetStringUTFRegion(text, 0, text->length(), ctxt); - ctxt[len] = '\0'; - XDrawString(dpy, drawableXID, gc, x, y, ctxt, len); - // no fast fail } void gnu::gcj::xlib::GC::drawLine(jint x1, jint y1, jint x2, jint y2) diff --git a/libjava/gnu/java/nio/ByteBufferImpl.java b/libjava/gnu/java/nio/ByteBufferImpl.java index 342f3316a70..ede16aa2e25 100644 --- a/libjava/gnu/java/nio/ByteBufferImpl.java +++ b/libjava/gnu/java/nio/ByteBufferImpl.java @@ -79,138 +79,58 @@ public final class ByteBufferImpl extends ByteBuffer 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; + throw new Error ("Not implemented"); } - ByteBufferImpl (short[] copy) - { - super (copy.length, copy.length, 0, 0); - this.backing_buffer = copy != null ? nio_cast (copy) : null; - readOnly = false; - } - private static native short nio_get_Short (ByteBufferImpl b, int index, int limit); private static native void nio_put_Short (ByteBufferImpl b, int index, int limit, short value); public ShortBuffer asShortBuffer () { - ShortBufferImpl res = new ShortBufferImpl (backing_buffer); - res.limit ((limit () * 2) / 1); - return res; + throw new Error ("Not implemented"); } - ByteBufferImpl (int[] copy) - { - super (copy.length * 4, copy.length * 4, 0, 0); - this.backing_buffer = copy != null ? nio_cast(copy) : null; - readOnly = false; - } - private static native int nio_get_Int (ByteBufferImpl b, int index, int limit); private static native void nio_put_Int (ByteBufferImpl b, int index, int limit, int value); public IntBuffer asIntBuffer () { - IntBufferImpl res = new IntBufferImpl (backing_buffer); - res.limit ((limit() * 4) / 1); - return res; + throw new Error ("Not implemented"); } - ByteBufferImpl (long[] copy) - { - super (copy.length * 8, copy.length * 8, 0, 0); - this.backing_buffer = copy != null ? nio_cast (copy) : null; - readOnly = false; - } - private static native long nio_get_Long (ByteBufferImpl b, int index, int limit); private static native void nio_put_Long (ByteBufferImpl b, int index, int limit, long value); public LongBuffer asLongBuffer () { - LongBufferImpl res = new LongBufferImpl (backing_buffer); - res.limit ((limit() * 8) / 1); - return res; + throw new Error ("Not implemented"); } - ByteBufferImpl (float[] copy) - { - super (copy.length * 4, copy.length * 4, 0, 0); - this.backing_buffer = copy != null ? nio_cast (copy) : null; - readOnly = false; - } - private static native float nio_get_Float (ByteBufferImpl b, int index, int limit); private static native void nio_put_Float (ByteBufferImpl b, int index, int limit, float value); public FloatBuffer asFloatBuffer () { - FloatBufferImpl res = new FloatBufferImpl (backing_buffer); - res.limit ((limit() * 4) / 1); - return res; + throw new Error ("Not implemented"); } - ByteBufferImpl (double[] copy) - { - super (copy.length * 8, copy.length * 8, 0, 0); - this.backing_buffer = copy != null ? nio_cast (copy) : null; - readOnly = false; - } - private static native double nio_get_Double (ByteBufferImpl b, int index, int limit); private static native void nio_put_Double (ByteBufferImpl b, int index, int limit, double value); public DoubleBuffer asDoubleBuffer () { - DoubleBufferImpl res = new DoubleBufferImpl (backing_buffer); - res.limit ((limit () * 8) / 1); - return res; + throw new Error ("Not implemented"); } public boolean isReadOnly() diff --git a/libjava/gnu/java/nio/CharBufferImpl.java b/libjava/gnu/java/nio/CharBufferImpl.java index f35ae4b09ff..ca769742cca 100644 --- a/libjava/gnu/java/nio/CharBufferImpl.java +++ b/libjava/gnu/java/nio/CharBufferImpl.java @@ -72,25 +72,6 @@ public final class CharBufferImpl extends CharBuffer 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; diff --git a/libjava/gnu/java/nio/DoubleBufferImpl.java b/libjava/gnu/java/nio/DoubleBufferImpl.java index f4dffc2d8f4..7d4f69311d0 100644 --- a/libjava/gnu/java/nio/DoubleBufferImpl.java +++ b/libjava/gnu/java/nio/DoubleBufferImpl.java @@ -70,26 +70,6 @@ public final class DoubleBufferImpl extends DoubleBuffer 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; diff --git a/libjava/gnu/java/nio/FloatBufferImpl.java b/libjava/gnu/java/nio/FloatBufferImpl.java index 6c77103bb2f..4acde80b747 100644 --- a/libjava/gnu/java/nio/FloatBufferImpl.java +++ b/libjava/gnu/java/nio/FloatBufferImpl.java @@ -70,26 +70,6 @@ public final class FloatBufferImpl extends FloatBuffer 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; diff --git a/libjava/gnu/java/nio/IntBufferImpl.java b/libjava/gnu/java/nio/IntBufferImpl.java index d9f80636aa6..cfa3efe597a 100644 --- a/libjava/gnu/java/nio/IntBufferImpl.java +++ b/libjava/gnu/java/nio/IntBufferImpl.java @@ -70,26 +70,6 @@ public final class IntBufferImpl extends IntBuffer 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; diff --git a/libjava/gnu/java/nio/LongBufferImpl.java b/libjava/gnu/java/nio/LongBufferImpl.java index e17f4870b09..8a295fa5a35 100644 --- a/libjava/gnu/java/nio/LongBufferImpl.java +++ b/libjava/gnu/java/nio/LongBufferImpl.java @@ -70,26 +70,6 @@ public final class LongBufferImpl extends LongBuffer 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; diff --git a/libjava/gnu/java/nio/ShortBufferImpl.java b/libjava/gnu/java/nio/ShortBufferImpl.java index e4c9a060539..c4f679b7ce8 100644 --- a/libjava/gnu/java/nio/ShortBufferImpl.java +++ b/libjava/gnu/java/nio/ShortBufferImpl.java @@ -70,26 +70,6 @@ public final class ShortBufferImpl extends ShortBuffer 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; diff --git a/libjava/gnu/java/nio/natByteBufferImpl.cc b/libjava/gnu/java/nio/natByteBufferImpl.cc index 2bb1e41a622..c6ba45669ff 100644 --- a/libjava/gnu/java/nio/natByteBufferImpl.cc +++ b/libjava/gnu/java/nio/natByteBufferImpl.cc @@ -15,53 +15,6 @@ details. */ #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) { @@ -92,12 +45,6 @@ gnu::java::nio::ByteBufferImpl::nio_put_Double(gnu::java::nio::ByteBufferImpl*, { } -jbyte -gnu::java::nio::ByteBufferImpl::nio_get_Byte(gnu::java::nio::ByteBufferImpl*, jint, jint) -{ - return 0; -} - jchar gnu::java::nio::ByteBufferImpl::nio_get_Char(gnu::java::nio::ByteBufferImpl*, jint, jint) { diff --git a/libjava/gnu/java/nio/natCharBufferImpl.cc b/libjava/gnu/java/nio/natCharBufferImpl.cc index 9fb54e14561..eb729277d3a 100644 --- a/libjava/gnu/java/nio/natCharBufferImpl.cc +++ b/libjava/gnu/java/nio/natCharBufferImpl.cc @@ -20,14 +20,3 @@ gnu::java::nio::CharBufferImpl::nio_cast(JArray<jbyte>*) { 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; -} diff --git a/libjava/gnu/java/nio/natDoubleBufferImpl.cc b/libjava/gnu/java/nio/natDoubleBufferImpl.cc deleted file mode 100644 index 6c66a337417..00000000000 --- a/libjava/gnu/java/nio/natDoubleBufferImpl.cc +++ /dev/null @@ -1,33 +0,0 @@ -// natDoubleBufferImpl.cc - -/* Copyright (C) 2002, 2003 Free Software Foundation - - This file is part of libgcj. - -This software is copyrighted work licensed under the terms of the -Libgcj License. Please consult the file "LIBGCJ_LICENSE" for -details. */ - -#include <config.h> - -#include <gcj/cni.h> -#include <jvm.h> - -#include <gnu/java/nio/DoubleBufferImpl.h> - -JArray<jdouble>* -gnu::java::nio::DoubleBufferImpl::nio_cast(JArray<jbyte>*) -{ - return NULL; -} - -void -gnu::java::nio::DoubleBufferImpl::nio_put_Byte(gnu::java::nio::DoubleBufferImpl*, jint, jint, jbyte) -{ -} - -jbyte -gnu::java::nio::DoubleBufferImpl::nio_get_Byte(gnu::java::nio::DoubleBufferImpl*, jint, jint) -{ - return 0; -} diff --git a/libjava/gnu/java/nio/natFloatBufferImpl.cc b/libjava/gnu/java/nio/natFloatBufferImpl.cc deleted file mode 100644 index 9785454634c..00000000000 --- a/libjava/gnu/java/nio/natFloatBufferImpl.cc +++ /dev/null @@ -1,33 +0,0 @@ -// natFloatBufferImpl.cc - -/* Copyright (C) 2002, 2003 Free Software Foundation - - This file is part of libgcj. - -This software is copyrighted work licensed under the terms of the -Libgcj License. Please consult the file "LIBGCJ_LICENSE" for -details. */ - -#include <config.h> - -#include <gcj/cni.h> -#include <jvm.h> - -#include <gnu/java/nio/FloatBufferImpl.h> - -JArray<jfloat>* -gnu::java::nio::FloatBufferImpl::nio_cast(JArray<jbyte>*) -{ - return NULL; -} - -void -gnu::java::nio::FloatBufferImpl::nio_put_Byte(gnu::java::nio::FloatBufferImpl*, jint, jint, jbyte) -{ -} - -jbyte -gnu::java::nio::FloatBufferImpl::nio_get_Byte(gnu::java::nio::FloatBufferImpl*, jint, jint) -{ - return 0; -} diff --git a/libjava/gnu/java/nio/natIntBufferImpl.cc b/libjava/gnu/java/nio/natIntBufferImpl.cc deleted file mode 100644 index eff70f838bb..00000000000 --- a/libjava/gnu/java/nio/natIntBufferImpl.cc +++ /dev/null @@ -1,33 +0,0 @@ -// natIntBufferImpl.cc - -/* Copyright (C) 2002, 2003 Free Software Foundation - - This file is part of libgcj. - -This software is copyrighted work licensed under the terms of the -Libgcj License. Please consult the file "LIBGCJ_LICENSE" for -details. */ - -#include <config.h> - -#include <gcj/cni.h> -#include <jvm.h> - -#include <gnu/java/nio/IntBufferImpl.h> - -JArray<jint>* -gnu::java::nio::IntBufferImpl::nio_cast(JArray<jbyte>*) -{ - return NULL; -} - -void -gnu::java::nio::IntBufferImpl::nio_put_Byte(gnu::java::nio::IntBufferImpl*, jint, jint, jbyte) -{ -} - -jbyte -gnu::java::nio::IntBufferImpl::nio_get_Byte(gnu::java::nio::IntBufferImpl*, jint, jint) -{ - return 0; -} diff --git a/libjava/gnu/java/nio/natLongBufferImpl.cc b/libjava/gnu/java/nio/natLongBufferImpl.cc deleted file mode 100644 index a84248136e5..00000000000 --- a/libjava/gnu/java/nio/natLongBufferImpl.cc +++ /dev/null @@ -1,33 +0,0 @@ -// natLongBufferImpl.cc - -/* Copyright (C) 2002, 2003 Free Software Foundation - - This file is part of libgcj. - -This software is copyrighted work licensed under the terms of the -Libgcj License. Please consult the file "LIBGCJ_LICENSE" for -details. */ - -#include <config.h> - -#include <gcj/cni.h> -#include <jvm.h> - -#include <gnu/java/nio/LongBufferImpl.h> - -JArray<jlong>* -gnu::java::nio::LongBufferImpl::nio_cast(JArray<jbyte>*) -{ - return NULL; -} - -void -gnu::java::nio::LongBufferImpl::nio_put_Byte(gnu::java::nio::LongBufferImpl*, jint, jint, jbyte) -{ -} - -jbyte -gnu::java::nio::LongBufferImpl::nio_get_Byte(gnu::java::nio::LongBufferImpl*, jint, jint) -{ - return 0; -} diff --git a/libjava/gnu/java/nio/natShortBufferImpl.cc b/libjava/gnu/java/nio/natShortBufferImpl.cc deleted file mode 100644 index 188bff9575e..00000000000 --- a/libjava/gnu/java/nio/natShortBufferImpl.cc +++ /dev/null @@ -1,33 +0,0 @@ -// natShortBufferImpl.cc - -/* Copyright (C) 2002, 2003 Free Software Foundation - - This file is part of libgcj. - -This software is copyrighted work licensed under the terms of the -Libgcj License. Please consult the file "LIBGCJ_LICENSE" for -details. */ - -#include <config.h> - -#include <gcj/cni.h> -#include <jvm.h> - -#include <gnu/java/nio/ShortBufferImpl.h> - -JArray<jshort>* -gnu::java::nio::ShortBufferImpl::nio_cast(JArray<jbyte>*) -{ - return NULL; -} - -void -gnu::java::nio::ShortBufferImpl::nio_put_Byte(gnu::java::nio::ShortBufferImpl*, jint, jint, jbyte) -{ -} - -jbyte -gnu::java::nio::ShortBufferImpl::nio_get_Byte(gnu::java::nio::ShortBufferImpl*, jint, jint) -{ - return 0; -} diff --git a/libjava/java/io/DataInputStream.java b/libjava/java/io/DataInputStream.java index 5f8c541e822..8c2f0e1ce15 100644 --- a/libjava/java/io/DataInputStream.java +++ b/libjava/java/io/DataInputStream.java @@ -129,6 +129,8 @@ public class DataInputStream extends FilterInputStream implements DataInput * @exception EOFException If end of file is reached before reading * the boolean * @exception IOException If any other error occurs + * + * @see DataOutput#writeBoolean */ public final boolean readBoolean() throws IOException { @@ -148,7 +150,7 @@ public class DataInputStream extends FilterInputStream implements DataInput * @exception EOFException If end of file is reached before reading the byte * @exception IOException If any other error occurs * - * @see DataOutput + * @see DataOutput#writeByte */ public final byte readByte() throws IOException { @@ -178,7 +180,7 @@ public class DataInputStream extends FilterInputStream implements DataInput * @exception EOFException If end of file is reached before reading the char * @exception IOException If any other error occurs * - * @see DataOutput + * @see DataOutput#writeChar */ public final char readChar() throws IOException { @@ -204,8 +206,8 @@ public class DataInputStream extends FilterInputStream implements DataInput * the double * @exception IOException If any other error occurs * - * @see java.lang.Double - * @see DataOutput + * @see DataOutput#writeDouble + * @see java.lang.Double#longBitsToDouble */ public final double readDouble() throws IOException { @@ -221,7 +223,7 @@ public class DataInputStream extends FilterInputStream implements DataInput * in the class <code>java.lang.Float</code> * <p> * This method can read a <code>float</code> written by an object - * implementing the * <code>writeFloat()</code> method in the + * implementing the <code>writeFloat()</code> method in the * <code>DataOutput</code> interface. * * @return The <code>float</code> value read @@ -229,8 +231,9 @@ public class DataInputStream extends FilterInputStream implements DataInput * @exception EOFException If end of file is reached before reading the float * @exception IOException If any other error occurs * - * @see java.lang.Float - * @see DataOutput */ + * @see DataOutput#writeFloat + * @see java.lang.Float#intBitsToFloat + */ public final float readFloat() throws IOException { return Float.intBitsToFloat(readInt()); @@ -240,32 +243,38 @@ public class DataInputStream extends FilterInputStream implements DataInput * This method reads raw bytes into the passed array until the array is * full. Note that this method blocks until the data is available and * throws an exception if there is not enough data left in the stream to - * fill the buffer + * fill the buffer. Note also that zero length buffers are permitted. + * In this case, the method will return immediately without reading any + * bytes from the stream. * * @param b The buffer into which to read the data * - * @exception EOFException If end of file is reached before filling - * the buffer - * @exception IOException If any other error occurs */ + * @exception EOFException If end of file is reached before filling the + * buffer + * @exception IOException If any other error occurs + */ public final void readFully(byte[] b) throws IOException { readFully(b, 0, b.length); } /** - * This method reads raw bytes into the passed array - * <code>buf</code> starting <code>offset</code> bytes into the - * buffer. The number of bytes read will be exactly - * <code>len</code> Note that this method blocks until the data is - * available and * throws an exception if there is not enough data - * left in the stream to read <code>len</code> bytes. + * This method reads raw bytes into the passed array <code>buf</code> + * starting + * <code>offset</code> bytes into the buffer. The number of bytes read + * will be + * exactly <code>len</code>. Note that this method blocks until the data is + * available and throws an exception if there is not enough data left in + * the stream to read <code>len</code> bytes. Note also that zero length + * buffers are permitted. In this case, the method will return immediately + * without reading any bytes from the stream. * * @param buf The buffer into which to read the data * @param offset The offset into the buffer to start storing data * @param len The number of bytes to read into the buffer * - * @exception EOFException If end of file is reached before filling - * the buffer + * @exception EOFException If end of file is reached before filling the + * buffer * @exception IOException If any other error occurs */ public final void readFully(byte[] b, int off, int len) throws IOException @@ -282,20 +291,20 @@ public class DataInputStream extends FilterInputStream implements DataInput } /** - * This method reads a Java <code>int</code> value from an input - * stream It operates by reading four bytes from the stream and - * converting them to a single Java <code>int</code> The bytes are - * stored most significant byte first (i.e., "big endian") - * regardless of the native host byte ordering. - * <p> - * As an example, if <code>byte1</code> through <code>byte4</code> - * represent the first four bytes read from the stream, they will be + * This method reads a Java <code>int</code> value from an input stream + * It operates by reading four bytes from the stream and converting them to + * a single Java <code>int</code>. The bytes are stored most + * significant byte first (i.e., "big endian") regardless of the native + * host byte ordering. + * <p> + * As an example, if <code>byte1</code> through <code>byte4</code> represent + * the first four bytes read from the stream, they will be * transformed to an <code>int</code> in the following manner: * <p> - * <code>(int)(((byte1 & 0xFF) << 24) + ((byte2 & 0xFF) << 16) + - * ((byte3 & 0xFF) << 8) + (byte4 & 0xFF)))</code> + * <code>(int)(((byte1 & 0xFF) << 24) + ((byte2 & 0xFF) << 16) + + * ((byte3 & 0xFF)<< 8) + (byte4 & 0xFF)))</code> * <p> - * The value returned is in the range of 0 to 65535. + * The value returned is in the range of -2147483648 to 2147483647. * <p> * This method can read an <code>int</code> written by an object * implementing the <code>writeInt()</code> method in the @@ -306,7 +315,7 @@ public class DataInputStream extends FilterInputStream implements DataInput * @exception EOFException If end of file is reached before reading the int * @exception IOException If any other error occurs * - * @see DataOutput + * @see DataOutput#writeInt */ public final int readInt() throws IOException { @@ -428,22 +437,24 @@ public class DataInputStream extends FilterInputStream implements DataInput } /** - * This method reads a Java long value from an input stream - * It operates by reading eight bytes from the stream and converting them to - * a single Java <code>long</code> The bytes are stored most + * This method reads a Java <code>long</code> value from an input stream + * It operates by reading eight bytes from the stream and converting them to + * a single Java <code>long</code>. The bytes are stored most * significant byte first (i.e., "big endian") regardless of the native - * host byte ordering. + * host byte ordering. * <p> - * As an example, if <code>byte1</code> through <code>byte8</code> - * represent the first eight bytes read from the stream, they will - * be transformed to an <code>long</code> in the following manner: + * As an example, if <code>byte1</code> through <code>byte8</code> represent + * the first eight bytes read from the stream, they will be + * transformed to an <code>long</code> in the following manner: * <p> - * <code>(long)((((long)byte1 & 0xFF) << 56) + (((long)byte2 & 0xFF) << 48) + - * (((long)byte3 & 0xFF) << 40) + (((long)byte4 & 0xFF) << 32) + - * (((long)byte5 & 0xFF) << 24) + (((long)byte6 & 0xFF) << 16) + - * (((long)byte7 & 0xFF) << 8) + ((long)byte9 & 0xFF)))</code> + * <code>(long)(((byte1 & 0xFF) << 56) + ((byte2 & 0xFF) << 48) + + * ((byte3 & 0xFF) << 40) + ((byte4 & 0xFF) << 32) + + * ((byte5 & 0xFF) << 24) + ((byte6 & 0xFF) << 16) + + * ((byte7 & 0xFF) << 8) + (byte8 & 0xFF))) + * </code> * <p> - * The value returned is in the range of 0 to 65535. + * The value returned is in the range of -9223372036854775808 to + * 9223372036854775807. * <p> * This method can read an <code>long</code> written by an object * implementing the <code>writeLong()</code> method in the @@ -454,7 +465,7 @@ public class DataInputStream extends FilterInputStream implements DataInput * @exception EOFException If end of file is reached before reading the long * @exception IOException If any other error occurs * - * @see DataOutput + * @see DataOutput#writeLong */ public final long readLong() throws IOException { @@ -474,7 +485,7 @@ public class DataInputStream extends FilterInputStream implements DataInput * respectively, they will be transformed to a <code>short</code>. in * the following manner: * <p> - * <code>(short)(((byte1 & 0xFF) << 8) | (byte2 & 0xFF)</code> + * <code>(short)(((byte1 & 0xFF) << 8) | (byte2 & 0xFF))</code> * <p> * The value returned is in the range of -32768 to 32767. * <p> @@ -487,14 +498,14 @@ public class DataInputStream extends FilterInputStream implements DataInput * @exception EOFException If end of file is reached before reading the value * @exception IOException If any other error occurs * - * @see DataOutput + * @see DataOutput#writeShort */ public final short readShort() throws IOException { readFully (buf, 0, 2); return convertToShort(buf); } - + /** * This method reads 8 unsigned bits into a Java <code>int</code> * value from the stream. The value returned is in the range of 0 to @@ -509,7 +520,7 @@ public class DataInputStream extends FilterInputStream implements DataInput * @exception EOFException If end of file is reached before reading the value * @exception IOException If any other error occurs * - * @see DataOutput + * @see DataOutput#writeByte */ public final int readUnsignedByte() throws IOException { @@ -540,6 +551,8 @@ public class DataInputStream extends FilterInputStream implements DataInput * * @exception EOFException If end of file is reached before reading the value * @exception IOException If any other error occurs + * + * @see DataOutput#writeShort */ public final int readUnsignedShort() throws IOException { @@ -616,7 +629,7 @@ public class DataInputStream extends FilterInputStream implements DataInput * @exception UTFDataFormatException If the data is not in UTF-8 format * @exception IOException If any other error occurs * - * @see DataOutput + * @see DataOutput#writeUTF */ public final String readUTF() throws IOException { @@ -632,6 +645,8 @@ public class DataInputStream extends FilterInputStream implements DataInput * @return The String read from the source * * @exception IOException If an error occurs + * + * @see DataInput#readUTF */ public final static String readUTF(DataInput in) throws IOException { @@ -654,7 +669,9 @@ public class DataInputStream extends FilterInputStream implements DataInput * to skip. * * @param n The requested number of bytes to skip. + * * @return The requested number of bytes to skip. + * * @exception IOException If an error occurs. * @specnote The JDK docs claim that this returns the number of bytes * actually skipped. The JCL claims that this method can throw an diff --git a/libjava/java/io/DataOutputStream.java b/libjava/java/io/DataOutputStream.java index 644b5901c33..9232b7ad73d 100644 --- a/libjava/java/io/DataOutputStream.java +++ b/libjava/java/io/DataOutputStream.java @@ -101,13 +101,13 @@ public class DataOutputStream extends FilterOutputStream implements DataOutput * This method writes the specified byte (passed as an <code>int</code>) * to the underlying output stream. * - * @param b The byte to write, passed as an <code>int</code>. + * @param value The <code>byte</code> to write, passed as an <code>int</code>. * * @exception IOException If an error occurs. */ - public synchronized void write (int b) throws IOException + public synchronized void write (int value) throws IOException { - out.write(b); + out.write (value); ++written; } @@ -130,116 +130,185 @@ public class DataOutputStream extends FilterOutputStream implements DataOutput } /** - * This method writes a Java <code>boolean</code> to the underlying output - * stream. For a value of <code>true</code>, 1 is written to the stream. - * For a value of <code>false</code>, 0 is written. + * This method writes a Java boolean value to an output stream. If + * <code>value</code> is <code>true</code>, a byte with the value of + * 1 will be written, otherwise a byte with the value of 0 will be + * written. * - * @param b The <code>boolean</code> value to write to the stream + * The value written can be read using the <code>readBoolean</code> + * method in <code>DataInput</code>. + * + * @param value The <code>boolean</code> value to write to the stream * * @exception IOException If an error occurs + * + * @see DataInput#readBoolean */ - public final void writeBoolean (boolean v) throws IOException + public final void writeBoolean (boolean value) throws IOException { - write (v ? 1 : 0); + write (value ? 1 : 0); } /** - * This method writes a Java <code>byte</code> value to the underlying - * output stream. + * This method writes a Java byte value to an output stream. The + * byte to be written will be in the lowest 8 bits of the + * <code>int</code> value passed. + * + * The value written can be read using the <code>readByte</code> or + * <code>readUnsignedByte</code> methods in <code>DataInput</code>. * - * @param b The <code>byte</code> to write to the stream, passed as + * @param value The <code>byte</code> to write to the stream, passed as * the low eight bits of an <code>int</code>. * * @exception IOException If an error occurs + * + * @see DataInput#readByte + * @see DataInput#readUnsignedByte */ - public final void writeByte (int v) throws IOException + public final void writeByte (int value) throws IOException { - write (v & 0xff); + write (value & 0xff); } /** - * This method writes a Java <code>short</code> to the stream, high byte - * first. This method requires two bytes to encode the value. + * This method writes a Java short value to an output stream. The + * char to be written will be in the lowest 16 bits of the <code>int</code> + * value passed. These bytes will be written "big endian". That is, + * with the high byte written first in the following manner: + * <p> + * <code>byte0 = (byte)((value & 0xFF00) >> 8);<br> + * byte1 = (byte)(value & 0x00FF);</code> + * <p> + * + * The value written can be read using the <code>readShort</code> and + * <code>readUnsignedShort</code> methods in <code>DataInput</code>. * - * @param s The <code>short</code> value to write to the stream, + * @param value The <code>short</code> value to write to the stream, * passed as an <code>int</code>. * * @exception IOException If an error occurs + * + * @see DataInput#readShort + * @see DataInput#readUnsignedShort */ - public final void writeShort (int v) throws IOException + public final synchronized void writeShort (int value) throws IOException { - write ((byte) (0xff & (v >> 8))); - write ((byte) (0xff & v)); + write ((byte) (0xff & (value >> 8))); + write ((byte) (0xff & value)); } /** - * This method writes a single <code>char</code> value to the stream, - * high byte first. + * This method writes a Java char value to an output stream. The + * char to be written will be in the lowest 16 bits of the <code>int</code> + * value passed. These bytes will be written "big endian". That is, + * with the high byte written first in the following manner: + * <p> + * <code>byte0 = (byte)((value & 0xFF00) >> 8);<br> + * byte1 = (byte)(value & 0x00FF);</code> + * <p> + * + * The value written can be read using the <code>readChar</code> + * method in <code>DataInput</code>. * - * @param c The <code>char</code> value to write, + * @param value The <code>char</code> value to write, * passed as an <code>int</code>. * * @exception IOException If an error occurs + * + * @see DataInput#readChar */ - public final void writeChar (int v) throws IOException + public final synchronized void writeChar (int value) throws IOException { - write ((byte) (0xff & (v >> 8))); - write ((byte) (0xff & v)); + write ((byte) (0xff & (value >> 8))); + write ((byte) (0xff & value)); } /** - * This method writes a Java <code>int</code> to the stream, high bytes - * first. This method requires four bytes to encode the value. + * This method writes a Java int value to an output stream. The 4 bytes + * of the passed value will be written "big endian". That is, with + * the high byte written first in the following manner: + * <p> + * <code>byte0 = (byte)((value & 0xFF000000) >> 24);<br> + * byte1 = (byte)((value & 0x00FF0000) >> 16);<br> + * byte2 = (byte)((value & 0x0000FF00) >> 8);<br> + * byte3 = (byte)(value & 0x000000FF);</code> + * <p> + * + * The value written can be read using the <code>readInt</code> + * method in <code>DataInput</code>. * - * @param i The <code>int</code> value to write to the stream. + * @param value The <code>int</code> value to write to the stream * * @exception IOException If an error occurs + * + * @see DataInput#readInt */ - public final void writeInt (int v) throws IOException + public final synchronized void writeInt (int value) throws IOException { - write ((byte) (0xff & (v >> 24))); - write ((byte) (0xff & (v >> 16))); - write ((byte) (0xff & (v >> 8))); - write ((byte) (0xff & v)); + write ((byte) (0xff & (value >> 24))); + write ((byte) (0xff & (value >> 16))); + write ((byte) (0xff & (value >> 8))); + write ((byte) (0xff & value)); } /** - * This method writes a Java <code>long</code> to the stream, high bytes - * first. This method requires eight bytes to encode the value. + * This method writes a Java long value to an output stream. The 8 bytes + * of the passed value will be written "big endian". That is, with + * the high byte written first in the following manner: + * <p> + * <code>byte0 = (byte)((value & 0xFF00000000000000L) >> 56);<br> + * byte1 = (byte)((value & 0x00FF000000000000L) >> 48);<br> + * byte2 = (byte)((value & 0x0000FF0000000000L) >> 40);<br> + * byte3 = (byte)((value & 0x000000FF00000000L) >> 32);<br> + * byte4 = (byte)((value & 0x00000000FF000000L) >> 24);<br> + * byte5 = (byte)((value & 0x0000000000FF0000L) >> 16);<br> + * byte6 = (byte)((value & 0x000000000000FF00L) >> 8);<br> + * byte7 = (byte)(value & 0x00000000000000FFL);</code> + * <p> + * + * The value written can be read using the <code>readLong</code> + * method in <code>DataInput</code>. * - * @param l The <code>long</code> value to write to the stream. + * @param value The <code>long</code> value to write to the stream * * @exception IOException If an error occurs + * + * @see DataInput#readLong */ - public final void writeLong (long v) throws IOException + public final synchronized void writeLong (long value) throws IOException { - write ((byte) (0xff & (v >> 56))); - write ((byte) (0xff & (v >> 48))); - write ((byte) (0xff & (v >> 40))); - write ((byte) (0xff & (v >> 32))); - write ((byte) (0xff & (v >> 24))); - write ((byte) (0xff & (v >> 16))); - write ((byte) (0xff & (v >> 8))); - write ((byte) (0xff & v)); + write ((byte) (0xff & (value >> 56))); + write ((byte) (0xff & (value>> 48))); + write ((byte) (0xff & (value>> 40))); + write ((byte) (0xff & (value>> 32))); + write ((byte) (0xff & (value>> 24))); + write ((byte) (0xff & (value>> 16))); + write ((byte) (0xff & (value>> 8))); + write ((byte) (0xff & value)); } /** * This method writes a Java <code>float</code> value to the stream. This - * value is written by first calling the method + * value is written by first calling the method * <code>Float.floatToIntBits</code> * to retrieve an <code>int</code> representing the floating point number, * then writing this <code>int</code> value to the stream exactly the same * as the <code>writeInt()</code> method does. * - * @param f The floating point number to write to the stream. + * The value written can be read using the <code>readFloat</code> + * method in <code>DataInput</code>. + * + * @param value The <code>float</code> value to write to the stream * * @exception IOException If an error occurs * * @see writeInt + * @see DataInput#readFloat + * @see Float#floatToIntBits */ - public final void writeFloat (float v) throws IOException + public final void writeFloat (float value) throws IOException { - writeInt (Float.floatToIntBits(v)); + writeInt (Float.floatToIntBits (value)); } /** @@ -250,49 +319,57 @@ public class DataOutputStream extends FilterOutputStream implements DataOutput * then writing this <code>long</code> value to the stream exactly the same * as the <code>writeLong()</code> method does. * - * @param d The double precision floating point number to write to - * the stream. + * The value written can be read using the <code>readDouble</code> + * method in <code>DataInput</code>. + * + * @param value The <code>double</code> value to write to the stream * * @exception IOException If an error occurs * * @see writeLong + * @see DataInput#readDouble + * @see Double#doubleToLongBits */ - public final void writeDouble (double v) throws IOException + public final void writeDouble (double value) throws IOException { - writeLong (Double.doubleToLongBits(v)); + writeLong (Double.doubleToLongBits (value)); } /** * This method writes all the bytes in a <code>String</code> out to the * stream. One byte is written for each character in the * <code>String</code>. - * The high eight bits of each character are discarded. + * The high eight bits of each character are discarded, thus this + * method is inappropriate for completely representing Unicode characters. * - * @param s The <code>String</code> to write to the stream + * @param value The <code>String</code> to write to the stream * * @exception IOException If an error occurs */ - public final void writeBytes (String s) throws IOException + public final void writeBytes (String value) throws IOException { - int len = s.length(); + int len = value.length(); for (int i = 0; i < len; ++i) - writeByte (s.charAt(i)); + writeByte (value.charAt(i)); } /** - * This method writes all the characters in a <code>String</code> to the - * stream. There will be two bytes for each character value. The high - * byte of the character will be written first. + * This method writes all the characters of a <code>String</code> to an + * output stream as an array of <code>char</code>'s. Each character + * is written using the method specified in the <code>writeChar</code> + * method. * - * @param s The <code>String</code> to write to the stream. + * @param value The <code>String</code> to write to the stream * * @exception IOException If an error occurs + * + * @see writeChar */ - public final void writeChars (String s) throws IOException + public final void writeChars (String value) throws IOException { - int len = s.length(); + int len = value.length(); for (int i = 0; i < len; ++i) - writeChar (s.charAt(i)); + writeChar (value.charAt(i)); } /** @@ -318,18 +395,23 @@ public class DataOutputStream extends FilterOutputStream implements DataOutput * character value are stored in bits 0-5 of byte three, with the high bits * of that byte set to "10". * - * @param s The <code>String</code> to write to the output in UTF format + * The value written can be read using the <code>readUTF</code> + * method in <code>DataInput</code>. + * + * @param value The <code>String</code> to write to the output in UTF format * * @exception IOException If an error occurs + * + * @see DataInput#readUTF */ - public final void writeUTF (String s) throws IOException + public synchronized final void writeUTF (String value) throws IOException { - int len = s.length(); + int len = value.length(); int sum = 0; for (int i = 0; i < len && sum <= 65535; ++i) { - char c = s.charAt(i); + char c = value.charAt(i); if (c >= '\u0001' && c <= '\u007f') sum += 1; else if (c == '\u0000' || (c >= '\u0080' && c <= '\u07ff')) @@ -345,7 +427,7 @@ public class DataOutputStream extends FilterOutputStream implements DataOutput for (int i = 0; i < len; ++i) { - char c = s.charAt(i); + char c = value.charAt(i); if (c >= '\u0001' && c <= '\u007f') write (c); else if (c == '\u0000' || (c >= '\u0080' && c <= '\u07ff')) diff --git a/libjava/java/io/File.java b/libjava/java/io/File.java index 56d3a6355f8..4872076108e 100644 --- a/libjava/java/io/File.java +++ b/libjava/java/io/File.java @@ -199,7 +199,10 @@ public class File implements Serializable, Comparable checkWrite(); return performCreate(); } - + + /* + * This native method handles the actual deleting of the file + */ private native boolean performDelete (); /** @@ -211,12 +214,13 @@ public class File implements Serializable, Comparable * * @exception SecurityException If deleting of the file is not allowed */ - public boolean delete () + public synchronized boolean delete () { - SecurityManager s = System.getSecurityManager(); - String name = path; + SecurityManager s = System.getSecurityManager (); + if (s != null) - s.checkDelete(path); + s.checkDelete (path); + return performDelete (); } @@ -239,11 +243,12 @@ public class File implements Serializable, Comparable { if (! (obj instanceof File)) return false; + File other = (File) obj; if (caseSensitive) - return (path.equals(other.path)); + return path.equals(other.path); else - return (path.equalsIgnoreCase(other.path)); + return path.equalsIgnoreCase(other.path); } /** @@ -663,7 +668,7 @@ public class File implements Serializable, Comparable * * @since 1.2 */ - public boolean isHidden() + public boolean isHidden () { checkRead(); return _stat (ISHIDDEN); @@ -701,6 +706,11 @@ public class File implements Serializable, Comparable checkRead(); return attr (LENGTH); } + + /* + * This native function actually produces the list of file in this + * directory + */ private final native Object[] performList (FilenameFilter filter, FileFilter fileFilter, @@ -781,7 +791,7 @@ public class File implements Serializable, Comparable * * @since 1.2 */ - public File[] listFiles() + public File[] listFiles () { checkRead(); return (File[]) performList (null, null, File.class); @@ -811,12 +821,12 @@ public class File implements Serializable, Comparable * * @since 1.2 */ - public File[] listFiles(FilenameFilter filter) + public File[] listFiles (FilenameFilter filter) { checkRead(); return (File[]) performList (filter, null, File.class); } - + /** * This method returns an array of <code>File</code> objects representing * all the files in the directory represented by this object. If this @@ -841,7 +851,7 @@ public class File implements Serializable, Comparable * * @since 1.2 */ - public File[] listFiles(FileFilter filter) + public File[] listFiles (FileFilter filter) { checkRead(); return (File[]) performList (null, filter, File.class); @@ -880,6 +890,9 @@ public class File implements Serializable, Comparable + (isDirectory() ? "/" : "")); } + /* + * This native method actually creates the directory + */ private final native boolean performMkdir (); /** @@ -1025,6 +1038,9 @@ public class File implements Serializable, Comparable throw new IOException ("cannot create temporary file"); } + /* + * This native method sets the permissions to make the file read only. + */ private native boolean performSetReadOnly(); /** @@ -1041,7 +1057,7 @@ public class File implements Serializable, Comparable * * @since 1.2 */ - public boolean setReadOnly() + public boolean setReadOnly () { checkWrite(); return performSetReadOnly(); @@ -1060,7 +1076,7 @@ public class File implements Serializable, Comparable * * @since 1.2 */ - public static File[] listRoots() + public static File[] listRoots () { File[] roots = performListRoots(); @@ -1180,6 +1196,9 @@ public class File implements Serializable, Comparable return compareTo (other); } + /* + * This native method actually performs the rename. + */ private native boolean performRenameTo (File dest); /** @@ -1194,7 +1213,7 @@ public class File implements Serializable, Comparable * @exception SecurityException If write access is not allowed to the * file by the <code>SecurityMananger</code>. */ - public boolean renameTo (File dest) + public synchronized boolean renameTo (File dest) { SecurityManager s = System.getSecurityManager(); String sname = getName(); @@ -1207,6 +1226,9 @@ public class File implements Serializable, Comparable return performRenameTo (dest); } + /* + * This method does the actual setting of the modification time. + */ private native boolean performSetLastModified(long time); /** @@ -1225,7 +1247,7 @@ public class File implements Serializable, Comparable * * @since 1.2 */ - public boolean setLastModified(long time) + public boolean setLastModified (long time) { checkWrite(); return performSetLastModified(time); @@ -1233,16 +1255,20 @@ public class File implements Serializable, Comparable private void checkWrite () { - SecurityManager s = System.getSecurityManager(); + // Check the SecurityManager + SecurityManager s = System.getSecurityManager (); + if (s != null) - s.checkWrite(path); + s.checkWrite (path); } private void checkRead () { - SecurityManager s = System.getSecurityManager(); + // Check the SecurityManager + SecurityManager s = System.getSecurityManager (); + if (s != null) - s.checkRead(path); + s.checkRead (path); } /** @@ -1254,6 +1280,7 @@ public class File implements Serializable, Comparable // FIXME: This should use the ShutdownHook API once we implement that. public void deleteOnExit () { + // Check the SecurityManager SecurityManager sm = System.getSecurityManager (); if (sm != null) sm.checkDelete (getName ()); @@ -1275,8 +1302,9 @@ public class File implements Serializable, Comparable // If the file was from an OS with a different dir separator, // fixup the path to use the separator on this OS. char oldSeparatorChar = ois.readChar (); + if (oldSeparatorChar != separatorChar) path = path.replace (oldSeparatorChar, separatorChar); } +} // class File -} diff --git a/libjava/java/io/FileInputStream.java b/libjava/java/io/FileInputStream.java index b49922ed17a..e22a23a4326 100644 --- a/libjava/java/io/FileInputStream.java +++ b/libjava/java/io/FileInputStream.java @@ -82,6 +82,7 @@ public class FileInputStream extends InputStream SecurityManager s = System.getSecurityManager(); if (s != null) s.checkRead(name); + fd = new FileDescriptor(name, FileDescriptor.READ); } @@ -268,15 +269,15 @@ public class FileInputStream extends InputStream * * @exception IOException If an error occurs */ - public long skip (long numBytes) throws IOException + public synchronized long skip (long numBytes) throws IOException { if (numBytes < 0) - throw new IllegalArgumentException ( "Can't skip negative bytes: " + - numBytes); + throw new IllegalArgumentException ("Can't skip negative bytes: " + + numBytes); if (numBytes == 0) return 0; - + long curPos = fd.getFilePointer (); long newPos = fd.seek (numBytes, FileDescriptor.CUR, true); return newPos - curPos; diff --git a/libjava/java/io/FileOutputStream.java b/libjava/java/io/FileOutputStream.java index 1c75ccd04cd..f4488dcca93 100644 --- a/libjava/java/io/FileOutputStream.java +++ b/libjava/java/io/FileOutputStream.java @@ -233,7 +233,7 @@ public class FileOutputStream extends OutputStream public void write (byte[] buf) throws IOException { - fd.write (buf, 0, buf.length); + write (buf, 0, buf.length); } /** diff --git a/libjava/java/io/InputStreamReader.java b/libjava/java/io/InputStreamReader.java index 70213b5f843..05ed5fe2287 100644 --- a/libjava/java/io/InputStreamReader.java +++ b/libjava/java/io/InputStreamReader.java @@ -37,17 +37,54 @@ exception statement from your version. */ package java.io; + import gnu.gcj.convert.*; /** + * This class reads characters from a byte input stream. The characters + * read are converted from bytes in the underlying stream by a + * decoding layer. The decoding layer transforms bytes to chars according + * to an encoding standard. There are many available encodings to choose + * from. The desired encoding can either be specified by name, or if no + * encoding is selected, the system default encoding will be used. The + * system default encoding name is determined from the system property + * <code>file.encoding</code>. The only encodings that are guaranteed to + * be availalbe are "8859_1" (the Latin-1 character set) and "UTF8". + * Unforunately, Java does not provide a mechanism for listing the + * ecodings that are supported in a given implementation. + * <p> + * Here is a list of standard encoding names that may be available: + * <p> + * <ul> + * <li>8859_1 (ISO-8859-1/Latin-1) + * <li>8859_2 (ISO-8859-2/Latin-2) + * <li>8859_3 (ISO-8859-3/Latin-3) + * <li>8859_4 (ISO-8859-4/Latin-4) + * <li>8859_5 (ISO-8859-5/Latin-5) + * <li>8859_6 (ISO-8859-6/Latin-6) + * <li>8859_7 (ISO-8859-7/Latin-7) + * <li>8859_8 (ISO-8859-8/Latin-8) + * <li>8859_9 (ISO-8859-9/Latin-9) + * <li>ASCII (7-bit ASCII) + * <li>UTF8 (UCS Transformation Format-8) + * <li>More later + * </ul> + * <p> + * It is recommended that applications do not use + * <code>InputStreamReader</code>'s + * directly. Rather, for efficiency purposes, an object of this class + * should be wrapped by a <code>BufferedReader</code>. + * <p> + * Due to a deficiency the Java class library design, there is no standard + * way for an application to install its own byte-character encoding. + * + * @see BufferedReader + * @see InputStream + * + * @author Aaron M. Renn (arenn@urbanophile.com) * @author Per Bothner <bothner@cygnus.com> * @date April 22, 1998. */ -/* Written using "Java Class Libraries", 2nd edition, plus online - * API docs for JDK 1.2 beta from http://www.javasoft.com. - * Status: Believed complete and correct, but only supports 8859_1. - */ - public class InputStreamReader extends Reader { BufferedInputStream in; @@ -59,13 +96,35 @@ public class InputStreamReader extends Reader // Last available character (in work buffer) to read. int wcount; + /* + * This is the byte-character decoder class that does the reading and + * translation of bytes from the underlying stream. + */ BytesToUnicode converter; + /** + * This method initializes a new instance of <code>InputStreamReader</code> + * to read from the specified stream using the default encoding. + * + * @param in The <code>InputStream</code> to read from + */ public InputStreamReader(InputStream in) { this(in, BytesToUnicode.getDefaultDecoder()); } + /** + * This method initializes a new instance of <code>InputStreamReader</code> + * to read from the specified stream using a caller supplied character + * encoding scheme. Note that due to a deficiency in the Java language + * design, there is no way to determine which encodings are supported. + * + * @param in The <code>InputStream</code> to read from + * @param encoding_name The name of the encoding scheme to use + * + * @exception UnsupportedEncodingException If the encoding scheme + * requested is not available. + */ public InputStreamReader(InputStream in, String encoding_name) throws UnsupportedEncodingException { @@ -146,7 +205,20 @@ public class InputStreamReader extends Reader } } - public int read(char buf[], int offset, int length) throws IOException + /** + * This method reads up to <code>length</code> characters from the stream into + * the specified array starting at index <code>offset</code> into the + * array. + * + * @param buf The character array to recieve the data read + * @param offset The offset into the array to start storing characters + * @param length The requested number of characters to read. + * + * @return The actual number of characters read, or -1 if end of stream. + * + * @exception IOException If an error occurs + */ + public int read (char[] buf, int offset, int length) throws IOException { synchronized (lock) { diff --git a/libjava/java/io/OutputStreamWriter.java b/libjava/java/io/OutputStreamWriter.java index 1d63d5650d1..e4ecbdbab8f 100644 --- a/libjava/java/io/OutputStreamWriter.java +++ b/libjava/java/io/OutputStreamWriter.java @@ -37,20 +37,51 @@ exception statement from your version. */ package java.io; + import gnu.gcj.convert.UnicodeToBytes; /** + * This class writes characters to an output stream that is byte oriented + * It converts the chars that are written to bytes using an encoding layer, + * which is specific to a particular encoding standard. The desired + * encoding can either be specified by name, or if no encoding is specified, + * the system default encoding will be used. The system default encoding + * name is determined from the system property <code>file.encoding</code>. + * The only encodings that are guaranteed to be available are "8859_1" + * (the Latin-1 character set) and "UTF8". Unfortunately, Java does not + * provide a mechanism for listing the encodings that are supported in + * a given implementation. + * <p> + * Here is a list of standard encoding names that may be available: + * <p> + * <ul> + * <li>8859_1 (ISO-8859-1/Latin-1) + * <li>8859_2 (ISO-8859-2/Latin-2) + * <li>8859_3 (ISO-8859-3/Latin-3) + * <li>8859_4 (ISO-8859-4/Latin-4) + * <li>8859_5 (ISO-8859-5/Latin-5) + * <li>8859_6 (ISO-8859-6/Latin-6) + * <li>8859_7 (ISO-8859-7/Latin-7) + * <li>8859_8 (ISO-8859-8/Latin-8) + * <li>8859_9 (ISO-8859-9/Latin-9) + * <li>ASCII (7-bit ASCII) + * <li>UTF8 (UCS Transformation Format-8) + * <li>More Later + * </ul> + * + * @author Aaron M. Renn (arenn@urbanophile.com) * @author Per Bothner <bothner@cygnus.com> * @date April 17, 1998. */ -/* Written using "Java Class Libraries", 2nd edition, plus online - * API docs for JDK 1.2 beta from http://www.javasoft.com. - * Status: Believed complete and correct, but only supports 8859_1. - */ public class OutputStreamWriter extends Writer { BufferedOutputStream out; + /** + * This is the byte-character encoder class that does the writing and + * translation of characters to bytes before writing to the underlying + * class. + */ UnicodeToBytes converter; /* Temporary buffer. */ @@ -67,8 +98,21 @@ public class OutputStreamWriter extends Writer this.converter = encoder; } - public OutputStreamWriter(OutputStream out, String encoding_scheme) - throws UnsupportedEncodingException + /** + * This method initializes a new instance of <code>OutputStreamWriter</code> + * to write to the specified stream using a caller supplied character + * encoding scheme. Note that due to a deficiency in the Java language + * design, there is no way to determine which encodings are supported. + * + * @param out The <code>OutputStream</code> to write to + * @param encoding_scheme The name of the encoding scheme to use for + * character to byte translation + * + * @exception UnsupportedEncodingException If the named encoding is + * not available. + */ + public OutputStreamWriter (OutputStream out, String encoding_scheme) + throws UnsupportedEncodingException { this(out, UnicodeToBytes.getEncoder(encoding_scheme)); } @@ -79,7 +123,7 @@ public class OutputStreamWriter extends Writer * * @param out The <code>OutputStream</code> to write to */ - public OutputStreamWriter(OutputStream out) + public OutputStreamWriter (OutputStream out) { this(out, UnicodeToBytes.getDefaultEncoder()); } @@ -90,7 +134,7 @@ public class OutputStreamWriter extends Writer * * @exception IOException If an error occurs */ - public void close() throws IOException + public void close () throws IOException { synchronized (lock) { @@ -111,7 +155,7 @@ public class OutputStreamWriter extends Writer * * @return The encoding scheme name */ - public String getEncoding() + public String getEncoding () { return out != null ? converter.getName() : null; } @@ -121,7 +165,7 @@ public class OutputStreamWriter extends Writer * * @exception IOException If an error occurs */ - public void flush() throws IOException + public void flush () throws IOException { synchronized (lock) { @@ -137,8 +181,18 @@ public class OutputStreamWriter extends Writer } } - public void write(char[] buf, int offset, int count) - throws IOException + /** + * This method writes <code>count</code> characters from the specified + * array to the output stream starting at position <code>offset</code> + * into the array. + * + * @param buf The array of character to write from + * @param offset The offset into the array to start writing chars from + * @param count The number of chars to write. + * + * @exception IOException If an error occurs + */ + public void write (char[] buf, int offset, int count) throws IOException { synchronized (lock) { @@ -154,8 +208,10 @@ public class OutputStreamWriter extends Writer } } - /** Writes characters through to the inferior BufferedOutputStream. - * Ignores wcount and the work buffer. */ + /* + * Writes characters through to the inferior BufferedOutputStream. + * Ignores wcount and the work buffer. + */ private void writeChars(char[] buf, int offset, int count) throws IOException { @@ -178,8 +234,19 @@ public class OutputStreamWriter extends Writer } } - public void write(String str, int offset, int count) - throws IOException + /** + * This method writes <code>count</code> bytes from the specified + * <code>String</code> starting at position <code>offset</code> into the + * <code>String</code>. + * + * @param str The <code>String</code> to write chars from + * @param offset The position in the <code>String</code> to start + * writing chars from + * @param count The number of chars to write + * + * @exception IOException If an error occurs + */ + public void write (String str, int offset, int count) throws IOException { synchronized (lock) { @@ -217,7 +284,7 @@ public class OutputStreamWriter extends Writer * * @exception IOException If an error occurs */ - public void write(int ch) throws IOException + public void write (int ch) throws IOException { synchronized (lock) { diff --git a/libjava/java/net/JarURLConnection.java b/libjava/java/net/JarURLConnection.java index a1f1d0db659..b8e9de07c52 100644 --- a/libjava/java/net/JarURLConnection.java +++ b/libjava/java/net/JarURLConnection.java @@ -234,8 +234,8 @@ public abstract class JarURLConnection extends URLConnection } /** - * Return the JAR entry object for this connection, if any - * + * Returns the entry in this jar file specified by the URL. + * * @return The jar entry * * @exception IOException If an error occurs @@ -285,7 +285,7 @@ public abstract class JarURLConnection extends URLConnection } /** - * Return the JAR file for this connection + * Returns a read-only JarFile object for the remote jar file * * @return The JarFile object * @@ -426,13 +426,16 @@ public abstract class JarURLConnection extends URLConnection * * @exception IOException If an error occurs */ - public Certificate[] getCertificates() throws IOException + public Certificate[] getCertificates () throws IOException { - return getJarEntry().getCertificates(); + return getJarEntry ().getCertificates (); } /** - * Returns the main Attributes for the JAR file for this connection + * Returns the main Attributes for the jar file specified in the URL or + * null if there are none + * + * @return The main Attributes for the JAR file for this connection * * @exception IOException If an error occurs */ @@ -442,7 +445,10 @@ public abstract class JarURLConnection extends URLConnection } /** - * Return the Attributes object for this connection if the URL for it points + * Returns the Attributes for the Jar entry specified by the URL or null + * if none + * + * @return The Attributes object for this connection if the URL for it points * to a JAR file entry, null otherwise * * @exception IOException If an error occurs @@ -454,7 +460,10 @@ public abstract class JarURLConnection extends URLConnection } /** - * Returns the Manifest for this connection, or null if none + * Returns a Manifest object for this jar file, or null if there is no + * manifest. + * + * @return The Manifest for this connection, or null if none * * @exception IOException If an error occurs */ diff --git a/libjava/java/net/NetworkInterface.java b/libjava/java/net/NetworkInterface.java index 9f8e8242963..4e8f4276c57 100644 --- a/libjava/java/net/NetworkInterface.java +++ b/libjava/java/net/NetworkInterface.java @@ -46,8 +46,6 @@ import java.util.Vector; */ public final class NetworkInterface { - private static Vector networkInterfaces; - private String name; private Vector inetAddresses; @@ -125,8 +123,7 @@ public final class NetworkInterface public static NetworkInterface getByName (String name) throws SocketException { - if (networkInterfaces == null) - networkInterfaces = getRealNetworkInterfaces (); + Vector networkInterfaces = getRealNetworkInterfaces (); for (Enumeration e = networkInterfaces.elements (); e.hasMoreElements (); ) @@ -151,8 +148,7 @@ public final class NetworkInterface public static NetworkInterface getByInetAddress (InetAddress addr) throws SocketException { - if (networkInterfaces == null) - networkInterfaces = getRealNetworkInterfaces (); + Vector networkInterfaces = getRealNetworkInterfaces (); for (Enumeration interfaces = networkInterfaces.elements (); interfaces.hasMoreElements (); ) @@ -179,10 +175,10 @@ public final class NetworkInterface public static Enumeration getNetworkInterfaces () throws SocketException { - if (networkInterfaces == null) - networkInterfaces = getRealNetworkInterfaces (); + Vector networkInterfaces = getRealNetworkInterfaces (); Enumeration tmp = networkInterfaces.elements (); + if (tmp.hasMoreElements ()) return tmp; @@ -200,6 +196,7 @@ public final class NetworkInterface return false; NetworkInterface tmp = (NetworkInterface) obj; + return (name.equals (tmp.name) && inetAddresses.equals (tmp.inetAddresses)); } @@ -229,7 +226,7 @@ public final class NetworkInterface e.hasMoreElements (); ) { InetAddress address = (InetAddress) e.nextElement (); - result += address.toString () + separator; + result += address.toString () + ";" + separator; } return result; diff --git a/libjava/java/net/URI.java b/libjava/java/net/URI.java index e84ac5d0cd6..34d212f99e4 100644 --- a/libjava/java/net/URI.java +++ b/libjava/java/net/URI.java @@ -164,7 +164,6 @@ public final class URI * @exception NullPointerException If str is null */ public static URI create (String str) - throws IllegalArgumentException, URISyntaxException { return null; } diff --git a/libjava/java/net/URLConnection.java b/libjava/java/net/URLConnection.java index 2065cad314c..75adf522398 100644 --- a/libjava/java/net/URLConnection.java +++ b/libjava/java/net/URLConnection.java @@ -1021,4 +1021,5 @@ public abstract class URLConnection dateFormat3 = new SimpleDateFormat("EEE MMM d hh:mm:ss yyyy", locale); dateformats_initialized = true; } -} +} // class URLConnection + diff --git a/libjava/java/nio/CharBuffer.java b/libjava/java/nio/CharBuffer.java index e2f8d5e130a..2158af0160f 100644 --- a/libjava/java/nio/CharBuffer.java +++ b/libjava/java/nio/CharBuffer.java @@ -45,8 +45,8 @@ import gnu.java.nio.CharBufferImpl; public abstract class CharBuffer extends Buffer implements Comparable, CharSequence { - protected int array_offset = 0; - protected char [] backing_buffer; + int array_offset = 0; + char[] backing_buffer; /** * Allocates a new <code>CharBuffer</code> object with a given capacity. @@ -177,7 +177,7 @@ public abstract class CharBuffer extends Buffer if (offset < 0 || offset >= src.length || length < 0 - || length >= (src.length - offset)) + || length > (src.length - offset)) throw new IndexOutOfBoundsException (); // Put nothing into this buffer when not enough space left. @@ -361,7 +361,12 @@ public abstract class CharBuffer extends Buffer */ public String toString () { - return new String (array (), position (), length ()); + if (hasArray ()) + return new String (array (), position (), length ()); + + char[] buf = new char [length ()]; + get (buf); + return new String (buf); } /** @@ -409,7 +414,7 @@ public abstract class CharBuffer extends Buffer */ public final CharBuffer put (String str) { - return put (str, 0, str.length ()); + return put (str.toCharArray (), 0, str.length ()); } /** diff --git a/libjava/java/nio/DoubleBuffer.java b/libjava/java/nio/DoubleBuffer.java index 27f3a16d34e..ef39ac10048 100644 --- a/libjava/java/nio/DoubleBuffer.java +++ b/libjava/java/nio/DoubleBuffer.java @@ -41,8 +41,8 @@ import gnu.java.nio.DoubleBufferImpl; public abstract class DoubleBuffer extends Buffer implements Comparable { - protected double [] backing_buffer; - protected int array_offset; + int array_offset; + double[] backing_buffer; public static DoubleBuffer allocateDirect(int capacity) { @@ -108,7 +108,7 @@ public abstract class DoubleBuffer extends Buffer implements Comparable public DoubleBuffer put (double[] src, int offset, int length) { for (int i = offset; i < offset + length; i++) - put(src[i]); + put (src [i]); return this; } diff --git a/libjava/java/nio/FloatBuffer.java b/libjava/java/nio/FloatBuffer.java index 16c92d61023..81feb456e15 100644 --- a/libjava/java/nio/FloatBuffer.java +++ b/libjava/java/nio/FloatBuffer.java @@ -41,8 +41,8 @@ import gnu.java.nio.FloatBufferImpl; public abstract class FloatBuffer extends Buffer implements Comparable { - protected float [] backing_buffer; - protected int array_offset; + int array_offset; + float[] backing_buffer; public static FloatBuffer allocateDirect(int capacity) { diff --git a/libjava/java/nio/IntBuffer.java b/libjava/java/nio/IntBuffer.java index 18e353b2013..295ad6a1d8b 100644 --- a/libjava/java/nio/IntBuffer.java +++ b/libjava/java/nio/IntBuffer.java @@ -41,8 +41,8 @@ import gnu.java.nio.IntBufferImpl; public abstract class IntBuffer extends Buffer implements Comparable { - protected int [] backing_buffer; - protected int array_offset; + int array_offset; + int[] backing_buffer; public static IntBuffer allocateDirect(int capacity) { diff --git a/libjava/java/nio/LongBuffer.java b/libjava/java/nio/LongBuffer.java index 8b737194d0c..35978544832 100644 --- a/libjava/java/nio/LongBuffer.java +++ b/libjava/java/nio/LongBuffer.java @@ -41,8 +41,8 @@ import gnu.java.nio.LongBufferImpl; public abstract class LongBuffer extends Buffer implements Comparable { - protected long [] backing_buffer; - protected int array_offset; + int array_offset; + long[] backing_buffer; public static LongBuffer allocateDirect(int capacity) { diff --git a/libjava/java/nio/ShortBuffer.java b/libjava/java/nio/ShortBuffer.java index 8c5915dc148..5e449f8308d 100644 --- a/libjava/java/nio/ShortBuffer.java +++ b/libjava/java/nio/ShortBuffer.java @@ -41,8 +41,8 @@ import gnu.java.nio.ShortBufferImpl; public abstract class ShortBuffer extends Buffer implements Comparable { - protected short [] backing_buffer; - protected int array_offset; + int array_offset; + short[] backing_buffer; public static ShortBuffer allocateDirect(int capacity) { diff --git a/libjava/java/security/Identity.java b/libjava/java/security/Identity.java index d44e96cc213..57ccc83e056 100644 --- a/libjava/java/security/Identity.java +++ b/libjava/java/security/Identity.java @@ -69,7 +69,7 @@ import java.util.Vector; */ public abstract class Identity implements Principal, Serializable { - static final long serialVersionUID = 3609922007826600659L; + private static final long serialVersionUID = 3609922007826600659L; private String name; private IdentityScope scope; diff --git a/libjava/java/security/IdentityScope.java b/libjava/java/security/IdentityScope.java index 200b3c6867a..88e00fc81c0 100644 --- a/libjava/java/security/IdentityScope.java +++ b/libjava/java/security/IdentityScope.java @@ -70,7 +70,7 @@ import java.util.Enumeration; */ public abstract class IdentityScope extends Identity { - static final long serialVersionUID = -2337346281189773310L; + private static final long serialVersionUID = -2337346281189773310L; private static IdentityScope systemScope = null; /** diff --git a/libjava/java/security/Key.java b/libjava/java/security/Key.java index 195e50bb527..ee2be037588 100644 --- a/libjava/java/security/Key.java +++ b/libjava/java/security/Key.java @@ -64,7 +64,7 @@ public interface Key extends Serializable /** * The version identifier used for serialization. */ - long serialVersionUID = 6603384152749567654L; + public static final long serialVersionUID = 6603384152749567654L; /** * This method returns the name of the algorithm for this key. This is a diff --git a/libjava/java/security/KeyPair.java b/libjava/java/security/KeyPair.java index c502add5002..a2b2fba76e5 100644 --- a/libjava/java/security/KeyPair.java +++ b/libjava/java/security/KeyPair.java @@ -48,7 +48,7 @@ import java.io.Serializable; */ public final class KeyPair implements Serializable { - static final long serialVersionUID = -7565189502268009837L; + private static final long serialVersionUID = -7565189502268009837L; private PublicKey publicKey; private PrivateKey privateKey; diff --git a/libjava/java/security/PrivateKey.java b/libjava/java/security/PrivateKey.java index 40b97f58b9a..53d898318d1 100644 --- a/libjava/java/security/PrivateKey.java +++ b/libjava/java/security/PrivateKey.java @@ -58,5 +58,5 @@ public interface PrivateKey extends Key /** * The version identifier used for serialization. */ - long serialVersionUID = 6034044314589513430L; + public static final long serialVersionUID = 6034044314589513430L; } // interface PrivateKey diff --git a/libjava/java/security/Provider.java b/libjava/java/security/Provider.java index 4b574b4da05..7a2bd66bb3c 100644 --- a/libjava/java/security/Provider.java +++ b/libjava/java/security/Provider.java @@ -56,7 +56,7 @@ import java.util.Properties; */ public abstract class Provider extends Properties implements Serializable { - static final long serialVersionUID = -4298000515446427739L; + private static final long serialVersionUID = -4298000515446427739L; /** * This is a textual description of the provider diff --git a/libjava/java/security/PublicKey.java b/libjava/java/security/PublicKey.java index 81ab764615f..9b013ec0a60 100644 --- a/libjava/java/security/PublicKey.java +++ b/libjava/java/security/PublicKey.java @@ -56,5 +56,5 @@ public interface PublicKey extends Key /** * The version identifier used for serialization. */ - long serialVersionUID = 7187392471159151072L; + public static final long serialVersionUID = 7187392471159151072L; } // interface PublicKey diff --git a/libjava/java/security/SecureRandom.java b/libjava/java/security/SecureRandom.java index 022d014cf1c..56f4b22672c 100644 --- a/libjava/java/security/SecureRandom.java +++ b/libjava/java/security/SecureRandom.java @@ -62,7 +62,7 @@ public class SecureRandom extends Random /** Service name for PRNGs. */ private static final String SECURE_RANDOM = "SecureRandom"; - static final long serialVersionUID = 4940670005562187L; + private static final long serialVersionUID = 4940670005562187L; //Serialized Field long counter = 0; //Serialized diff --git a/libjava/java/security/SecureRandomSpi.java b/libjava/java/security/SecureRandomSpi.java index 1586994d596..6831173688f 100644 --- a/libjava/java/security/SecureRandomSpi.java +++ b/libjava/java/security/SecureRandomSpi.java @@ -50,7 +50,7 @@ import java.io.Serializable; */ public abstract class SecureRandomSpi implements Serializable { - static final long serialVersionUID = -2991854161009191830L; + private static final long serialVersionUID = -2991854161009191830L; /** Default Constructor for SecureRandomSpi diff --git a/libjava/java/security/SignedObject.java b/libjava/java/security/SignedObject.java index 6a8d612b7fc..270936ba686 100644 --- a/libjava/java/security/SignedObject.java +++ b/libjava/java/security/SignedObject.java @@ -129,7 +129,7 @@ import java.io.Serializable; */ public final class SignedObject implements Serializable { - static final long serialVersionUID = 720502720485447167L; + private static final long serialVersionUID = 720502720485447167L; /** @serial */ private byte[] content; diff --git a/libjava/java/security/Signer.java b/libjava/java/security/Signer.java index b5b3aaf19aa..425933a8cea 100644 --- a/libjava/java/security/Signer.java +++ b/libjava/java/security/Signer.java @@ -52,7 +52,7 @@ package java.security; */ public abstract class Signer extends Identity { - static final long serialVersionUID = -1763464102261361480L; + private static final long serialVersionUID = -1763464102261361480L; private PrivateKey privateKey = null; /** diff --git a/libjava/java/security/cert/Certificate.java b/libjava/java/security/cert/Certificate.java index bcb206d0c7a..f4aff41d35e 100644 --- a/libjava/java/security/cert/Certificate.java +++ b/libjava/java/security/cert/Certificate.java @@ -47,6 +47,7 @@ import java.io.ObjectInputStream; import java.io.ByteArrayInputStream; import java.io.InvalidObjectException; import java.io.ObjectStreamException; +import java.io.Serializable; /** * The Certificate class is an abstract class used to manage @@ -71,9 +72,9 @@ import java.io.ObjectStreamException; * @author Mark Benvenuto * @author Casey Marshall */ -public abstract class Certificate +public abstract class Certificate implements Serializable { - static final long serialVersionUID = -6751606818319535583L; + private static final long serialVersionUID = -6751606818319535583L; private String type; @@ -227,7 +228,7 @@ public abstract class Certificate * @throws ObjectStreamException If the replacement could not be * created. */ - public Object writeReplace() throws ObjectStreamException + protected Object writeReplace() throws ObjectStreamException { try { diff --git a/libjava/java/security/cert/PKIXCertPathBuilderResult.java b/libjava/java/security/cert/PKIXCertPathBuilderResult.java index e423f64df4c..4c9cd67f52d 100644 --- a/libjava/java/security/cert/PKIXCertPathBuilderResult.java +++ b/libjava/java/security/cert/PKIXCertPathBuilderResult.java @@ -47,6 +47,7 @@ package java.security.cert; * @see CertPathBuilderResult */ public class PKIXCertPathBuilderResult extends PKIXCertPathValidatorResult + implements CertPathBuilderResult { // Fields. diff --git a/libjava/java/security/cert/X509Certificate.java b/libjava/java/security/cert/X509Certificate.java index cce1e535cc4..413fea08ca3 100644 --- a/libjava/java/security/cert/X509Certificate.java +++ b/libjava/java/security/cert/X509Certificate.java @@ -142,6 +142,7 @@ import java.util.Date; */ public abstract class X509Certificate extends Certificate implements X509Extension { + private static final long serialVersionUID = -2491127588187038216L; /** * Constructs a new certificate of the specified type. diff --git a/libjava/javax/swing/plaf/ButtonUI.java b/libjava/javax/swing/plaf/ButtonUI.java index 74fd1924416..56599af7709 100644 --- a/libjava/javax/swing/plaf/ButtonUI.java +++ b/libjava/javax/swing/plaf/ButtonUI.java @@ -1,3 +1,41 @@ +/* ButtonUI.java + Copyright (C) 2002 Free Software Foundation, Inc. + +This file is part of GNU Classpath. + +GNU Classpath is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +GNU Classpath is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with GNU Classpath; see the file COPYING. If not, write to the +Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA +02111-1307 USA. + +Linking this library statically or dynamically with other modules is +making a combined work based on this library. Thus, the terms and +conditions of the GNU General Public License cover the whole +combination. + +As a special exception, the copyright holders of this library give you +permission to link this library with independent modules to produce an +executable, regardless of the license terms of these independent +modules, and to copy and distribute the resulting executable under +terms of your choice, provided that you also meet, for each linked +independent module, the terms and conditions of the license of that +module. An independent module is a module which is not derived from +or based on this library. If you modify this library, you may extend +this exception to your version of the library, but you are not +obligated to do so. If you do not wish to do so, delete this +exception statement from your version. */ + + package javax.swing.plaf; public class ButtonUI extends ComponentUI diff --git a/libjava/javax/swing/plaf/ColorUIResource.java b/libjava/javax/swing/plaf/ColorUIResource.java index 86ac7b1e5a2..18b6b83a3fe 100644 --- a/libjava/javax/swing/plaf/ColorUIResource.java +++ b/libjava/javax/swing/plaf/ColorUIResource.java @@ -1,3 +1,41 @@ +/* ColorUIResource.java + Copyright (C) 2002 Free Software Foundation, Inc. + +This file is part of GNU Classpath. + +GNU Classpath is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +GNU Classpath is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with GNU Classpath; see the file COPYING. If not, write to the +Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA +02111-1307 USA. + +Linking this library statically or dynamically with other modules is +making a combined work based on this library. Thus, the terms and +conditions of the GNU General Public License cover the whole +combination. + +As a special exception, the copyright holders of this library give you +permission to link this library with independent modules to produce an +executable, regardless of the license terms of these independent +modules, and to copy and distribute the resulting executable under +terms of your choice, provided that you also meet, for each linked +independent module, the terms and conditions of the license of that +module. An independent module is a module which is not derived from +or based on this library. If you modify this library, you may extend +this exception to your version of the library, but you are not +obligated to do so. If you do not wish to do so, delete this +exception statement from your version. */ + + package javax.swing.plaf; import java.awt.Color; /** diff --git a/libjava/javax/swing/plaf/ComponentUI.java b/libjava/javax/swing/plaf/ComponentUI.java index cdccbabbe48..dba15f71c4f 100644 --- a/libjava/javax/swing/plaf/ComponentUI.java +++ b/libjava/javax/swing/plaf/ComponentUI.java @@ -1,3 +1,41 @@ +/* ComponentUI.java + Copyright (C) 2002 Free Software Foundation, Inc. + +This file is part of GNU Classpath. + +GNU Classpath is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +GNU Classpath is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with GNU Classpath; see the file COPYING. If not, write to the +Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA +02111-1307 USA. + +Linking this library statically or dynamically with other modules is +making a combined work based on this library. Thus, the terms and +conditions of the GNU General Public License cover the whole +combination. + +As a special exception, the copyright holders of this library give you +permission to link this library with independent modules to produce an +executable, regardless of the license terms of these independent +modules, and to copy and distribute the resulting executable under +terms of your choice, provided that you also meet, for each linked +independent module, the terms and conditions of the license of that +module. An independent module is a module which is not derived from +or based on this library. If you modify this library, you may extend +this exception to your version of the library, but you are not +obligated to do so. If you do not wish to do so, delete this +exception statement from your version. */ + + package javax.swing.plaf; import java.awt.*; diff --git a/libjava/javax/swing/plaf/DimensionUIResource.java b/libjava/javax/swing/plaf/DimensionUIResource.java index 5fe2ec8e170..52ea7a912f6 100644 --- a/libjava/javax/swing/plaf/DimensionUIResource.java +++ b/libjava/javax/swing/plaf/DimensionUIResource.java @@ -1,3 +1,41 @@ +/* DimensionUIResource.java + Copyright (C) 2002 Free Software Foundation, Inc. + +This file is part of GNU Classpath. + +GNU Classpath is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +GNU Classpath is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with GNU Classpath; see the file COPYING. If not, write to the +Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA +02111-1307 USA. + +Linking this library statically or dynamically with other modules is +making a combined work based on this library. Thus, the terms and +conditions of the GNU General Public License cover the whole +combination. + +As a special exception, the copyright holders of this library give you +permission to link this library with independent modules to produce an +executable, regardless of the license terms of these independent +modules, and to copy and distribute the resulting executable under +terms of your choice, provided that you also meet, for each linked +independent module, the terms and conditions of the license of that +module. An independent module is a module which is not derived from +or based on this library. If you modify this library, you may extend +this exception to your version of the library, but you are not +obligated to do so. If you do not wish to do so, delete this +exception statement from your version. */ + + package javax.swing.plaf; import java.awt.Dimension; /** diff --git a/libjava/javax/swing/plaf/FontUIResource.java b/libjava/javax/swing/plaf/FontUIResource.java index 46bca96e483..e158ced7403 100644 --- a/libjava/javax/swing/plaf/FontUIResource.java +++ b/libjava/javax/swing/plaf/FontUIResource.java @@ -1,3 +1,41 @@ +/* FontUIResource.java + Copyright (C) 2002 Free Software Foundation, Inc. + +This file is part of GNU Classpath. + +GNU Classpath is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +GNU Classpath is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with GNU Classpath; see the file COPYING. If not, write to the +Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA +02111-1307 USA. + +Linking this library statically or dynamically with other modules is +making a combined work based on this library. Thus, the terms and +conditions of the GNU General Public License cover the whole +combination. + +As a special exception, the copyright holders of this library give you +permission to link this library with independent modules to produce an +executable, regardless of the license terms of these independent +modules, and to copy and distribute the resulting executable under +terms of your choice, provided that you also meet, for each linked +independent module, the terms and conditions of the license of that +module. An independent module is a module which is not derived from +or based on this library. If you modify this library, you may extend +this exception to your version of the library, but you are not +obligated to do so. If you do not wish to do so, delete this +exception statement from your version. */ + + package javax.swing.plaf; import java.awt.Font; /** diff --git a/libjava/javax/swing/plaf/IconUIResource.java b/libjava/javax/swing/plaf/IconUIResource.java index 02f1ea0725c..2d948d7823d 100644 --- a/libjava/javax/swing/plaf/IconUIResource.java +++ b/libjava/javax/swing/plaf/IconUIResource.java @@ -1,3 +1,41 @@ +/* IconUIResource.java + Copyright (C) 2002 Free Software Foundation, Inc. + +This file is part of GNU Classpath. + +GNU Classpath is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +GNU Classpath is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with GNU Classpath; see the file COPYING. If not, write to the +Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA +02111-1307 USA. + +Linking this library statically or dynamically with other modules is +making a combined work based on this library. Thus, the terms and +conditions of the GNU General Public License cover the whole +combination. + +As a special exception, the copyright holders of this library give you +permission to link this library with independent modules to produce an +executable, regardless of the license terms of these independent +modules, and to copy and distribute the resulting executable under +terms of your choice, provided that you also meet, for each linked +independent module, the terms and conditions of the license of that +module. An independent module is a module which is not derived from +or based on this library. If you modify this library, you may extend +this exception to your version of the library, but you are not +obligated to do so. If you do not wish to do so, delete this +exception statement from your version. */ + + package javax.swing.plaf; import java.awt.Component; import java.awt.Graphics; @@ -8,6 +46,8 @@ import javax.swing.Icon; */ public class IconUIResource implements Icon, UIResource, Serializable { + static final long serialVersionUID = 3327049506004830542L; + public IconUIResource(Icon delegate) { } diff --git a/libjava/javax/swing/plaf/InsetsUIResource.java b/libjava/javax/swing/plaf/InsetsUIResource.java index 4c5e3183a7b..7c989ab2ee0 100644 --- a/libjava/javax/swing/plaf/InsetsUIResource.java +++ b/libjava/javax/swing/plaf/InsetsUIResource.java @@ -1,3 +1,41 @@ +/* InsetsUIResource.java + Copyright (C) 2002 Free Software Foundation, Inc. + +This file is part of GNU Classpath. + +GNU Classpath is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +GNU Classpath is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with GNU Classpath; see the file COPYING. If not, write to the +Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA +02111-1307 USA. + +Linking this library statically or dynamically with other modules is +making a combined work based on this library. Thus, the terms and +conditions of the GNU General Public License cover the whole +combination. + +As a special exception, the copyright holders of this library give you +permission to link this library with independent modules to produce an +executable, regardless of the license terms of these independent +modules, and to copy and distribute the resulting executable under +terms of your choice, provided that you also meet, for each linked +independent module, the terms and conditions of the license of that +module. An independent module is a module which is not derived from +or based on this library. If you modify this library, you may extend +this exception to your version of the library, but you are not +obligated to do so. If you do not wish to do so, delete this +exception statement from your version. */ + + package javax.swing.plaf; import java.awt.Insets; /** diff --git a/libjava/javax/swing/plaf/LabelUI.java b/libjava/javax/swing/plaf/LabelUI.java index 759550abdf7..dc70ae284a8 100644 --- a/libjava/javax/swing/plaf/LabelUI.java +++ b/libjava/javax/swing/plaf/LabelUI.java @@ -1,3 +1,41 @@ +/* LabelUI.java + Copyright (C) 2002 Free Software Foundation, Inc. + +This file is part of GNU Classpath. + +GNU Classpath is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +GNU Classpath is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with GNU Classpath; see the file COPYING. If not, write to the +Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA +02111-1307 USA. + +Linking this library statically or dynamically with other modules is +making a combined work based on this library. Thus, the terms and +conditions of the GNU General Public License cover the whole +combination. + +As a special exception, the copyright holders of this library give you +permission to link this library with independent modules to produce an +executable, regardless of the license terms of these independent +modules, and to copy and distribute the resulting executable under +terms of your choice, provided that you also meet, for each linked +independent module, the terms and conditions of the license of that +module. An independent module is a module which is not derived from +or based on this library. If you modify this library, you may extend +this exception to your version of the library, but you are not +obligated to do so. If you do not wish to do so, delete this +exception statement from your version. */ + + package javax.swing.plaf; diff --git a/libjava/javax/swing/plaf/ListUI.java b/libjava/javax/swing/plaf/ListUI.java index 69c2396d08a..be60eb4863b 100644 --- a/libjava/javax/swing/plaf/ListUI.java +++ b/libjava/javax/swing/plaf/ListUI.java @@ -1,3 +1,41 @@ +/* ListUI.java + Copyright (C) 2002 Free Software Foundation, Inc. + +This file is part of GNU Classpath. + +GNU Classpath is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +GNU Classpath is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with GNU Classpath; see the file COPYING. If not, write to the +Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA +02111-1307 USA. + +Linking this library statically or dynamically with other modules is +making a combined work based on this library. Thus, the terms and +conditions of the GNU General Public License cover the whole +combination. + +As a special exception, the copyright holders of this library give you +permission to link this library with independent modules to produce an +executable, regardless of the license terms of these independent +modules, and to copy and distribute the resulting executable under +terms of your choice, provided that you also meet, for each linked +independent module, the terms and conditions of the license of that +module. An independent module is a module which is not derived from +or based on this library. If you modify this library, you may extend +this exception to your version of the library, but you are not +obligated to do so. If you do not wish to do so, delete this +exception statement from your version. */ + + package javax.swing.plaf; diff --git a/libjava/javax/swing/plaf/OptionPaneUI.java b/libjava/javax/swing/plaf/OptionPaneUI.java index 01a10d1f2f1..94de7943292 100644 --- a/libjava/javax/swing/plaf/OptionPaneUI.java +++ b/libjava/javax/swing/plaf/OptionPaneUI.java @@ -1,3 +1,41 @@ +/* OptionPaneUI.java + Copyright (C) 2002 Free Software Foundation, Inc. + +This file is part of GNU Classpath. + +GNU Classpath is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +GNU Classpath is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with GNU Classpath; see the file COPYING. If not, write to the +Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA +02111-1307 USA. + +Linking this library statically or dynamically with other modules is +making a combined work based on this library. Thus, the terms and +conditions of the GNU General Public License cover the whole +combination. + +As a special exception, the copyright holders of this library give you +permission to link this library with independent modules to produce an +executable, regardless of the license terms of these independent +modules, and to copy and distribute the resulting executable under +terms of your choice, provided that you also meet, for each linked +independent module, the terms and conditions of the license of that +module. An independent module is a module which is not derived from +or based on this library. If you modify this library, you may extend +this exception to your version of the library, but you are not +obligated to do so. If you do not wish to do so, delete this +exception statement from your version. */ + + package javax.swing.plaf; import javax.accessibility.*; diff --git a/libjava/javax/swing/plaf/PanelUI.java b/libjava/javax/swing/plaf/PanelUI.java index b884acec3d0..8a418342e82 100644 --- a/libjava/javax/swing/plaf/PanelUI.java +++ b/libjava/javax/swing/plaf/PanelUI.java @@ -1,3 +1,41 @@ +/* PanelUI.java + Copyright (C) 2002 Free Software Foundation, Inc. + +This file is part of GNU Classpath. + +GNU Classpath is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +GNU Classpath is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with GNU Classpath; see the file COPYING. If not, write to the +Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA +02111-1307 USA. + +Linking this library statically or dynamically with other modules is +making a combined work based on this library. Thus, the terms and +conditions of the GNU General Public License cover the whole +combination. + +As a special exception, the copyright holders of this library give you +permission to link this library with independent modules to produce an +executable, regardless of the license terms of these independent +modules, and to copy and distribute the resulting executable under +terms of your choice, provided that you also meet, for each linked +independent module, the terms and conditions of the license of that +module. An independent module is a module which is not derived from +or based on this library. If you modify this library, you may extend +this exception to your version of the library, but you are not +obligated to do so. If you do not wish to do so, delete this +exception statement from your version. */ + + package javax.swing.plaf; diff --git a/libjava/javax/swing/plaf/TabbedPaneUI.java b/libjava/javax/swing/plaf/TabbedPaneUI.java index 748ab580224..a9211c96705 100644 --- a/libjava/javax/swing/plaf/TabbedPaneUI.java +++ b/libjava/javax/swing/plaf/TabbedPaneUI.java @@ -1,3 +1,41 @@ +/* TabbedPaneUI.java + Copyright (C) 2002 Free Software Foundation, Inc. + +This file is part of GNU Classpath. + +GNU Classpath is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +GNU Classpath is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with GNU Classpath; see the file COPYING. If not, write to the +Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA +02111-1307 USA. + +Linking this library statically or dynamically with other modules is +making a combined work based on this library. Thus, the terms and +conditions of the GNU General Public License cover the whole +combination. + +As a special exception, the copyright holders of this library give you +permission to link this library with independent modules to produce an +executable, regardless of the license terms of these independent +modules, and to copy and distribute the resulting executable under +terms of your choice, provided that you also meet, for each linked +independent module, the terms and conditions of the license of that +module. An independent module is a module which is not derived from +or based on this library. If you modify this library, you may extend +this exception to your version of the library, but you are not +obligated to do so. If you do not wish to do so, delete this +exception statement from your version. */ + + package javax.swing.plaf; import java.awt.*; diff --git a/libjava/javax/swing/plaf/TextUI.java b/libjava/javax/swing/plaf/TextUI.java index 46fa2ca61b5..abf5316d215 100644 --- a/libjava/javax/swing/plaf/TextUI.java +++ b/libjava/javax/swing/plaf/TextUI.java @@ -1,3 +1,41 @@ +/* TextUI.java + Copyright (C) 2002 Free Software Foundation, Inc. + +This file is part of GNU Classpath. + +GNU Classpath is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +GNU Classpath is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with GNU Classpath; see the file COPYING. If not, write to the +Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA +02111-1307 USA. + +Linking this library statically or dynamically with other modules is +making a combined work based on this library. Thus, the terms and +conditions of the GNU General Public License cover the whole +combination. + +As a special exception, the copyright holders of this library give you +permission to link this library with independent modules to produce an +executable, regardless of the license terms of these independent +modules, and to copy and distribute the resulting executable under +terms of your choice, provided that you also meet, for each linked +independent module, the terms and conditions of the license of that +module. An independent module is a module which is not derived from +or based on this library. If you modify this library, you may extend +this exception to your version of the library, but you are not +obligated to do so. If you do not wish to do so, delete this +exception statement from your version. */ + + package javax.swing.plaf; import javax.swing.text.*; diff --git a/libjava/javax/swing/plaf/TreeUI.java b/libjava/javax/swing/plaf/TreeUI.java index 48323750dc1..f5f884fca2a 100644 --- a/libjava/javax/swing/plaf/TreeUI.java +++ b/libjava/javax/swing/plaf/TreeUI.java @@ -1,3 +1,41 @@ +/* TreeUI.java + Copyright (C) 2002 Free Software Foundation, Inc. + +This file is part of GNU Classpath. + +GNU Classpath is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +GNU Classpath is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with GNU Classpath; see the file COPYING. If not, write to the +Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA +02111-1307 USA. + +Linking this library statically or dynamically with other modules is +making a combined work based on this library. Thus, the terms and +conditions of the GNU General Public License cover the whole +combination. + +As a special exception, the copyright holders of this library give you +permission to link this library with independent modules to produce an +executable, regardless of the license terms of these independent +modules, and to copy and distribute the resulting executable under +terms of your choice, provided that you also meet, for each linked +independent module, the terms and conditions of the license of that +module. An independent module is a module which is not derived from +or based on this library. If you modify this library, you may extend +this exception to your version of the library, but you are not +obligated to do so. If you do not wish to do so, delete this +exception statement from your version. */ + + package javax.swing.plaf; diff --git a/libjava/javax/swing/plaf/ViewportUI.java b/libjava/javax/swing/plaf/ViewportUI.java index 5562973910a..f9a8476936b 100644 --- a/libjava/javax/swing/plaf/ViewportUI.java +++ b/libjava/javax/swing/plaf/ViewportUI.java @@ -1,3 +1,41 @@ +/* ViewportUI.java + Copyright (C) 2002 Free Software Foundation, Inc. + +This file is part of GNU Classpath. + +GNU Classpath is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +GNU Classpath is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with GNU Classpath; see the file COPYING. If not, write to the +Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA +02111-1307 USA. + +Linking this library statically or dynamically with other modules is +making a combined work based on this library. Thus, the terms and +conditions of the GNU General Public License cover the whole +combination. + +As a special exception, the copyright holders of this library give you +permission to link this library with independent modules to produce an +executable, regardless of the license terms of these independent +modules, and to copy and distribute the resulting executable under +terms of your choice, provided that you also meet, for each linked +independent module, the terms and conditions of the license of that +module. An independent module is a module which is not derived from +or based on this library. If you modify this library, you may extend +this exception to your version of the library, but you are not +obligated to do so. If you do not wish to do so, delete this +exception statement from your version. */ + + package javax.swing.plaf; diff --git a/libjava/javax/swing/plaf/basic/BasicBorders.java b/libjava/javax/swing/plaf/basic/BasicBorders.java index 80d66a72b80..3b2f2d128e1 100644 --- a/libjava/javax/swing/plaf/basic/BasicBorders.java +++ b/libjava/javax/swing/plaf/basic/BasicBorders.java @@ -1,3 +1,41 @@ +/* BasicBorders.java + Copyright (C) 2002 Free Software Foundation, Inc. + +This file is part of GNU Classpath. + +GNU Classpath is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +GNU Classpath is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with GNU Classpath; see the file COPYING. If not, write to the +Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA +02111-1307 USA. + +Linking this library statically or dynamically with other modules is +making a combined work based on this library. Thus, the terms and +conditions of the GNU General Public License cover the whole +combination. + +As a special exception, the copyright holders of this library give you +permission to link this library with independent modules to produce an +executable, regardless of the license terms of these independent +modules, and to copy and distribute the resulting executable under +terms of your choice, provided that you also meet, for each linked +independent module, the terms and conditions of the license of that +module. An independent module is a module which is not derived from +or based on this library. If you modify this library, you may extend +this exception to your version of the library, but you are not +obligated to do so. If you do not wish to do so, delete this +exception statement from your version. */ + + package javax.swing.plaf.basic; import java.awt.Color; /** diff --git a/libjava/javax/swing/plaf/basic/BasicButtonUI.java b/libjava/javax/swing/plaf/basic/BasicButtonUI.java index 88ac6f25ae2..3f67c512874 100644 --- a/libjava/javax/swing/plaf/basic/BasicButtonUI.java +++ b/libjava/javax/swing/plaf/basic/BasicButtonUI.java @@ -1,3 +1,41 @@ +/* BasicButtonUI.java + Copyright (C) 2002 Free Software Foundation, Inc. + +This file is part of GNU Classpath. + +GNU Classpath is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +GNU Classpath is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with GNU Classpath; see the file COPYING. If not, write to the +Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA +02111-1307 USA. + +Linking this library statically or dynamically with other modules is +making a combined work based on this library. Thus, the terms and +conditions of the GNU General Public License cover the whole +combination. + +As a special exception, the copyright holders of this library give you +permission to link this library with independent modules to produce an +executable, regardless of the license terms of these independent +modules, and to copy and distribute the resulting executable under +terms of your choice, provided that you also meet, for each linked +independent module, the terms and conditions of the license of that +module. An independent module is a module which is not derived from +or based on this library. If you modify this library, you may extend +this exception to your version of the library, but you are not +obligated to do so. If you do not wish to do so, delete this +exception statement from your version. */ + + package javax.swing.plaf.basic; import javax.swing.*; diff --git a/libjava/javax/swing/plaf/basic/BasicCheckBoxUI.java b/libjava/javax/swing/plaf/basic/BasicCheckBoxUI.java index 1a84b1faa2c..25fb0180b2a 100644 --- a/libjava/javax/swing/plaf/basic/BasicCheckBoxUI.java +++ b/libjava/javax/swing/plaf/basic/BasicCheckBoxUI.java @@ -1,3 +1,41 @@ +/* BasicCheckBoxUI.java + Copyright (C) 2002 Free Software Foundation, Inc. + +This file is part of GNU Classpath. + +GNU Classpath is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +GNU Classpath is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with GNU Classpath; see the file COPYING. If not, write to the +Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA +02111-1307 USA. + +Linking this library statically or dynamically with other modules is +making a combined work based on this library. Thus, the terms and +conditions of the GNU General Public License cover the whole +combination. + +As a special exception, the copyright holders of this library give you +permission to link this library with independent modules to produce an +executable, regardless of the license terms of these independent +modules, and to copy and distribute the resulting executable under +terms of your choice, provided that you also meet, for each linked +independent module, the terms and conditions of the license of that +module. An independent module is a module which is not derived from +or based on this library. If you modify this library, you may extend +this exception to your version of the library, but you are not +obligated to do so. If you do not wish to do so, delete this +exception statement from your version. */ + + package javax.swing.plaf.basic; import javax.swing.*; diff --git a/libjava/javax/swing/plaf/basic/BasicDefaults.java b/libjava/javax/swing/plaf/basic/BasicDefaults.java index b3dd865ce8b..5bfb5d96106 100644 --- a/libjava/javax/swing/plaf/basic/BasicDefaults.java +++ b/libjava/javax/swing/plaf/basic/BasicDefaults.java @@ -1,3 +1,41 @@ +/* BasicDefaults.java + Copyright (C) 2002 Free Software Foundation, Inc. + +This file is part of GNU Classpath. + +GNU Classpath is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +GNU Classpath is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with GNU Classpath; see the file COPYING. If not, write to the +Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA +02111-1307 USA. + +Linking this library statically or dynamically with other modules is +making a combined work based on this library. Thus, the terms and +conditions of the GNU General Public License cover the whole +combination. + +As a special exception, the copyright holders of this library give you +permission to link this library with independent modules to produce an +executable, regardless of the license terms of these independent +modules, and to copy and distribute the resulting executable under +terms of your choice, provided that you also meet, for each linked +independent module, the terms and conditions of the license of that +module. An independent module is a module which is not derived from +or based on this library. If you modify this library, you may extend +this exception to your version of the library, but you are not +obligated to do so. If you do not wish to do so, delete this +exception statement from your version. */ + + package javax.swing.plaf.basic; import javax.swing.*; diff --git a/libjava/javax/swing/plaf/basic/BasicGraphicsUtils.java b/libjava/javax/swing/plaf/basic/BasicGraphicsUtils.java index 10b7209f5dd..55e9728567a 100644 --- a/libjava/javax/swing/plaf/basic/BasicGraphicsUtils.java +++ b/libjava/javax/swing/plaf/basic/BasicGraphicsUtils.java @@ -1,3 +1,41 @@ +/* BasicGraphicsUtils.java + Copyright (C) 2002 Free Software Foundation, Inc. + +This file is part of GNU Classpath. + +GNU Classpath is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +GNU Classpath is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with GNU Classpath; see the file COPYING. If not, write to the +Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA +02111-1307 USA. + +Linking this library statically or dynamically with other modules is +making a combined work based on this library. Thus, the terms and +conditions of the GNU General Public License cover the whole +combination. + +As a special exception, the copyright holders of this library give you +permission to link this library with independent modules to produce an +executable, regardless of the license terms of these independent +modules, and to copy and distribute the resulting executable under +terms of your choice, provided that you also meet, for each linked +independent module, the terms and conditions of the license of that +module. An independent module is a module which is not derived from +or based on this library. If you modify this library, you may extend +this exception to your version of the library, but you are not +obligated to do so. If you do not wish to do so, delete this +exception statement from your version. */ + + package javax.swing.plaf.basic; diff --git a/libjava/javax/swing/plaf/basic/BasicIconFactory.java b/libjava/javax/swing/plaf/basic/BasicIconFactory.java index 347a1cc8a8b..3a8adf3bf18 100644 --- a/libjava/javax/swing/plaf/basic/BasicIconFactory.java +++ b/libjava/javax/swing/plaf/basic/BasicIconFactory.java @@ -1,3 +1,41 @@ +/* BasicIconFactory.java + Copyright (C) 2002 Free Software Foundation, Inc. + +This file is part of GNU Classpath. + +GNU Classpath is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +GNU Classpath is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with GNU Classpath; see the file COPYING. If not, write to the +Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA +02111-1307 USA. + +Linking this library statically or dynamically with other modules is +making a combined work based on this library. Thus, the terms and +conditions of the GNU General Public License cover the whole +combination. + +As a special exception, the copyright holders of this library give you +permission to link this library with independent modules to produce an +executable, regardless of the license terms of these independent +modules, and to copy and distribute the resulting executable under +terms of your choice, provided that you also meet, for each linked +independent module, the terms and conditions of the license of that +module. An independent module is a module which is not derived from +or based on this library. If you modify this library, you may extend +this exception to your version of the library, but you are not +obligated to do so. If you do not wish to do so, delete this +exception statement from your version. */ + + package javax.swing.plaf.basic; import java.io.Serializable; @@ -7,6 +45,8 @@ import javax.swing.Icon; */ public class BasicIconFactory implements Serializable { + static final long serialVersionUID = 5605588811185324383L; + public BasicIconFactory() { } diff --git a/libjava/javax/swing/plaf/basic/BasicLabelUI.java b/libjava/javax/swing/plaf/basic/BasicLabelUI.java index 22bdc54aaab..82623a6d3f0 100644 --- a/libjava/javax/swing/plaf/basic/BasicLabelUI.java +++ b/libjava/javax/swing/plaf/basic/BasicLabelUI.java @@ -1,3 +1,41 @@ +/* BasicLabelUI.java + Copyright (C) 2002 Free Software Foundation, Inc. + +This file is part of GNU Classpath. + +GNU Classpath is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +GNU Classpath is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with GNU Classpath; see the file COPYING. If not, write to the +Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA +02111-1307 USA. + +Linking this library statically or dynamically with other modules is +making a combined work based on this library. Thus, the terms and +conditions of the GNU General Public License cover the whole +combination. + +As a special exception, the copyright holders of this library give you +permission to link this library with independent modules to produce an +executable, regardless of the license terms of these independent +modules, and to copy and distribute the resulting executable under +terms of your choice, provided that you also meet, for each linked +independent module, the terms and conditions of the license of that +module. An independent module is a module which is not derived from +or based on this library. If you modify this library, you may extend +this exception to your version of the library, but you are not +obligated to do so. If you do not wish to do so, delete this +exception statement from your version. */ + + package javax.swing.plaf.basic; import javax.swing.*; diff --git a/libjava/javax/swing/plaf/basic/BasicListUI.java b/libjava/javax/swing/plaf/basic/BasicListUI.java index abac5045031..24c40727155 100644 --- a/libjava/javax/swing/plaf/basic/BasicListUI.java +++ b/libjava/javax/swing/plaf/basic/BasicListUI.java @@ -1,3 +1,41 @@ +/* BasicListUI.java + Copyright (C) 2002 Free Software Foundation, Inc. + +This file is part of GNU Classpath. + +GNU Classpath is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +GNU Classpath is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with GNU Classpath; see the file COPYING. If not, write to the +Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA +02111-1307 USA. + +Linking this library statically or dynamically with other modules is +making a combined work based on this library. Thus, the terms and +conditions of the GNU General Public License cover the whole +combination. + +As a special exception, the copyright holders of this library give you +permission to link this library with independent modules to produce an +executable, regardless of the license terms of these independent +modules, and to copy and distribute the resulting executable under +terms of your choice, provided that you also meet, for each linked +independent module, the terms and conditions of the license of that +module. An independent module is a module which is not derived from +or based on this library. If you modify this library, you may extend +this exception to your version of the library, but you are not +obligated to do so. If you do not wish to do so, delete this +exception statement from your version. */ + + package javax.swing.plaf.basic; import javax.swing.plaf.*; diff --git a/libjava/javax/swing/plaf/basic/BasicOptionPaneUI.java b/libjava/javax/swing/plaf/basic/BasicOptionPaneUI.java index bfb6cbadfdc..e3023a85473 100644 --- a/libjava/javax/swing/plaf/basic/BasicOptionPaneUI.java +++ b/libjava/javax/swing/plaf/basic/BasicOptionPaneUI.java @@ -1,3 +1,41 @@ +/* BasicOptionPaneUI.java + Copyright (C) 2002 Free Software Foundation, Inc. + +This file is part of GNU Classpath. + +GNU Classpath is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +GNU Classpath is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with GNU Classpath; see the file COPYING. If not, write to the +Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA +02111-1307 USA. + +Linking this library statically or dynamically with other modules is +making a combined work based on this library. Thus, the terms and +conditions of the GNU General Public License cover the whole +combination. + +As a special exception, the copyright holders of this library give you +permission to link this library with independent modules to produce an +executable, regardless of the license terms of these independent +modules, and to copy and distribute the resulting executable under +terms of your choice, provided that you also meet, for each linked +independent module, the terms and conditions of the license of that +module. An independent module is a module which is not derived from +or based on this library. If you modify this library, you may extend +this exception to your version of the library, but you are not +obligated to do so. If you do not wish to do so, delete this +exception statement from your version. */ + + package javax.swing.plaf.basic; import java.awt.*; diff --git a/libjava/javax/swing/plaf/basic/BasicPanelUI.java b/libjava/javax/swing/plaf/basic/BasicPanelUI.java index 5976bd2a1f2..c84e607b477 100644 --- a/libjava/javax/swing/plaf/basic/BasicPanelUI.java +++ b/libjava/javax/swing/plaf/basic/BasicPanelUI.java @@ -1,3 +1,41 @@ +/* BasicPanelUI.java + Copyright (C) 2002 Free Software Foundation, Inc. + +This file is part of GNU Classpath. + +GNU Classpath is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +GNU Classpath is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with GNU Classpath; see the file COPYING. If not, write to the +Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA +02111-1307 USA. + +Linking this library statically or dynamically with other modules is +making a combined work based on this library. Thus, the terms and +conditions of the GNU General Public License cover the whole +combination. + +As a special exception, the copyright holders of this library give you +permission to link this library with independent modules to produce an +executable, regardless of the license terms of these independent +modules, and to copy and distribute the resulting executable under +terms of your choice, provided that you also meet, for each linked +independent module, the terms and conditions of the license of that +module. An independent module is a module which is not derived from +or based on this library. If you modify this library, you may extend +this exception to your version of the library, but you are not +obligated to do so. If you do not wish to do so, delete this +exception statement from your version. */ + + package javax.swing.plaf.basic; import javax.swing.*; diff --git a/libjava/javax/swing/plaf/basic/BasicRadioButtonUI.java b/libjava/javax/swing/plaf/basic/BasicRadioButtonUI.java index 4f8f9289828..0f7f6a0faf1 100644 --- a/libjava/javax/swing/plaf/basic/BasicRadioButtonUI.java +++ b/libjava/javax/swing/plaf/basic/BasicRadioButtonUI.java @@ -1,3 +1,41 @@ +/* BasicRadioButtonUI.java + Copyright (C) 2002 Free Software Foundation, Inc. + +This file is part of GNU Classpath. + +GNU Classpath is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +GNU Classpath is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with GNU Classpath; see the file COPYING. If not, write to the +Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA +02111-1307 USA. + +Linking this library statically or dynamically with other modules is +making a combined work based on this library. Thus, the terms and +conditions of the GNU General Public License cover the whole +combination. + +As a special exception, the copyright holders of this library give you +permission to link this library with independent modules to produce an +executable, regardless of the license terms of these independent +modules, and to copy and distribute the resulting executable under +terms of your choice, provided that you also meet, for each linked +independent module, the terms and conditions of the license of that +module. An independent module is a module which is not derived from +or based on this library. If you modify this library, you may extend +this exception to your version of the library, but you are not +obligated to do so. If you do not wish to do so, delete this +exception statement from your version. */ + + package javax.swing.plaf.basic; import javax.swing.*; diff --git a/libjava/javax/swing/plaf/basic/BasicScrollPaneUI.java b/libjava/javax/swing/plaf/basic/BasicScrollPaneUI.java index 8d50b046e2e..1ba6541d575 100644 --- a/libjava/javax/swing/plaf/basic/BasicScrollPaneUI.java +++ b/libjava/javax/swing/plaf/basic/BasicScrollPaneUI.java @@ -1,3 +1,41 @@ +/* BasicScrollPaneUI.java + Copyright (C) 2002 Free Software Foundation, Inc. + +This file is part of GNU Classpath. + +GNU Classpath is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +GNU Classpath is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with GNU Classpath; see the file COPYING. If not, write to the +Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA +02111-1307 USA. + +Linking this library statically or dynamically with other modules is +making a combined work based on this library. Thus, the terms and +conditions of the GNU General Public License cover the whole +combination. + +As a special exception, the copyright holders of this library give you +permission to link this library with independent modules to produce an +executable, regardless of the license terms of these independent +modules, and to copy and distribute the resulting executable under +terms of your choice, provided that you also meet, for each linked +independent module, the terms and conditions of the license of that +module. An independent module is a module which is not derived from +or based on this library. If you modify this library, you may extend +this exception to your version of the library, but you are not +obligated to do so. If you do not wish to do so, delete this +exception statement from your version. */ + + package javax.swing.plaf.basic; diff --git a/libjava/javax/swing/plaf/basic/BasicTabbedPaneUI.java b/libjava/javax/swing/plaf/basic/BasicTabbedPaneUI.java index 49328d26740..a5c813d62f7 100644 --- a/libjava/javax/swing/plaf/basic/BasicTabbedPaneUI.java +++ b/libjava/javax/swing/plaf/basic/BasicTabbedPaneUI.java @@ -1,3 +1,41 @@ +/* BasicTabbedPaneUI.java + Copyright (C) 2002 Free Software Foundation, Inc. + +This file is part of GNU Classpath. + +GNU Classpath is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +GNU Classpath is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with GNU Classpath; see the file COPYING. If not, write to the +Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA +02111-1307 USA. + +Linking this library statically or dynamically with other modules is +making a combined work based on this library. Thus, the terms and +conditions of the GNU General Public License cover the whole +combination. + +As a special exception, the copyright holders of this library give you +permission to link this library with independent modules to produce an +executable, regardless of the license terms of these independent +modules, and to copy and distribute the resulting executable under +terms of your choice, provided that you also meet, for each linked +independent module, the terms and conditions of the license of that +module. An independent module is a module which is not derived from +or based on this library. If you modify this library, you may extend +this exception to your version of the library, but you are not +obligated to do so. If you do not wish to do so, delete this +exception statement from your version. */ + + package javax.swing.plaf.basic; import javax.swing.*; diff --git a/libjava/javax/swing/plaf/basic/BasicTextUI.java b/libjava/javax/swing/plaf/basic/BasicTextUI.java index bdb6e4c3a36..66af1b65d50 100644 --- a/libjava/javax/swing/plaf/basic/BasicTextUI.java +++ b/libjava/javax/swing/plaf/basic/BasicTextUI.java @@ -1,3 +1,41 @@ +/* BasicTextUI.java + Copyright (C) 2002 Free Software Foundation, Inc. + +This file is part of GNU Classpath. + +GNU Classpath is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +GNU Classpath is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with GNU Classpath; see the file COPYING. If not, write to the +Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA +02111-1307 USA. + +Linking this library statically or dynamically with other modules is +making a combined work based on this library. Thus, the terms and +conditions of the GNU General Public License cover the whole +combination. + +As a special exception, the copyright holders of this library give you +permission to link this library with independent modules to produce an +executable, regardless of the license terms of these independent +modules, and to copy and distribute the resulting executable under +terms of your choice, provided that you also meet, for each linked +independent module, the terms and conditions of the license of that +module. An independent module is a module which is not derived from +or based on this library. If you modify this library, you may extend +this exception to your version of the library, but you are not +obligated to do so. If you do not wish to do so, delete this +exception statement from your version. */ + + package javax.swing.plaf.basic; import javax.swing.text.*; diff --git a/libjava/javax/swing/plaf/basic/BasicToggleButtonUI.java b/libjava/javax/swing/plaf/basic/BasicToggleButtonUI.java index 507d61732e4..4b9260e8d8f 100644 --- a/libjava/javax/swing/plaf/basic/BasicToggleButtonUI.java +++ b/libjava/javax/swing/plaf/basic/BasicToggleButtonUI.java @@ -1,3 +1,41 @@ +/* BasicToggleButtonUI.java + Copyright (C) 2002 Free Software Foundation, Inc. + +This file is part of GNU Classpath. + +GNU Classpath is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +GNU Classpath is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with GNU Classpath; see the file COPYING. If not, write to the +Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA +02111-1307 USA. + +Linking this library statically or dynamically with other modules is +making a combined work based on this library. Thus, the terms and +conditions of the GNU General Public License cover the whole +combination. + +As a special exception, the copyright holders of this library give you +permission to link this library with independent modules to produce an +executable, regardless of the license terms of these independent +modules, and to copy and distribute the resulting executable under +terms of your choice, provided that you also meet, for each linked +independent module, the terms and conditions of the license of that +module. An independent module is a module which is not derived from +or based on this library. If you modify this library, you may extend +this exception to your version of the library, but you are not +obligated to do so. If you do not wish to do so, delete this +exception statement from your version. */ + + package javax.swing.plaf.basic; import javax.swing.*; diff --git a/libjava/javax/swing/plaf/basic/BasicTreeUI.java b/libjava/javax/swing/plaf/basic/BasicTreeUI.java index 1f4f2a8b2d4..17ba4b56e61 100644 --- a/libjava/javax/swing/plaf/basic/BasicTreeUI.java +++ b/libjava/javax/swing/plaf/basic/BasicTreeUI.java @@ -1,3 +1,41 @@ +/* BasicTreeUI.java + Copyright (C) 2002 Free Software Foundation, Inc. + +This file is part of GNU Classpath. + +GNU Classpath is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +GNU Classpath is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with GNU Classpath; see the file COPYING. If not, write to the +Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA +02111-1307 USA. + +Linking this library statically or dynamically with other modules is +making a combined work based on this library. Thus, the terms and +conditions of the GNU General Public License cover the whole +combination. + +As a special exception, the copyright holders of this library give you +permission to link this library with independent modules to produce an +executable, regardless of the license terms of these independent +modules, and to copy and distribute the resulting executable under +terms of your choice, provided that you also meet, for each linked +independent module, the terms and conditions of the license of that +module. An independent module is a module which is not derived from +or based on this library. If you modify this library, you may extend +this exception to your version of the library, but you are not +obligated to do so. If you do not wish to do so, delete this +exception statement from your version. */ + + package javax.swing.plaf.basic; import javax.swing.plaf.*; diff --git a/libjava/javax/swing/plaf/basic/BasicViewportUI.java b/libjava/javax/swing/plaf/basic/BasicViewportUI.java index 1e592003773..3a2318cce6b 100644 --- a/libjava/javax/swing/plaf/basic/BasicViewportUI.java +++ b/libjava/javax/swing/plaf/basic/BasicViewportUI.java @@ -1,3 +1,41 @@ +/* BasicViewportUI.java + Copyright (C) 2002 Free Software Foundation, Inc. + +This file is part of GNU Classpath. + +GNU Classpath is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +GNU Classpath is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with GNU Classpath; see the file COPYING. If not, write to the +Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA +02111-1307 USA. + +Linking this library statically or dynamically with other modules is +making a combined work based on this library. Thus, the terms and +conditions of the GNU General Public License cover the whole +combination. + +As a special exception, the copyright holders of this library give you +permission to link this library with independent modules to produce an +executable, regardless of the license terms of these independent +modules, and to copy and distribute the resulting executable under +terms of your choice, provided that you also meet, for each linked +independent module, the terms and conditions of the license of that +module. An independent module is a module which is not derived from +or based on this library. If you modify this library, you may extend +this exception to your version of the library, but you are not +obligated to do so. If you do not wish to do so, delete this +exception statement from your version. */ + + package javax.swing.plaf.basic; import javax.swing.plaf.*; diff --git a/libjava/javax/swing/plaf/metal/MetalLookAndFeel.java b/libjava/javax/swing/plaf/metal/MetalLookAndFeel.java index 55ccc1ea8f1..996fd4e4a3c 100644 --- a/libjava/javax/swing/plaf/metal/MetalLookAndFeel.java +++ b/libjava/javax/swing/plaf/metal/MetalLookAndFeel.java @@ -1,3 +1,41 @@ +/* MetalLookAndFeel.java + Copyright (C) 2002 Free Software Foundation, Inc. + +This file is part of GNU Classpath. + +GNU Classpath is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +GNU Classpath is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with GNU Classpath; see the file COPYING. If not, write to the +Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA +02111-1307 USA. + +Linking this library statically or dynamically with other modules is +making a combined work based on this library. Thus, the terms and +conditions of the GNU General Public License cover the whole +combination. + +As a special exception, the copyright holders of this library give you +permission to link this library with independent modules to produce an +executable, regardless of the license terms of these independent +modules, and to copy and distribute the resulting executable under +terms of your choice, provided that you also meet, for each linked +independent module, the terms and conditions of the license of that +module. An independent module is a module which is not derived from +or based on this library. If you modify this library, you may extend +this exception to your version of the library, but you are not +obligated to do so. If you do not wish to do so, delete this +exception statement from your version. */ + + package javax.swing.plaf.metal; import javax.swing.*; diff --git a/libjava/testsuite/ChangeLog b/libjava/testsuite/ChangeLog index cb9380a8c2f..6ea10fff1be 100644 --- a/libjava/testsuite/ChangeLog +++ b/libjava/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2003-05-06 Tom Tromey <tromey@redhat.com> + + * libjava.lang/verify.java: New file. + * libjava.lang/verify.out: New file. + 2003-05-01 Tom Tromey <tromey@redhat.com> PR java/10459: diff --git a/libjava/verify.cc b/libjava/verify.cc index 3aacc273ae2..4a6ca458849 100644 --- a/libjava/verify.cc +++ b/libjava/verify.cc @@ -240,6 +240,64 @@ private: return get_type_val_for_signature ((jchar) k->method_count); } + // This is like _Jv_IsAssignableFrom, but it works even if SOURCE or + // TARGET haven't been prepared. + static bool is_assignable_from_slow (jclass target, jclass source) + { + // This will terminate when SOURCE==Object. + while (true) + { + if (source == target) + return true; + + if (target->isPrimitive () || source->isPrimitive ()) + return false; + + if (target->isArray ()) + { + if (! source->isArray ()) + return false; + target = target->getComponentType (); + source = source->getComponentType (); + } + else if (target->isInterface ()) + { + for (int i = 0; i < source->interface_count; ++i) + { + // We use a recursive call because we also need to + // check superinterfaces. + if (is_assignable_from_slow (target, source->interfaces[i])) + return true; + } + source = source->getSuperclass (); + if (source == NULL) + return false; + } + // We must do this check before we check to see if SOURCE is + // an interface. This way we know that any interface is + // assignable to an Object. + else if (target == &java::lang::Object::class$) + return true; + else if (source->isInterface ()) + { + for (int i = 0; i < target->interface_count; ++i) + { + // We use a recursive call because we also need to + // check superinterfaces. + if (is_assignable_from_slow (target->interfaces[i], source)) + return true; + } + target = target->getSuperclass (); + if (target == NULL) + return false; + } + else if (source == &java::lang::Object::class$) + return false; + else + source = source->getSuperclass (); + } + } + // This is used to keep track of which `jsr's correspond to a given // jsr target. struct subr_info @@ -462,7 +520,7 @@ private: // We must resolve both types and check assignability. resolve (verifier); k.resolve (verifier); - return _Jv_IsAssignableFrom (data.klass, k.data.klass); + return is_assignable_from_slow (data.klass, k.data.klass); } bool isvoid () const @@ -649,7 +707,7 @@ private: // Ordinarily this terminates when we hit Object... while (k != NULL) { - if (_Jv_IsAssignableFrom (k, oldk)) + if (is_assignable_from_slow (k, oldk)) break; k = k->getSuperclass (); changed = true; |