public final class NMemoryStream extends NStream
NObject.FromHandle, NObject.NObjectCallback, NObject.NObjectPropertyChangedCallbackchangedCallback, changingCallback, FLAG_REF_RET, propertyChangedCallback, stateChangedCallback| Constructor and Description |
|---|
NMemoryStream()
Initializes a new instance of NMemoryStream class.
|
NMemoryStream(byte[] buffer)
Initializes a new instance of NMemoryStream class.
|
NMemoryStream(byte[] buffer,
boolean canWrite)
Initializes a new instance of NMemoryStream class.
|
NMemoryStream(ByteBuffer buffer)
Initializes a new instance of NMemoryStream class.
|
NMemoryStream(ByteBuffer buffer,
boolean canWrite)
Initializes a new instance of NMemoryStream class.
|
NMemoryStream(long capacity)
Initializes a new instance of NMemoryStream class.
|
NMemoryStream(NBuffer buffer)
Initializes a new instance of NMemoryStream class.
|
NMemoryStream(NBuffer buffer,
boolean canWrite)
Initializes a new instance of NMemoryStream class.
|
NMemoryStream(NBuffer buffer,
NFileAccess access,
boolean bufferExposable)
Initializes a new instance of NMemoryStream class.
|
| Modifier and Type | Method and Description |
|---|---|
long |
capacity()
Gets the capacity of the current memory stream.
|
void |
capacity(long value)
Sets the capacity of the current memory stream.
|
NBuffer |
getBuffer()
Gets the byte buffer of the current memory stream.
|
static NType |
nativeTypeOf()
Retrieves the native type for the enclosing class.
|
com.sun.jna.Pointer |
positionPtr()
Gets the position pointer to the current memory stream.
|
void |
positionPtr(com.sun.jna.Pointer value)
Sets the position pointer to the current memory stream.
|
void |
writeTo(NStream stream) |
void |
writeTo(OutputStream out)
Deprecated.
|
void |
writeTo(RandomAccessFile raf)
Deprecated.
|
void |
writeTo(WritableByteChannel ch)
Deprecated.
|
asInputStream, asOutputStream, canRead, canSeek, canWrite, checkCanRead, checkCanReadUnchecked, checkCanWrite, checkCanWriteUnchecked, checkIsOpen, close, copyFrom, copyTo, force, fromChannel, fromChannel, fromChannel, fromChannel, fromChannel, fromInputStream, fromInputStream, fromOutputStream, fromOutputStream, fromRandomAccessFile, fromRandomAccessFile, getNull, getSynchronized, isOpen, position, position, read, read, size, truncate, write, writeaddListener, addPropertyChangeListener, captureProperties, claimHandle, clone, compareTo, copyProperties, dispose, disposeArray, equals, fromHandle, fromHandle, fromObject, getFlags, getHandle, getNativeType, getOwner, getProperty, getProperty, getSize, getSize, getSizeMany, getSizeMany, hashCode, invoke, invoke, invoke, isDisposed, nObjectCallbackNativeTypeOf, nObjectPropertyChangedCallbackNativeTypeOf, ref, removeListener, removePropertyChangeListener, reset, resetProperty, save, save, save, save, save, save, save, save, save, save, save, save, saveMany, saveMany, saveMany, saveMany, saveMany, saveMany, saveMany, saveMany, saveMany, saveMany, saveMany, saveMany, setFlags, setProperty, setProperty, toHandle, toObject, toString, toString, unref, unrefArray, unrefElementscheck, dispose, finalizepublic NMemoryStream()
public NMemoryStream(long capacity)
capacity - The memory stream capacity.public NMemoryStream(byte[] buffer)
buffer - Source byte array.public NMemoryStream(byte[] buffer,
boolean canWrite)
buffer - Source byte array.canWrite - Writing permission.public NMemoryStream(ByteBuffer buffer)
buffer - Source byte buffer.public NMemoryStream(ByteBuffer buffer, boolean canWrite)
buffer - Source byte buffer.canWrite - Writing permission.public NMemoryStream(NBuffer buffer)
buffer - Source NBuffer.public NMemoryStream(NBuffer buffer, boolean canWrite)
buffer - Source NBuffer.canWrite - Writing permission.public NMemoryStream(NBuffer buffer, NFileAccess access, boolean bufferExposable)
buffer - Source NBuffer.access - File access.bufferExposable - Whether the buffer is exposable.public static NType nativeTypeOf()
public NBuffer getBuffer()
@Deprecated public void writeTo(OutputStream out) throws IOException
out - The destination output stream.IOException@Deprecated public void writeTo(RandomAccessFile raf) throws IOException
raf - The destination random access file.IOException@Deprecated public void writeTo(WritableByteChannel ch) throws IOException
ch - The destination writable byte channel.IOExceptionpublic void writeTo(NStream stream) throws IOException
IOExceptionpublic long capacity()
public void capacity(long value)
value - The new capacity of the current memory stream.public com.sun.jna.Pointer positionPtr()
public void positionPtr(com.sun.jna.Pointer value)
value - The position pointer to the current memory stream.Copyright © 2016 Neurotechnology. All rights reserved.