Table of Contents

Class ShortBuffer

Namespace
Java.Nio
Assembly
MASES.JNet.dll
public class ShortBuffer : Buffer, IDynamicMetaObjectProvider, IJVMBridgeCore, IDisposable, IJVMBridgeBaseStatic, IJVMBridgeBase, IJVMBridgeDefinition
Inheritance
JVMBridgeBase
JVMBridgeBase<Buffer>
ShortBuffer
Implements
IJVMBridgeCore
IJVMBridgeBaseStatic
IJVMBridgeBase
IJVMBridgeDefinition
Inherited Members
JVMBridgeBase<Buffer>.IsAssignableFrom(IJavaType)
JVMBridgeBase<Buffer>.IsAssignableFrom<T>()
JVMBridgeBase<Buffer>.Execute<T>(params T[])
JVMBridgeBase<Buffer>.DynBridgeClazz
JVMBridgeBase<Buffer>.BridgeClazz
JVMBridgeBase.RuntimeClassNameOf<T>()
JVMBridgeBase.ClassNameOf<T>()
JVMBridgeBase.ClassOf<T>()
JVMBridgeBase.WrapsDirect<TNewClass>(IJavaObject)
JVMBridgeBase.Wraps<TNewClass>(IJavaObject)
JVMBridgeBase.Wraps<TNewClass, TReturn>(IJavaObject)
JVMBridgeBase.Wraps<TNewClass, TReturn, TConverter>(IJavaObject)
JVMBridgeBase.MonitorEnter()
JVMBridgeBase.MonitorExit()
JVMBridgeBase.IsInstanceOf(IJavaType)
JVMBridgeBase.IsInstanceOf<T>()
JVMBridgeBase.RuntimeIsInstanceOf<T>()
JVMBridgeBase.CastTo<TNewClass>()
JVMBridgeBase.CastDirect<TNewClass>()
JVMBridgeBase.Dispose()
JVMBridgeBase.ToString()
JVMBridgeBase.GetHashCode()
JVMBridgeBase.Notify()
JVMBridgeBase.NotifyAll()
JVMBridgeBase.Wait()
JVMBridgeBase.DynBridgeInstance
JVMBridgeBase.BridgeInstance
JVMBridgeBase.IsBridgeListener
Extension Methods

Constructors

ShortBuffer()

Default constructor: even if the corresponding Java class does not have one, it is mandatory for JCOBridge

[Obsolete("ShortBuffer class represents, in .NET, an instance of a JVM interface or abstract class. This public initializer is needed for JCOBridge internal use, other uses can produce unidentible behaviors.")]
public ShortBuffer()

ShortBuffer(params object[])

Generic constructor: it is useful for JCOBridge when there is a derived class which needs to pass arguments to the highest JVMBridgeBase class

[Obsolete("ShortBuffer class represents, in .NET, an instance of a JVM interface or abstract class. This public initializer is needed for JCOBridge internal use, other uses can produce unidentible behaviors.")]
public ShortBuffer(params object[] args)

Parameters

args object[]

Properties

BridgeClassName

public override string BridgeClassName { get; }

Property Value

string

IsBridgeAbstract

public override bool IsBridgeAbstract { get; }

Property Value

bool

IsBridgeCloseable

public override bool IsBridgeCloseable { get; }

Property Value

bool

IsBridgeInterface

public override bool IsBridgeInterface { get; }

Property Value

bool

IsBridgeStatic

public override bool IsBridgeStatic { get; }

Property Value

bool

Methods

Allocate(int)

public static ShortBuffer Allocate(int arg0)

Parameters

arg0 int

int

Returns

ShortBuffer

ShortBuffer

AsReadOnlyBuffer()

public ShortBuffer AsReadOnlyBuffer()

Returns

ShortBuffer

ShortBuffer

Compact()

public ShortBuffer Compact()

Returns

ShortBuffer

ShortBuffer

CompareTo(ShortBuffer)

public int CompareTo(ShortBuffer arg0)

Parameters

arg0 ShortBuffer

ShortBuffer

Returns

int

int

CompareTo(object)

public int CompareTo(object arg0)

Parameters

arg0 object

object

Returns

int

int

From(short[], bool, bool, int)

Creates a new ShortBuffer in the JVM which belongs to data

public static ShortBuffer From(short[] data, bool useMemoryControlBlock = true, bool arrangeCapacity = true, int timeToLive = -1)

Parameters

data short[]

The data to be shared

useMemoryControlBlock bool

Appends to the end of the data a memory block will be used to controls and arbitrates memory between CLR and JVM

arrangeCapacity bool

If true the short array in data will be resized to the next power of 2, so capacity will be memory aligned and the limit of java.nio.ByteBuffer will be current size of data

