 | IJVMWrapperDirectNewArrayTArrayType(ReadOnlyMemoryTArrayType) Method |
Creates a new Java array from a read-only block of memory.
Namespace: MASES.JCOBridge.C2JBridge.JVMInteropAssembly: C2JBridge (in C2JBridge.dll) Version: 2.6.10.261112-5ffe0920c00dbac056780af7ab9b1978b26ef4a5
SyntaxIJavaArray NewArray<TArrayType>(
ReadOnlyMemory<TArrayType> data
)
where TArrayType : struct, new()
Function NewArray(Of TArrayType As {Structure, New}) (
data As ReadOnlyMemory(Of TArrayType)
) As IJavaArrayParameters
- data ReadOnlyMemoryTArrayType
- The memory block whose elements are copied into the Java array.
Type Parameters
- TArrayType
- The type of the array elements. Only the primitive types Boolean, Byte, Char, Int16, Int32, Int64, Single and Double are supported.
Return Value
IJavaArrayAn
IJavaArray instance wrapping the newly created Java array.
Exceptions| Exception | Condition |
|---|
| NotSupportedException | The engine is not an HPA edition, or TArrayType is not one of the supported primitive types. |
RemarksSupported only on the HPA Edition. The method is part of the public API on every edition so that
code can be written once and adapted at runtime: check
IsHPAEdition before calling it and
use the
ArraySegmentT overload otherwise.
See Also