JavaSByteArray Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Provides managed and native element access for a Java byte array.
[Java.Interop.JniTypeSignature("B", ArrayRank=1, GenerateJavaPeer=false, IsKeyword=true)]
public sealed class JavaSByteArray : Java.Interop.JavaPrimitiveArray<sbyte>
[<Java.Interop.JniTypeSignature("B", ArrayRank=1, GenerateJavaPeer=false, IsKeyword=true)>]
type JavaSByteArray = class
inherit JavaPrimitiveArray<sbyte>
- Inheritance
- Attributes
Remarks
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
Constructors
| Name | Description |
|---|---|
| JavaSByteArray(IEnumerable<SByte>) |
Creates a Java |
| JavaSByteArray(IList<SByte>) |
Creates a Java |
| JavaSByteArray(Int32) |
Creates a Java |
| JavaSByteArray(JniObjectReference, JniObjectReferenceOptions) |
Initializes an array wrapper through the runtime's peer-construction policy. |
Properties
| Name | Description |
|---|---|
| IsReadOnly |
Gets whether array element values are read-only. (Inherited from JavaArray<T>) |
| Item[Int32] |
Gets or sets one primitive element by copying between Java and managed memory. (Inherited from JavaPrimitiveArray<T>) |
| JniIdentityHashCode |
Returns the same hash code for the given object as would be returned by the default method hashCode(), whether or not the given object's class overrides hashCode(). (Inherited from JavaObject) |
| JniManagedPeerState |
Gets the state flags last assigned by the runtime. (Inherited from JavaObject) |
| JniPeerMembers |
Gets the member-access information for this managed Java peer. (Inherited from JavaObject) |
| Length |
Gets the number of elements in the Java array. (Inherited from JavaArray<T>) |
| PeerReference |
Gets the JNI reference currently stored in the peer control block. (Inherited from JavaObject) |
Methods
| Name | Description |
|---|---|
| Clear() |
Resets all elements to their primitive default values without changing the array length. |
| Construct(JniObjectReference, JniObjectReferenceOptions) |
Delegates construction of this peer to the runtime's value manager. (Inherited from JavaObject) |
| Contains(T) |
Tests whether the typed index search finds an element. (Inherited from JavaArray<T>) |
| CopyFrom(SByte[], Int32, Int32, Int32) |
Copies a range from a managed array into the Java array. |
| CopyFrom(T[], Int32, Int32, Int32) |
Copies a range from managed memory into the Java primitive array. (Inherited from JavaPrimitiveArray<T>) |
| CopyTo(Int32, SByte[], Int32, Int32) |
Copies a range from the Java array into a managed array. |
| CopyTo(Int32, T[], Int32, Int32) |
Copies a range from the Java primitive array into managed memory. (Inherited from JavaPrimitiveArray<T>) |
| CopyTo(T[], Int32) |
Copies the complete Java array into a managed array. (Inherited from JavaPrimitiveArray<T>) |
| CreateElements() |
Acquires the array-specific native element-buffer wrapper. (Inherited from JavaPrimitiveArray<T>) |
| CreateMarshaledValue(IntPtr, Type) |
Marshals a JNI primitive-array handle to a managed wrapper or copied array. |
| Dispose() |
Delegates peer disposal to the runtime's value manager. (Inherited from JavaObject) |
| Dispose(Boolean) |
Provides a derived-class cleanup hook; the base implementation does nothing. (Inherited from JavaObject) |
| DisposeUnlessReferenced() |
Disposes temporary marshaling arrays immediately; otherwise, uses the peer disposal policy. (Inherited from JavaPrimitiveArray<T>) |
| Equals(Object) |
Tests whether another managed peer refers to the same Java object. (Inherited from JavaObject) |
| GetElements() |
Acquires typed access to the Java array's native element buffer. |
| GetEnumerator() |
Enumerates the array elements in index order. (Inherited from JavaArray<T>) |
| GetHashCode() |
Returns a hash code value for the object. (Inherited from JavaObject) |
| IndexOf(SByte) |
Finds the first element equal to |
| IndexOf(T) |
Finds the first matching element using the array implementation's comparison. (Inherited from JavaArray<T>) |
| SetPeerReference(JniObjectReference, JniObjectReferenceOptions) |
Stores a reference value in the control block without creating a JNI reference copy. (Inherited from JavaObject) |
| ToArray() |
Copies all elements into a new managed array. (Inherited from JavaArray<T>) |
| ToString() |
Returns a string representation of the object. (Inherited from JavaObject) |
| UnregisterFromRuntime() |
Removes this managed peer from the runtime mapping without disposing its JNI reference. (Inherited from JavaObject) |
Explicit Interface Implementations
| Name | Description |
|---|---|
| ICollection.CopyTo(Array, Int32) |
Copies the Java array elements into an existing managed array. (Inherited from JavaArray<T>) |
| ICollection.Count |
Gets the array element count through the non-generic collection interface. (Inherited from JavaArray<T>) |
| ICollection.IsSynchronized |
Gets whether collection access is synchronized. (Inherited from JavaArray<T>) |
| ICollection.SyncRoot |
Gets the object supplied for external collection synchronization. (Inherited from JavaArray<T>) |
| ICollection<T>.Add(T) |
Always throws NotSupportedException because the Java array cannot grow. (Inherited from JavaArray<T>) |
| ICollection<T>.Count |
Gets the array element count through the generic collection interface. (Inherited from JavaArray<T>) |
| ICollection<T>.Remove(T) |
Always throws NotSupportedException because removal cannot resize the Java array. (Inherited from JavaArray<T>) |
| IEnumerable.GetEnumerator() |
Gets the non-generic view of the typed enumerator. (Inherited from JavaArray<T>) |
| IJavaPeerable.Disposed() |
Marks this peer as disposed and calls |
| IJavaPeerable.Finalized() |
Marks this peer as disposed and calls |
| IJavaPeerable.JniObjectReferenceControlBlock |
Gets the native control-block pointer used by this peer. (Inherited from JavaObject) |
| IJavaPeerable.SetJniIdentityHashCode(Int32) |
Stores the identity hash code supplied by the runtime. (Inherited from JavaObject) |
| IJavaPeerable.SetJniManagedPeerState(JniManagedPeerStates) |
Replaces the stored managed peer state flags. (Inherited from JavaObject) |
| IJavaPeerable.SetPeerReference(JniObjectReference) |
Updates the peer reference and releases a disposed peer's control block when the reference is invalid. (Inherited from JavaObject) |
| IList.Add(Object) |
Always throws NotSupportedException because the Java array cannot grow. (Inherited from JavaArray<T>) |
| IList.Contains(Object) |
Searches only values compatible with the managed element type. (Inherited from JavaArray<T>) |
| IList.IndexOf(Object) |
Searches for an object compatible with the managed element type. (Inherited from JavaArray<T>) |
| IList.Insert(Int32, Object) |
Always throws NotSupportedException because insertion cannot resize the Java array. (Inherited from JavaArray<T>) |
| IList.IsFixedSize |
Gets whether the Java array has a fixed length. (Inherited from JavaArray<T>) |
| IList.Item[Int32] |
Gets or sets an element through the non-generic list interface. (Inherited from JavaArray<T>) |
| IList.Remove(Object) |
Always throws NotSupportedException because removal cannot resize the Java array. (Inherited from JavaArray<T>) |
| IList.RemoveAt(Int32) |
Always throws NotSupportedException because removal cannot resize the Java array. (Inherited from JavaArray<T>) |
| IList<T>.Insert(Int32, T) |
Always throws NotSupportedException because insertion cannot resize the Java array. (Inherited from JavaArray<T>) |
| IList<T>.RemoveAt(Int32) |
Always throws NotSupportedException because removal cannot resize the Java array. (Inherited from JavaArray<T>) |
Extension Methods
| Name | Description |
|---|---|
| GetJniTypeName(IJavaPeerable) |
Gets the JNI name of the type of the instance |
| JavaAs<TResult>(IJavaPeerable) |
Try to coerce |
| ToInteroperableCollection<T>(ICollection<T>) |
Obsolete.
Reuses an existing typed |
| ToInteroperableCollection<T>(IList<T>) |
Obsolete.
Reuses an existing typed |
| TryJavaCast<TResult>(IJavaPeerable, TResult) |
Try to coerce |