timeToLive int

The time to live, expressed in milliseconds, the underlying memory shall remain available; if the time to live expires the pinned memory is retired leaving potentially the JVM under the possibility of an access violation.

Returns

ShortBuffer

A new instance of ShortBuffer

Get()

public short Get()

Returns

short

short

Get(short[])

public ShortBuffer Get(short[] arg0)

Parameters

arg0 short[]

short

Returns

ShortBuffer

ShortBuffer

Get(short[], int, int)

public ShortBuffer Get(short[] arg0, int arg1, int arg2)

Parameters

arg0 short[]

short

arg1 int

int

arg2 int

int

Returns

ShortBuffer

ShortBuffer

Get(int)

public short Get(int arg0)

Parameters

arg0 int

int

Returns

short

short

Mismatch(ShortBuffer)

public int Mismatch(ShortBuffer arg0)

Parameters

arg0 ShortBuffer

ShortBuffer

Returns

int

int

Order()

public ByteOrder Order()

Returns

ByteOrder

ByteOrder

Put(ShortBuffer)

public ShortBuffer Put(ShortBuffer arg0)

Parameters

arg0 ShortBuffer

ShortBuffer

Returns

ShortBuffer

ShortBuffer

Put(short)

public ShortBuffer Put(short arg0)

Parameters

arg0 short

short

Returns

ShortBuffer

ShortBuffer

Put(short[])

public ShortBuffer Put(short[] arg0)

Parameters

arg0 short[]

short

Returns

ShortBuffer

ShortBuffer

Put(short[], int, int)

public ShortBuffer Put(short[] arg0, int arg1, int arg2)

Parameters

arg0 short[]

short

arg1 int

int

arg2 int

int

Returns

ShortBuffer

ShortBuffer

Put(int, short)

public ShortBuffer Put(int arg0, short arg1)

Parameters

arg0 int

int

arg1 short

short

Returns

ShortBuffer

ShortBuffer

ToArray(bool)

Returns the short array managed from this ShortBuffer

public short[] ToArray(bool bypassDirectConvert = false)

Parameters

bypassDirectConvert bool

true to bypass the conversion using direct buffer

Returns

short[]

The short array managed from this ShortBuffer

ToDirectBuffer()

Returns an instance of MASES.JCOBridge.C2JBridge.JCOBridgeDirectBuffer<T>

public JCOBridgeDirectBuffer<short> ToDirectBuffer()

Returns

JCOBridgeDirectBuffer<short>

The MASES.JCOBridge.C2JBridge.JCOBridgeDirectBuffer<T> associated to this instance

Remarks

The returned MASES.JCOBridge.C2JBridge.JCOBridgeDirectBuffer<T> can be used to directly access and manages JVM memory without any memory move

Wrap(short[])

public static ShortBuffer Wrap(short[] arg0)

Parameters

arg0 short[]

short

Returns

ShortBuffer

ShortBuffer

Wrap(short[], int, int)

public static ShortBuffer Wrap(short[] arg0, int arg1, int arg2)

Parameters

arg0 short[]

short

arg1 int

int

arg2 int

int

Returns

ShortBuffer

ShortBuffer

Operators

implicit operator Comparable(ShortBuffer)

Converter from ShortBuffer to Comparable

public static implicit operator Comparable(ShortBuffer t)

Parameters

t ShortBuffer

Returns

Comparable

implicit operator Comparable<ShortBuffer>(ShortBuffer)

Converter from ShortBuffer to Comparable<T>

public static implicit operator Comparable<ShortBuffer>(ShortBuffer buffer)

Parameters

buffer ShortBuffer

Returns

Comparable<ShortBuffer>

implicit operator JCOBridgeDirectBuffer<short>(ShortBuffer)

Converts an instance of ShortBuffer into MASES.JCOBridge.C2JBridge.JCOBridgeDirectBuffer<T>

public static implicit operator JCOBridgeDirectBuffer<short>(ShortBuffer t)

Parameters

t ShortBuffer

Returns

JCOBridgeDirectBuffer<short>

implicit operator short[](ShortBuffer)

Converts an instance of ShortBuffer into short array

public static implicit operator short[](ShortBuffer t)

Parameters

t ShortBuffer

Returns

short[]

Remarks

If the ShortBuffer supports direct access the function tries to move data from JVM memory without JNI, otherwise fallback to the standard memory copy.

implicit operator ShortBuffer(short[])

Converts an instance of short array into ShortBuffer using the default parameters of From(short[], bool, bool, int)

public static implicit operator ShortBuffer(short[] t)

Parameters

t short[]

Returns

ShortBuffer

Remarks

If the JVM supports direct access the function will share with the JVM the memory without JNI, otherwise fallback to the standard memory copy.