natByteBufferImpl.cc, [...]: Added copyright and license.
authorMichael Koch <konqueror@gmx.de>
Thu, 13 Feb 2003 08:40:35 +0000 (08:40 +0000)
committerMichael Koch <mkoch@gcc.gnu.org>
Thu, 13 Feb 2003 08:40:35 +0000 (08:40 +0000)
2003-02-13  Michael Koch  <konqueror@gmx.de>

* gnu/java/nio/natByteBufferImpl.cc,
gnu/java/nio/natCharBufferImpl.cc,
gnu/java/nio/natDoubleBufferImpl.cc,
gnu/java/nio/natFloatBufferImpl.cc,
gnu/java/nio/natIntBufferImpl.cc,
gnu/java/nio/natLongBufferImpl.cc,
gnu/java/nio/natShortBufferImpl.cc:
Added copyright and license.
* java/nio/DoubleBuffer.java,
java/nio/FloatBuffer.java,
java/nio/IntBuffer.java,
java/nio/LongBuffer.java,
java/nio/ShortBuffer.java
(array): Throw exceptions.
(arrayOffset): Throw exceptions.

From-SVN: r62832

13 files changed:
libjava/ChangeLog
libjava/gnu/java/nio/natByteBufferImpl.cc
libjava/gnu/java/nio/natCharBufferImpl.cc
libjava/gnu/java/nio/natDoubleBufferImpl.cc
libjava/gnu/java/nio/natFloatBufferImpl.cc
libjava/gnu/java/nio/natIntBufferImpl.cc
libjava/gnu/java/nio/natLongBufferImpl.cc
libjava/gnu/java/nio/natShortBufferImpl.cc
libjava/java/nio/DoubleBuffer.java
libjava/java/nio/FloatBuffer.java
libjava/java/nio/IntBuffer.java
libjava/java/nio/LongBuffer.java
libjava/java/nio/ShortBuffer.java

index 16491e6d026eef55248aa4027e141c5b86dd0cad..cc4e671e120468646429d8641a3f944b2c2646af 100644 (file)
@@ -1,3 +1,21 @@
+2003-02-13  Michael Koch  <konqueror@gmx.de>
+
+       * gnu/java/nio/natByteBufferImpl.cc,
+       gnu/java/nio/natCharBufferImpl.cc,
+       gnu/java/nio/natDoubleBufferImpl.cc,
+       gnu/java/nio/natFloatBufferImpl.cc,
+       gnu/java/nio/natIntBufferImpl.cc,
+       gnu/java/nio/natLongBufferImpl.cc,
+       gnu/java/nio/natShortBufferImpl.cc:
+       Added copyright and license.
+       * java/nio/DoubleBuffer.java,
+       java/nio/FloatBuffer.java,
+       java/nio/IntBuffer.java,
+       java/nio/LongBuffer.java,
+       java/nio/ShortBuffer.java
+       (array): Throw exceptions.
+       (arrayOffset): Throw exceptions.
+
 2003-02-13  Michael Koch  <konqueror@gmx.de>
  
        * gnu/java/util/prefs/FileBasedFactory.java,
