Import GNU Classpath (libgcj-import-20070727).
libjava/ 2007-08-04 Matthias Klose <doko@ubuntu.com> Import GNU Classpath (libgcj-import-20070727). * Regenerate class and header files. * Regenerate auto* files. * include/jvm.h: * jni-libjvm.cc (Jv_JNI_InvokeFunctions): Rename type. * jni.cc (_Jv_JNIFunctions, _Jv_JNI_InvokeFunctions): Likewise. * jni.cc (_Jv_JNI_CallAnyMethodA, _Jv_JNI_CallAnyVoidMethodA, _Jv_JNI_CallMethodA, _Jv_JNI_CallVoidMethodA, _Jv_JNI_CallStaticMethodA, _Jv_JNI_CallStaticVoidMethodA, _Jv_JNI_NewObjectA, _Jv_JNI_SetPrimitiveArrayRegion): Constify jvalue parameter. * java/lang/reflect/natMethod.cc (_Jv_CallAnyMethodA): Likewise. * java/lang/VMFloat.java (toString, parseFloat): New. * gnu/awt/xlib/XToolkit.java (setAlwaysOnTop, isModalityTypeSupported, isModalExclusionTypeSupported): New (stub only). * gnu/awt/xlib/XCanvasPeer.java (requestFocus): Likewise. * gnu/awt/xlib/XFramePeer.java (updateMinimumSize, updateIconImages, updateFocusableWindowState, setModalBlocked, getBoundsPrivate, setAlwaysOnTop): Likewise. * gnu/awt/xlib/XFontPeer.java (canDisplay): Update signature. * scripts/makemake.tcl: Ignore gnu/javax/sound/sampled/gstreamer, ignore javax.sound.sampled.spi.MixerProvider, ignore .in files. * HACKING: Mention --enable-gstreamer-peer, removal of generated files. libjava/classpath/ 2007-08-04 Matthias Klose <doko@ubuntu.com> * java/util/EnumMap.java (clone): Add cast. From-SVN: r127204
This commit is contained in:
@@ -358,4 +358,65 @@ public abstract class Buffer
|
||||
(arraylength < length + offset))
|
||||
throw new IndexOutOfBoundsException ();
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the backing array of this buffer, if this buffer has one.
|
||||
* Modification to the array are directly visible in this buffer and vice
|
||||
* versa.
|
||||
*
|
||||
* <p>
|
||||
* If this is a read-only buffer, then a {@link ReadOnlyBufferException} is
|
||||
* thrown because exposing the array would allow to circumvent the read-only
|
||||
* property. If this buffer doesn't have an array, then an
|
||||
* {@link UnsupportedOperationException} is thrown. Applications should check
|
||||
* if this buffer supports a backing array by calling {@link #hasArray}
|
||||
* first.</p>
|
||||
*
|
||||
* @return the backing array of this buffer
|
||||
*
|
||||
* @throws ReadOnlyBufferException when this buffer is read only
|
||||
* @throws UnsupportedOperationException when this buffer does not provide
|
||||
* a backing array
|
||||
*
|
||||
* @since 1.6
|
||||
*/
|
||||
public abstract Object array();
|
||||
|
||||
/**
|
||||
* Returns <code>true</code> if this buffer can provide a backing array,
|
||||
* <code>false</code> otherwise. When <code>true</code>, application code
|
||||
* can call {@link #array()} to access this backing array.
|
||||
*
|
||||
* @return <code>true</code> if this buffer can provide a backing array,
|
||||
* <code>false</code> otherwise
|
||||
*
|
||||
* @since 1.6
|
||||
*/
|
||||
public abstract boolean hasArray();
|
||||
|
||||
/**
|
||||
* For buffers that are backed by a Java array, this returns the offset
|
||||
* into that array at which the buffer content starts.
|
||||
*
|
||||
* @return the offset into the backing array at which the buffer content
|
||||
* starts
|
||||
* @throws ReadOnlyBufferException when this buffer is read only
|
||||
* @throws UnsupportedOperationException when this buffer does not provide
|
||||
* a backing array
|
||||
*
|
||||
* @since 1.6
|
||||
*/
|
||||
public abstract int arrayOffset();
|
||||
|
||||
/**
|
||||
* Returns <code>true</code> when this buffer is direct, <code>false</code>
|
||||
* otherwise. A direct buffer is usually backed by a raw memory area instead
|
||||
* of a Java array.
|
||||
*
|
||||
* @return <code>true</code> when this buffer is direct, <code>false</code>
|
||||
* otherwise
|
||||
*
|
||||
* @since 1.6
|
||||
*/
|
||||
public abstract boolean isDirect();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user