intarsys nativeC library

de.intarsys.nativec.type
Class NativeBuffer

java.lang.Object
  extended by de.intarsys.nativec.type.NativeObject
      extended by de.intarsys.nativec.type.NativeBuffer
All Implemented Interfaces:
INativeObject

public class NativeBuffer
extends NativeObject

A wrapper for a sequence of bytes.


Field Summary
static NativeBufferType META
          The meta class instance
 
Fields inherited from class de.intarsys.nativec.type.NativeObject
DEBUG, SHIFT_INT, SHIFT_LONG, SHIFT_LONGLONG, SIZE_BYTE, SIZE_INT, SIZE_LONG, SIZE_LONGLONG, SIZE_SHORT
 
Constructor Summary
NativeBuffer(byte[] bytes)
           
NativeBuffer(ByteBuffer buffer)
           
NativeBuffer(int pSize)
           
 
Method Summary
static NativeBuffer createFromAddress(long address)
           
 int getByteCount()
          The number of bytes occupied by this.
 INativeType getNativeType()
          The meta information and behavior for the NativeObject.
 int getSize()
          The number of elements in the NativeBuffer
 Object getValue()
          A Java side representation from the memory.
 void setSize(int size)
           
 void setValue(Object value)
          Assign (and marshall to memory) the Java side representation.
 
Methods inherited from class de.intarsys.nativec.type.NativeObject
cast, createReference, getByte, getByteArray, getBytes, getCLong, getInt, getNativeHandle, getNativeHandle, getShort, getString, getWideString, isNull, setByte, setByteArray, setCLong, setInt, setNativeHandle, setShort, setString, setWideString, toNestedString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

META

public static final NativeBufferType META
The meta class instance

Constructor Detail

NativeBuffer

public NativeBuffer(byte[] bytes)

NativeBuffer

public NativeBuffer(ByteBuffer buffer)

NativeBuffer

public NativeBuffer(int pSize)
Method Detail

createFromAddress

public static NativeBuffer createFromAddress(long address)

getByteCount

public int getByteCount()
Description copied from class: NativeObject
The number of bytes occupied by this.

Specified by:
getByteCount in class NativeObject
Returns:
The number of bytes occupied by this.

getNativeType

public INativeType getNativeType()
Description copied from class: NativeObject
The meta information and behavior for the NativeObject.

There is exactly one meta instance for all NativeObject instances of a certain type.

Specified by:
getNativeType in interface INativeObject
Specified by:
getNativeType in class NativeObject
Returns:
The meta information and behavior for the NativeObject.

getSize

public int getSize()
The number of elements in the NativeBuffer

Returns:

getValue

public Object getValue()
Description copied from interface: INativeObject
A Java side representation from the memory.

Returns:
A Java side representation for the INativeObject.

setSize

public void setSize(int size)

setValue

public void setValue(Object value)
Description copied from interface: INativeObject
Assign (and marshall to memory) the Java side representation.

Parameters:
value - The new Java value.

intarsys nativeC library

Copyright © 2008 intarsys consulting GmbH. All Rights Reserved.