Class CharBuffer
public class CharBuffer : Buffer, IDynamicMetaObjectProvider, IJVMBridgeCore, IDisposable, IJVMBridgeBaseStatic, IJVMBridgeBase, IJVMBridgeDefinition
- Inheritance
-
JVMBridgeBaseJVMBridgeBase<Buffer>CharBuffer
- Implements
-
IJVMBridgeCoreIJVMBridgeBaseStaticIJVMBridgeBaseIJVMBridgeDefinition
- Inherited Members
-
JVMBridgeBase<Buffer>.IsAssignableFrom(IJavaType)JVMBridgeBase<Buffer>.IsAssignableFrom<T>()JVMBridgeBase<Buffer>.Execute<T>(params T[])JVMBridgeBase<Buffer>.DynBridgeClazzJVMBridgeBase<Buffer>.BridgeClazzJVMBridgeBase.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.IExecuteWithSignature<TNewClass, TReturn, TConverter>(string, string, params object[])JVMBridgeBase.DynBridgeInstanceJVMBridgeBase.BridgeInstanceJVMBridgeBase.IsBridgeListener
- Extension Methods
Constructors
CharBuffer()
Default constructor: even if the corresponding Java class does not have one, it is mandatory for JCOBridge
[Obsolete("CharBuffer 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 CharBuffer()
CharBuffer(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("CharBuffer 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 CharBuffer(params object[] args)
Parameters
args
object[]
Properties
BridgeClassName
https://www.jcobridge.com/api-clr/html/P_MASES_JCOBridge_C2JBridge_JVMBridgeBase_BridgeClassName.htm
public override string BridgeClassName { get; }
Property Value
IsBridgeAbstract
public override bool IsBridgeAbstract { get; }
Property Value
IsBridgeCloseable
public override bool IsBridgeCloseable { get; }
Property Value
IsBridgeInterface
public override bool IsBridgeInterface { get; }
Property Value
IsBridgeStatic
public override bool IsBridgeStatic { get; }
Property Value
Methods
Allocate(int)
public static CharBuffer Allocate(int arg0)
Parameters
Returns
Append(CharSequence)
public Appendable Append(CharSequence arg0)
Parameters
arg0
CharSequence
Returns
Exceptions
Append(CharSequence, int, int)
public Appendable Append(CharSequence arg0, int arg1, int arg2)
Parameters
arg0
CharSequencearg1
intarg2
int
Returns
Exceptions
Append(char)
public Appendable Append(char arg0)
Parameters
Returns
Exceptions
AsReadOnlyBuffer()
public CharBuffer AsReadOnlyBuffer()
Returns
CharAt(int)
public char CharAt(int arg0)
Parameters
Returns
Chars()
public IntStream Chars()
Returns
Compact()
public CharBuffer Compact()
Returns
CompareTo(CharBuffer)
public int CompareTo(CharBuffer arg0)
Parameters
arg0
CharBuffer
Returns
CompareTo(object)
public int CompareTo(object arg0)
Parameters
Returns
From(char[], bool, bool, int)
Creates a new CharBuffer in the JVM which belongs to data
public static CharBuffer From(char[] data, bool useMemoryControlBlock = true, bool arrangeCapacity = true, int timeToLive = -1)
Parameters
data
char[]The data to be shared
useMemoryControlBlock
boolAppends to the end of the
data
a memory block will be used to controls and arbitrates memory between CLR and JVMarrangeCapacity
boolIf true the char 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 ofdata
timeToLive
intThe 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
- CharBuffer
A new instance of CharBuffer
Get()
public char Get()
Returns
Get(char[])
public CharBuffer Get(char[] arg0)
Parameters
Returns
Get(char[], int, int)
public CharBuffer Get(char[] arg0, int arg1, int arg2)
Parameters
Returns
Get(int)
public char Get(int arg0)
Parameters
Returns
Length()
public int Length()
Returns
Mismatch(CharBuffer)
public int Mismatch(CharBuffer arg0)
Parameters
arg0
CharBuffer
Returns
Order()
public ByteOrder Order()
Returns
Put(String)
public CharBuffer Put(String arg0)
Parameters
Returns
Put(String, int, int)
public CharBuffer Put(String arg0, int arg1, int arg2)
Parameters
Returns
Put(CharBuffer)
public CharBuffer Put(CharBuffer arg0)
Parameters
arg0
CharBuffer
Returns
Put(char)
public CharBuffer Put(char arg0)
Parameters
Returns
Put(char[])
public CharBuffer Put(char[] arg0)
Parameters
Returns
Put(char[], int, int)
public CharBuffer Put(char[] arg0, int arg1, int arg2)
Parameters
Returns
Put(int, char)
public CharBuffer Put(int arg0, char arg1)
Parameters
Returns
Read(CharBuffer)
public int Read(CharBuffer arg0)
Parameters
arg0
CharBuffer
Returns
Exceptions
SubSequence(int, int)
public CharSequence SubSequence(int arg0, int arg1)
Parameters
Returns
ToArray(bool)
Returns the char array managed from this CharBuffer
public char[] ToArray(bool bypassDirectConvert = false)
Parameters
Returns
- char[]
The char array managed from this CharBuffer
ToDirectBuffer()
Returns an instance of MASES.JCOBridge.C2JBridge.JCOBridgeDirectBuffer<T>
public JCOBridgeDirectBuffer<char> ToDirectBuffer()
Returns
- JCOBridgeDirectBuffer<char>
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(CharSequence)
public static CharBuffer Wrap(CharSequence arg0)
Parameters
arg0
CharSequence
Returns
Wrap(CharSequence, int, int)
public static CharBuffer Wrap(CharSequence arg0, int arg1, int arg2)
Parameters
arg0
CharSequencearg1
intarg2
int
Returns
Wrap(char[])
public static CharBuffer Wrap(char[] arg0)
Parameters
Returns
Wrap(char[], int, int)
public static CharBuffer Wrap(char[] arg0, int arg1, int arg2)
Parameters
Returns
Operators
implicit operator Appendable(CharBuffer)
Converter from CharBuffer to Appendable
public static implicit operator Appendable(CharBuffer t)
Parameters
Returns
implicit operator CharSequence(CharBuffer)
Converter from CharBuffer to CharSequence
public static implicit operator CharSequence(CharBuffer t)
Parameters
Returns
implicit operator Comparable(CharBuffer)
Converter from CharBuffer to Comparable
public static implicit operator Comparable(CharBuffer t)
Parameters
Returns
implicit operator Comparable<CharBuffer>(CharBuffer)
Converter from CharBuffer to Comparable<T>
public static implicit operator Comparable<CharBuffer>(CharBuffer buffer)
Parameters
buffer
CharBuffer
Returns
implicit operator Readable(CharBuffer)
Converter from CharBuffer to Readable
public static implicit operator Readable(CharBuffer t)
Parameters
Returns
implicit operator JCOBridgeDirectBuffer<char>(CharBuffer)
Converts an instance of CharBuffer into MASES.JCOBridge.C2JBridge.JCOBridgeDirectBuffer<T>
public static implicit operator JCOBridgeDirectBuffer<char>(CharBuffer t)
Parameters
Returns
- JCOBridgeDirectBuffer<char>
implicit operator char[](CharBuffer)
Converts an instance of CharBuffer into char array
public static implicit operator char[](CharBuffer t)
Parameters
Returns
- char[]
Remarks
If the CharBuffer supports direct access the function tries to move data from JVM memory without JNI, otherwise fallback to the standard memory copy.
implicit operator CharBuffer(char[])
Converts an instance of char array into CharBuffer using the default parameters of From(char[], bool, bool, int)
public static implicit operator CharBuffer(char[] t)
Parameters
t
char[]
Returns
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.