index b98b694e87b69459a6065f671ac6d7f27ede2015..2bb1e41a622d4907dfd3392b43b337785e79bf6b 100644 (file)
@@ -1,3 +1,13 @@
+// natByteBufferImpl.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>
index 6f9bf6474d62e7b0b6116521d931db926b1bf0bd..9fb54e145612e3cffedc4a2ab6b8bfff8e1c640e 100644 (file)
@@ -1,3 +1,13 @@
+// natCharBufferImpl.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>
index c71fd032082c5651e0f1d328bf27541dfaae773a..6c66a337417d10cc757e5b48589f5ab920e34886 100644 (file)
@@ -1,3 +1,13 @@
+// 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>
index 3464c7656c2b2c4f06b94e5f391d4606449b1087..9785454634cc954d9113ff783e678d7a58ace4fa 100644 (file)
@@ -1,3 +1,13 @@
+// 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>
index 399062804eb4c3c758bd896439a5dffc8249254c..eff70f838bb9711a956fd894f38869d98464b7df 100644 (file)
@@ -1,3 +1,13 @@
+// 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>
index 81181e035d6fda9f53b8873ab2e6b9762c0744d5..a84248136e51493dbf812f45ce038042e318f671 100644 (file)
@@ -1,3 +1,13 @@
+// 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>
index 576573a90480f83c7782625ce010475cc5360e2d..188bff9575e6feeede9373f1ece489a8940de350 100644 (file)
@@ -1,3 +1,13 @@
+// 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>
index 72a6c09078de6824fe8405a4c46a0cf0e6234718..036579a802b4c6c8584c1fa0f15a5abd3edaa172 100644 (file)
@@ -125,11 +125,23 @@ public abstract class DoubleBuffer extends Buffer implements Comparable
 
   public final double[] array()
   {
+    if (backing_buffer == null)
+      throw new UnsupportedOperationException ();
+
+    if (isReadOnly ())
+      throw new ReadOnlyBufferException ();
+    
     return backing_buffer;
   }
 
   public final int arrayOffset()
   {
+    if (backing_buffer == null)
+      throw new UnsupportedOperationException ();
+
+    if (isReadOnly ())
+      throw new ReadOnlyBufferException ();
+    
     return array_offset;
   }
 
index b780ff597d82ef2893bf5132efb2c45f7c19d2ff..8531cb99f9d1d1b978675db5e8795024333242b5 100644 (file)
@@ -126,11 +126,23 @@ public abstract class FloatBuffer extends Buffer implements Comparable
 
   public final float[] array()
   {
+    if (backing_buffer == null)
+      throw new UnsupportedOperationException ();
+
+    if (isReadOnly ())
+      throw new ReadOnlyBufferException ();
+    
     return backing_buffer;
   }
 
   public final int arrayOffset()
   {
+    if (backing_buffer == null)
+      throw new UnsupportedOperationException ();
+
+    if (isReadOnly ())
+      throw new ReadOnlyBufferException ();
+    
     return array_offset;
   }
 
index aca6e0f1902cdcab501d6b76916cf5289d20500c..ddf03d8364dd8879c7b1b739192502b880b9a646 100644 (file)
@@ -126,11 +126,23 @@ public abstract class IntBuffer extends Buffer implements Comparable
 
   public final int[] array()
   {
+    if (backing_buffer == null)
+      throw new UnsupportedOperationException ();
+
+    if (isReadOnly ())
+      throw new ReadOnlyBufferException ();
+    
     return backing_buffer;
   }
 
   public final int arrayOffset()
   {
+    if (backing_buffer == null)
+      throw new UnsupportedOperationException ();
+
+    if (isReadOnly ())
+      throw new ReadOnlyBufferException ();
+    
     return array_offset;
   }
 
index 0ddc7938a4965335a91c8ead73f1a96d6fc07635..63eb5af1a1158f5952dba7f6d572bf0d66c19c6f 100644 (file)
@@ -126,11 +126,23 @@ public abstract class LongBuffer extends Buffer implements Comparable
 
   public final long[] array()
   {
+    if (backing_buffer == null)
+      throw new UnsupportedOperationException ();
+
+    if (isReadOnly ())
+      throw new ReadOnlyBufferException ();
+    
     return backing_buffer;
   }
 
   public final int arrayOffset()
   {
+    if (backing_buffer == null)
+      throw new UnsupportedOperationException ();
+
+    if (isReadOnly ())
+      throw new ReadOnlyBufferException ();
+    
     return array_offset;
   }
 
index 512c9fd8bec129afcdf8478de1aacdd3848440b4..7a71cad6d85659b833777b8f28c7e9cab9cf42cc 100644 (file)
@@ -126,11 +126,23 @@ public abstract class ShortBuffer extends Buffer implements Comparable
 
   public final short[] array()
   {
+    if (backing_buffer == null)
+      throw new UnsupportedOperationException ();
+
+    if (isReadOnly ())
+      throw new ReadOnlyBufferException ();
+    
     return backing_buffer;
   }
 
   public final int arrayOffset()
   {
+    if (backing_buffer == null)
+      throw new UnsupportedOperationException ();
+
+    if (isReadOnly ())
+      throw new ReadOnlyBufferException ();
+    
     return array_offset;
   }