public class MemoryStream extends Stream
.NET documentation at https://learn.microsoft.com/dotnet/api/System.IO.MemoryStream
Powered by JCOBridge: more info at https://www.jcobridge.com
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
assemblyFullName
Fully assembly qualified name: mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
|
static java.lang.String |
assemblyShortName
Assembly name: mscorlib
|
static java.lang.String |
className
Qualified class name: System.IO.MemoryStream
|
static JCType |
classType
The type managed from JCOBridge.
|
| Constructor and Description |
|---|
MemoryStream()
Initializes a new instance by invoking the .NET constructor.
|
MemoryStream(byte[] buffer)
Initializes a new instance by invoking the .NET constructor.
|
MemoryStream(byte[] buffer,
boolean writable)
Initializes a new instance by invoking the .NET constructor.
|
MemoryStream(byte[] buffer,
int index,
int count)
Initializes a new instance by invoking the .NET constructor.
|
MemoryStream(byte[] buffer,
int index,
int count,
boolean writable)
Initializes a new instance by invoking the .NET constructor.
|
MemoryStream(byte[] buffer,
int index,
int count,
boolean writable,
boolean publiclyVisible)
Initializes a new instance by invoking the .NET constructor.
|
MemoryStream(int capacity)
Initializes a new instance by invoking the .NET constructor.
|
MemoryStream(java.lang.Object instance)
Internal constructor.
|
| Modifier and Type | Method and Description |
|---|---|
static MemoryStream |
cast(IJCOBridgeReflected from)
Try to cast the
IJCOBridgeReflected instance into MemoryStream, a cast assert is made to check if types are compatible. |
Task |
CopyToAsync(Stream destination,
int bufferSize,
CancellationToken cancellationToken)
Invokes the .NET member CopyToAsync.
|
void |
Flush()
Invokes the .NET member Flush.
|
Task |
FlushAsync(CancellationToken cancellationToken)
Invokes the .NET member FlushAsync.
|
byte[] |
GetBuffer()
Invokes the .NET member GetBuffer.
|
int |
getCapacity()
Gets the value of the .NET property Capacity.
|
java.lang.String |
getJCOAssemblyName()
Returns the full name of the assembly of the .NET type.
|
java.lang.String |
getJCOClassName()
Returns the full name of the .NET type.
|
java.lang.Object |
getJCOInstance()
Returns the underlying object managed by the bridge.
|
java.lang.String |
getJCOObjectName()
Returns the name of the .NET type qualified with its assembly.
|
JCType |
getJCOType()
Returns the
JCType of the .NET type. |
int |
Read(JCORefOut buffer,
int offset,
int count)
Invokes the .NET member Read.
|
Task_1 |
ReadAsync(byte[] buffer,
int offset,
int count,
CancellationToken cancellationToken)
Invokes the .NET member ReadAsync.
|
Task_1 |
ReadAsync(JCORefOut dupParam0,
int dupParam1,
int dupParam2,
CancellationToken dupParam3)
Invokes the .NET member ReadAsync.
|
int |
ReadByte()
Invokes the .NET member ReadByte.
|
long |
Seek(long offset,
SeekOrigin loc)
Invokes the .NET member Seek.
|
void |
setCapacity(int Capacity)
Sets the value of the .NET property Capacity.
|
void |
setJCOInstance(JCObject instance)
Sets the underlying object managed by the bridge.
|
void |
SetLength(long value)
Invokes the .NET member SetLength.
|
byte[] |
ToArray()
Invokes the .NET member ToArray.
|
boolean |
TryGetBuffer(JCORefOut<ArraySegment_1> buffer)
Invokes the .NET member TryGetBuffer.
|
void |
Write(byte[] buffer,
int offset,
int count)
Invokes the .NET member Write.
|
void |
Write(JCORefOut dupParam0,
int dupParam1,
int dupParam2)
Invokes the .NET member Write.
|
Task |
WriteAsync(byte[] buffer,
int offset,
int count,
CancellationToken cancellationToken)
Invokes the .NET member WriteAsync.
|
Task |
WriteAsync(JCORefOut dupParam0,
int dupParam1,
int dupParam2,
CancellationToken dupParam3)
Invokes the .NET member WriteAsync.
|
void |
WriteByte(byte value)
Invokes the .NET member WriteByte.
|
void |
WriteTo(Stream stream)
Invokes the .NET member WriteTo.
|
BeginRead, BeginRead, BeginWrite, BeginWrite, close, Close, CopyTo, CopyTo, CopyToAsync, CopyToAsync, Dispose, EndRead, EndWrite, FlushAsync, getCanRead, getCanSeek, getCanTimeout, getCanWrite, getLength, getPosition, getReadTimeout, getWriteTimeout, ReadAsync, ReadAsync, setPosition, setReadTimeout, setWriteTimeout, Synchronized, WriteAsync, WriteAsyncCreateObjRef, GetLifetimeService, InitializeLifetimeServicepublic static final java.lang.String assemblyFullName
public static final java.lang.String assemblyShortName
public static final java.lang.String className
public MemoryStream()
throws java.lang.Throwable,
ArgumentOutOfRangeException
java.lang.Throwable - if the .NET constructor failsArgumentOutOfRangeException - if the .NET member raises itpublic MemoryStream(byte[] buffer)
throws java.lang.Throwable,
ArgumentNullException
buffer - the argument of type byte[]java.lang.Throwable - if the .NET constructor failsArgumentNullException - if the .NET member raises itpublic MemoryStream(byte[] buffer,
boolean writable)
throws java.lang.Throwable,
ArgumentNullException
buffer - the argument of type byte[]writable - the argument of type booleanjava.lang.Throwable - if the .NET constructor failsArgumentNullException - if the .NET member raises itpublic MemoryStream(byte[] buffer,
int index,
int count)
throws java.lang.Throwable,
ArgumentNullException,
ArgumentOutOfRangeException,
ArgumentException
buffer - the argument of type byte[]index - the argument of type intcount - the argument of type intjava.lang.Throwable - if the .NET constructor failsArgumentNullException - if the .NET member raises itArgumentOutOfRangeException - if the .NET member raises itArgumentException - if the .NET member raises itpublic MemoryStream(byte[] buffer,
int index,
int count,
boolean writable)
throws java.lang.Throwable,
ArgumentNullException,
ArgumentOutOfRangeException,
ArgumentException
buffer - the argument of type byte[]index - the argument of type intcount - the argument of type intwritable - the argument of type booleanjava.lang.Throwable - if the .NET constructor failsArgumentNullException - if the .NET member raises itArgumentOutOfRangeException - if the .NET member raises itArgumentException - if the .NET member raises itpublic MemoryStream(byte[] buffer,
int index,
int count,
boolean writable,
boolean publiclyVisible)
throws java.lang.Throwable,
ArgumentNullException,
ArgumentOutOfRangeException,
ArgumentException
buffer - the argument of type byte[]index - the argument of type intcount - the argument of type intwritable - the argument of type booleanpubliclyVisible - the argument of type booleanjava.lang.Throwable - if the .NET constructor failsArgumentNullException - if the .NET member raises itArgumentOutOfRangeException - if the .NET member raises itArgumentException - if the .NET member raises itpublic MemoryStream(int capacity)
throws java.lang.Throwable,
ArgumentOutOfRangeException
capacity - the argument of type intjava.lang.Throwable - if the .NET constructor failsArgumentOutOfRangeException - if the .NET member raises itpublic MemoryStream(java.lang.Object instance)
throws java.lang.Throwable
instance - the underlying bridge object: it must be a JCObjectjava.lang.Throwable - if instance is not a JCObjectpublic static MemoryStream cast(IJCOBridgeReflected from) throws java.lang.Throwable
IJCOBridgeReflected instance into MemoryStream, a cast assert is made to check if types are compatible.from - IJCOBridgeReflected instance to be castedMemoryStream instancejava.lang.Throwable - in case of error during cast operationpublic Task CopyToAsync(Stream destination, int bufferSize, CancellationToken cancellationToken) throws java.lang.Throwable, ArgumentNullException, ArgumentOutOfRangeException, ObjectDisposedException, NotSupportedException, SecurityException, InvalidOperationException, ArgumentException, OperationCanceledException, TaskSchedulerException, SemaphoreFullException
CopyToAsync in class Streamdestination - the argument of type StreambufferSize - the argument of type intcancellationToken - the argument of type CancellationTokenjava.lang.Throwable - if the call fails in the bridge or in the CLRArgumentNullException - if the .NET member raises itArgumentOutOfRangeException - if the .NET member raises itObjectDisposedException - if the .NET member raises itNotSupportedException - if the .NET member raises itSecurityException - if the .NET member raises itInvalidOperationException - if the .NET member raises itArgumentException - if the .NET member raises itOperationCanceledException - if the .NET member raises itTaskSchedulerException - if the .NET member raises itSemaphoreFullException - if the .NET member raises itpublic void Flush()
throws java.lang.Throwable
Flush in class Streamjava.lang.Throwable - if the call fails in the bridge or in the CLRpublic Task FlushAsync(CancellationToken cancellationToken) throws java.lang.Throwable, ArgumentOutOfRangeException, ArgumentNullException, InvalidOperationException, ObjectDisposedException, AbandonedMutexException, ArgumentException
FlushAsync in class StreamcancellationToken - the argument of type CancellationTokenjava.lang.Throwable - if the call fails in the bridge or in the CLRArgumentOutOfRangeException - if the .NET member raises itArgumentNullException - if the .NET member raises itInvalidOperationException - if the .NET member raises itObjectDisposedException - if the .NET member raises itAbandonedMutexException - if the .NET member raises itArgumentException - if the .NET member raises itpublic byte[] GetBuffer()
throws java.lang.Throwable,
UnauthorizedAccessException
java.lang.Throwable - if the call fails in the bridge or in the CLRUnauthorizedAccessException - if the .NET member raises itpublic int getCapacity()
throws java.lang.Throwable,
ObjectDisposedException
java.lang.Throwable - if the call fails in the bridge or in the CLRObjectDisposedException - if the .NET member raises itpublic java.lang.String getJCOAssemblyName()
NetObjectgetJCOAssemblyName in interface IJCOBridgeReflectedgetJCOAssemblyName in class Streampublic java.lang.String getJCOClassName()
NetObjectgetJCOClassName in interface IJCOBridgeReflectedgetJCOClassName in class Streampublic java.lang.Object getJCOInstance()
NetObjectgetJCOInstance in interface IJCOBridgeReflectedgetJCOInstance in class Streamnull if there is nonepublic java.lang.String getJCOObjectName()
NetObjectgetJCOObjectName in interface IJCOBridgeReflectedgetJCOObjectName in class Streampublic JCType getJCOType()
NetObjectJCType of the .NET type.getJCOType in interface IJCOBridgeReflectedgetJCOType in class Streampublic int Read(JCORefOut buffer, int offset, int count) throws java.lang.Throwable, ArgumentNullException, ArgumentOutOfRangeException, ArgumentException, ObjectDisposedException
Read in class Streambuffer - the argument of type JCORefOutoffset - the argument of type intcount - the argument of type intjava.lang.Throwable - if the call fails in the bridge or in the CLRArgumentNullException - if the .NET member raises itArgumentOutOfRangeException - if the .NET member raises itArgumentException - if the .NET member raises itObjectDisposedException - if the .NET member raises itpublic Task_1 ReadAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken) throws java.lang.Throwable, ArgumentNullException, ArgumentOutOfRangeException, ArgumentException, InvalidOperationException, ThreadAbortException, TaskSchedulerException, FormatException, ObjectDisposedException, OperationCanceledException, AbandonedMutexException, AggregateException, MulticastNotSupportedException, FileNotFoundException, DirectoryNotFoundException, UnauthorizedAccessException, IOException, PathTooLongException, DriveNotFoundException
ReadAsync in class Streambuffer - the argument of type byte[]offset - the argument of type intcount - the argument of type intcancellationToken - the argument of type CancellationTokenjava.lang.Throwable - if the call fails in the bridge or in the CLRArgumentNullException - if the .NET member raises itArgumentOutOfRangeException - if the .NET member raises itArgumentException - if the .NET member raises itInvalidOperationException - if the .NET member raises itThreadAbortException - if the .NET member raises itTaskSchedulerException - if the .NET member raises itFormatException - if the .NET member raises itObjectDisposedException - if the .NET member raises itOperationCanceledException - if the .NET member raises itAbandonedMutexException - if the .NET member raises itAggregateException - if the .NET member raises itMulticastNotSupportedException - if the .NET member raises itFileNotFoundException - if the .NET member raises itDirectoryNotFoundException - if the .NET member raises itUnauthorizedAccessException - if the .NET member raises itIOException - if the .NET member raises itPathTooLongException - if the .NET member raises itDriveNotFoundException - if the .NET member raises itpublic Task_1 ReadAsync(JCORefOut dupParam0, int dupParam1, int dupParam2, CancellationToken dupParam3) throws java.lang.Throwable, ArgumentNullException, ArgumentOutOfRangeException, ArgumentException, InvalidOperationException, ThreadAbortException, TaskSchedulerException, FormatException, ObjectDisposedException, OperationCanceledException, AbandonedMutexException, AggregateException, MulticastNotSupportedException, FileNotFoundException, DirectoryNotFoundException, UnauthorizedAccessException, IOException, PathTooLongException, DriveNotFoundException
ReadAsync in class StreamdupParam0 - the argument of type JCORefOutdupParam1 - the argument of type intdupParam2 - the argument of type intdupParam3 - the argument of type CancellationTokenjava.lang.Throwable - if the call fails in the bridge or in the CLRArgumentNullException - if the .NET member raises itArgumentOutOfRangeException - if the .NET member raises itArgumentException - if the .NET member raises itInvalidOperationException - if the .NET member raises itThreadAbortException - if the .NET member raises itTaskSchedulerException - if the .NET member raises itFormatException - if the .NET member raises itObjectDisposedException - if the .NET member raises itOperationCanceledException - if the .NET member raises itAbandonedMutexException - if the .NET member raises itAggregateException - if the .NET member raises itMulticastNotSupportedException - if the .NET member raises itFileNotFoundException - if the .NET member raises itDirectoryNotFoundException - if the .NET member raises itUnauthorizedAccessException - if the .NET member raises itIOException - if the .NET member raises itPathTooLongException - if the .NET member raises itDriveNotFoundException - if the .NET member raises itpublic int ReadByte()
throws java.lang.Throwable,
ObjectDisposedException
ReadByte in class Streamjava.lang.Throwable - if the call fails in the bridge or in the CLRObjectDisposedException - if the .NET member raises itpublic long Seek(long offset,
SeekOrigin loc)
throws java.lang.Throwable,
ObjectDisposedException,
ArgumentOutOfRangeException,
IOException,
ArgumentException
Seek in class Streamoffset - the argument of type longloc - the argument of type SeekOriginjava.lang.Throwable - if the call fails in the bridge or in the CLRObjectDisposedException - if the .NET member raises itArgumentOutOfRangeException - if the .NET member raises itIOException - if the .NET member raises itArgumentException - if the .NET member raises itpublic void setCapacity(int Capacity)
throws java.lang.Throwable,
ArgumentOutOfRangeException,
ObjectDisposedException,
NotSupportedException
Capacity - the new value of the propertyjava.lang.Throwable - if the call fails in the bridge or in the CLRArgumentOutOfRangeException - if the .NET member raises itObjectDisposedException - if the .NET member raises itNotSupportedException - if the .NET member raises itpublic void setJCOInstance(JCObject instance)
NetObjectsetJCOInstance in class Streaminstance - the new underlying objectpublic void SetLength(long value)
throws java.lang.Throwable,
ArgumentOutOfRangeException,
NotSupportedException,
IOException,
ObjectDisposedException
SetLength in class Streamvalue - the argument of type longjava.lang.Throwable - if the call fails in the bridge or in the CLRArgumentOutOfRangeException - if the .NET member raises itNotSupportedException - if the .NET member raises itIOException - if the .NET member raises itObjectDisposedException - if the .NET member raises itpublic byte[] ToArray()
throws java.lang.Throwable
java.lang.Throwable - if the call fails in the bridge or in the CLRpublic boolean TryGetBuffer(JCORefOut<ArraySegment_1> buffer) throws java.lang.Throwable, ArgumentNullException, ArgumentOutOfRangeException, ArgumentException
buffer - the argument of type JCORefOut<ArraySegment_1>java.lang.Throwable - if the call fails in the bridge or in the CLRArgumentNullException - if the .NET member raises itArgumentOutOfRangeException - if the .NET member raises itArgumentException - if the .NET member raises itpublic void Write(byte[] buffer,
int offset,
int count)
throws java.lang.Throwable,
ArgumentNullException,
ArgumentOutOfRangeException,
ArgumentException,
ObjectDisposedException,
NotSupportedException,
IOException
Write in class Streambuffer - the argument of type byte[]offset - the argument of type intcount - the argument of type intjava.lang.Throwable - if the call fails in the bridge or in the CLRArgumentNullException - if the .NET member raises itArgumentOutOfRangeException - if the .NET member raises itArgumentException - if the .NET member raises itObjectDisposedException - if the .NET member raises itNotSupportedException - if the .NET member raises itIOException - if the .NET member raises itpublic void Write(JCORefOut dupParam0, int dupParam1, int dupParam2) throws java.lang.Throwable, ArgumentNullException, ArgumentOutOfRangeException, ArgumentException, ObjectDisposedException, NotSupportedException, IOException
Write in class StreamdupParam0 - the argument of type JCORefOutdupParam1 - the argument of type intdupParam2 - the argument of type intjava.lang.Throwable - if the call fails in the bridge or in the CLRArgumentNullException - if the .NET member raises itArgumentOutOfRangeException - if the .NET member raises itArgumentException - if the .NET member raises itObjectDisposedException - if the .NET member raises itNotSupportedException - if the .NET member raises itIOException - if the .NET member raises itpublic Task WriteAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken) throws java.lang.Throwable, ArgumentNullException, ArgumentOutOfRangeException, ArgumentException, ObjectDisposedException, AbandonedMutexException, InvalidOperationException, MulticastNotSupportedException, FileNotFoundException, DirectoryNotFoundException, UnauthorizedAccessException, IOException, PathTooLongException, DriveNotFoundException, OperationCanceledException
WriteAsync in class Streambuffer - the argument of type byte[]offset - the argument of type intcount - the argument of type intcancellationToken - the argument of type CancellationTokenjava.lang.Throwable - if the call fails in the bridge or in the CLRArgumentNullException - if the .NET member raises itArgumentOutOfRangeException - if the .NET member raises itArgumentException - if the .NET member raises itObjectDisposedException - if the .NET member raises itAbandonedMutexException - if the .NET member raises itInvalidOperationException - if the .NET member raises itMulticastNotSupportedException - if the .NET member raises itFileNotFoundException - if the .NET member raises itDirectoryNotFoundException - if the .NET member raises itUnauthorizedAccessException - if the .NET member raises itIOException - if the .NET member raises itPathTooLongException - if the .NET member raises itDriveNotFoundException - if the .NET member raises itOperationCanceledException - if the .NET member raises itpublic Task WriteAsync(JCORefOut dupParam0, int dupParam1, int dupParam2, CancellationToken dupParam3) throws java.lang.Throwable, ArgumentNullException, ArgumentOutOfRangeException, ArgumentException, ObjectDisposedException, AbandonedMutexException, InvalidOperationException, MulticastNotSupportedException, FileNotFoundException, DirectoryNotFoundException, UnauthorizedAccessException, IOException, PathTooLongException, DriveNotFoundException, OperationCanceledException
WriteAsync in class StreamdupParam0 - the argument of type JCORefOutdupParam1 - the argument of type intdupParam2 - the argument of type intdupParam3 - the argument of type CancellationTokenjava.lang.Throwable - if the call fails in the bridge or in the CLRArgumentNullException - if the .NET member raises itArgumentOutOfRangeException - if the .NET member raises itArgumentException - if the .NET member raises itObjectDisposedException - if the .NET member raises itAbandonedMutexException - if the .NET member raises itInvalidOperationException - if the .NET member raises itMulticastNotSupportedException - if the .NET member raises itFileNotFoundException - if the .NET member raises itDirectoryNotFoundException - if the .NET member raises itUnauthorizedAccessException - if the .NET member raises itIOException - if the .NET member raises itPathTooLongException - if the .NET member raises itDriveNotFoundException - if the .NET member raises itOperationCanceledException - if the .NET member raises itpublic void WriteByte(byte value)
throws java.lang.Throwable,
ObjectDisposedException,
NotSupportedException,
IOException,
ArgumentOutOfRangeException
WriteByte in class Streamvalue - the argument of type bytejava.lang.Throwable - if the call fails in the bridge or in the CLRObjectDisposedException - if the .NET member raises itNotSupportedException - if the .NET member raises itIOException - if the .NET member raises itArgumentOutOfRangeException - if the .NET member raises itpublic void WriteTo(Stream stream) throws java.lang.Throwable, ArgumentNullException, ObjectDisposedException
stream - the argument of type Streamjava.lang.Throwable - if the call fails in the bridge or in the CLRArgumentNullException - if the .NET member raises itObjectDisposedException - if the .NET member raises it