Package system.io
Class MemoryStream
- java.lang.Object
-
- org.mases.jcobridge.netreflection.NetObject
-
- system.MarshalByRefObject
-
- system.io.Stream
-
- system.io.MemoryStream
-
- All Implemented Interfaces:
java.lang.AutoCloseable,IJCOBridgeReflected
public class MemoryStream extends Stream
The base .NET class managing System.IO.MemoryStream, System.Private.CoreLib, Version=9.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e..NET documentation at https://docs.microsoft.com/en-us/dotnet/api/System.IO.MemoryStream
Powered by JCOBridge: more info at https://www.jcobridge.com
- Author:
- MASES s.r.l https://masesgroup.com
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringassemblyFullNameFully assembly qualified name: System.Private.CoreLib, Version=9.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798estatic java.lang.StringassemblyShortNameAssembly name: System.Private.CoreLibstatic java.lang.StringclassNameQualified class name: System.IO.MemoryStreamstatic JCTypeclassTypeThe type managed from JCOBridge.
-
Constructor Summary
Constructors Constructor Description MemoryStream()MemoryStream(byte[] buffer)MemoryStream(byte[] buffer, boolean writable)MemoryStream(byte[] buffer, int index, int count)MemoryStream(byte[] buffer, int index, int count, boolean writable)MemoryStream(byte[] buffer, int index, int count, boolean writable, boolean publiclyVisible)MemoryStream(int capacity)MemoryStream(java.lang.Object instance)Internal constructor.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static MemoryStreamcast(IJCOBridgeReflected from)Try to cast theIJCOBridgeReflectedinstance intoMemoryStream, a cast assert is made to check if types are compatible.voidCopyTo(Stream destination, int bufferSize)TaskCopyToAsync(Stream destination, int bufferSize, CancellationToken cancellationToken)voidFlush()TaskFlushAsync(CancellationToken cancellationToken)byte[]GetBuffer()intgetCapacity()java.lang.StringgetJCOAssemblyName()Returns the reflected Assembly namejava.lang.StringgetJCOClassName()Returns the reflected Class namejava.lang.ObjectgetJCOInstance()Returns the instantiated classjava.lang.StringgetJCOObjectName()Returns the reflected Class name used to build the objectJCTypegetJCOType()Returns the instantiated class TypeintRead(byte[] buffer, int offset, int count)intRead(JCORefOut dupParam0, int dupParam1, int dupParam2)intReadByte()longSeek(long offset, SeekOrigin loc)voidsetCapacity(int Capacity)voidsetJCOInstance(JCObject instance)voidSetLength(long value)byte[]ToArray()voidWrite(byte[] buffer, int offset, int count)voidWrite(JCORefOut dupParam0, int dupParam1, int dupParam2)TaskWriteAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken)TaskWriteAsync(JCORefOut dupParam0, int dupParam1, int dupParam2, CancellationToken dupParam3)voidWriteByte(byte value)voidWriteTo(Stream stream)-
Methods inherited from class system.io.Stream
BeginRead, BeginRead, BeginWrite, BeginWrite, close, Close, CopyTo, CopyToAsync, CopyToAsync, CopyToAsync, Dispose, DisposeAsync, EndRead, EndWrite, FlushAsync, getCanRead, getCanSeek, getCanTimeout, getCanWrite, getLength, getPosition, getReadTimeout, getWriteTimeout, ReadExactly, ReadExactly, ReadExactlyAsync, ReadExactlyAsync, setPosition, setReadTimeout, setWriteTimeout, Synchronized, WriteAsync, WriteAsync
-
Methods inherited from class system.MarshalByRefObject
GetLifetimeService, InitializeLifetimeService
-
-
-
-
Field Detail
-
assemblyFullName
public static final java.lang.String assemblyFullName
Fully assembly qualified name: System.Private.CoreLib, Version=9.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e- See Also:
- Constant Field Values
-
assemblyShortName
public static final java.lang.String assemblyShortName
Assembly name: System.Private.CoreLib- See Also:
- Constant Field Values
-
className
public static final java.lang.String className
Qualified class name: System.IO.MemoryStream- See Also:
- Constant Field Values
-
-
Constructor Detail
-
MemoryStream
public MemoryStream(java.lang.Object instance) throws java.lang.ThrowableInternal constructor. Use with caution- Throws:
java.lang.Throwable
-
MemoryStream
public MemoryStream() throws java.lang.Throwable, ArgumentException, ArgumentOutOfRangeException, PlatformNotSupportedException, NotSupportedException, ObjectDisposedException, InvalidOperationException, RankException, ArrayTypeMismatchException, IndexOutOfRangeException, FormatException
-
MemoryStream
public MemoryStream(byte[] buffer, boolean writable) throws java.lang.Throwable, ArgumentException, ArgumentOutOfRangeException, PlatformNotSupportedException, NotSupportedException, ObjectDisposedException, InvalidOperationException, RankException, ArrayTypeMismatchException, ArgumentNullException
-
MemoryStream
public MemoryStream(byte[] buffer, int index, int count, boolean writable, boolean publiclyVisible) throws java.lang.Throwable, ArgumentException, ArgumentOutOfRangeException, PlatformNotSupportedException, NotSupportedException, ObjectDisposedException, InvalidOperationException, RankException, ArrayTypeMismatchException, ArgumentNullException
-
MemoryStream
public MemoryStream(byte[] buffer, int index, int count, boolean writable) throws java.lang.Throwable, ArgumentException, NotSupportedException, InvalidOperationException, ArgumentOutOfRangeException, ArgumentNullException, PlatformNotSupportedException, IndexOutOfRangeException, FormatException
-
MemoryStream
public MemoryStream(byte[] buffer, int index, int count) throws java.lang.Throwable, ArgumentException, NotSupportedException, InvalidOperationException, ArgumentOutOfRangeException, ArgumentNullException, PlatformNotSupportedException, IndexOutOfRangeException, FormatException
-
MemoryStream
public MemoryStream(byte[] buffer) throws java.lang.Throwable, ArgumentException, NotSupportedException, InvalidOperationException, ArgumentOutOfRangeException, ArgumentNullException- Throws:
java.lang.ThrowableArgumentExceptionNotSupportedExceptionInvalidOperationExceptionArgumentOutOfRangeExceptionArgumentNullException
-
MemoryStream
public MemoryStream(int capacity) throws java.lang.Throwable, ArgumentException, ArgumentOutOfRangeException, ArgumentNullException, InvalidOperationException, PlatformNotSupportedException, ArrayTypeMismatchException, NotSupportedException, ObjectDisposedException, RankException, IndexOutOfRangeException
-
-
Method Detail
-
getJCOAssemblyName
public java.lang.String getJCOAssemblyName()
Description copied from interface:IJCOBridgeReflectedReturns the reflected Assembly name- Specified by:
getJCOAssemblyNamein interfaceIJCOBridgeReflected- Overrides:
getJCOAssemblyNamein classStream- Returns:
- A
Stringrepresenting the Fullname of reflected Assembly
-
getJCOClassName
public java.lang.String getJCOClassName()
Description copied from interface:IJCOBridgeReflectedReturns the reflected Class name- Specified by:
getJCOClassNamein interfaceIJCOBridgeReflected- Overrides:
getJCOClassNamein classStream- Returns:
- A
Stringrepresenting the Fullname of reflected Class
-
getJCOObjectName
public java.lang.String getJCOObjectName()
Description copied from interface:IJCOBridgeReflectedReturns the reflected Class name used to build the object- Specified by:
getJCOObjectNamein interfaceIJCOBridgeReflected- Overrides:
getJCOObjectNamein classStream- Returns:
- A
Stringrepresenting the name used to allocated the object in CLR context
-
getJCOInstance
public java.lang.Object getJCOInstance()
Description copied from interface:IJCOBridgeReflectedReturns the instantiated class- Specified by:
getJCOInstancein interfaceIJCOBridgeReflected- Overrides:
getJCOInstancein classStream- Returns:
- An
Objectrepresenting the CLR instance of the instantiated Class
-
setJCOInstance
public void setJCOInstance(JCObject instance)
- Overrides:
setJCOInstancein classStream
-
getJCOType
public JCType getJCOType()
Description copied from interface:IJCOBridgeReflectedReturns the instantiated class Type- Specified by:
getJCOTypein interfaceIJCOBridgeReflected- Overrides:
getJCOTypein classStream- Returns:
- A
JCTyperepresenting the CLR Type of the instantiated Class
-
cast
public static MemoryStream cast(IJCOBridgeReflected from) throws java.lang.Throwable
Try to cast theIJCOBridgeReflectedinstance intoMemoryStream, a cast assert is made to check if types are compatible.- Parameters:
from-IJCOBridgeReflectedinstance to be casted- Returns:
MemoryStreaminstance- Throws:
java.lang.Throwable- in case of error during cast operation
-
GetBuffer
public byte[] GetBuffer() throws java.lang.Throwable, ArgumentException, ArgumentOutOfRangeException, ArgumentNullException, InvalidOperationException, PlatformNotSupportedException, ArrayTypeMismatchException, NotSupportedException, IndexOutOfRangeException, RankException, CultureNotFoundException, ObjectDisposedException, UnauthorizedAccessException- Throws:
java.lang.ThrowableArgumentExceptionArgumentOutOfRangeExceptionArgumentNullExceptionInvalidOperationExceptionPlatformNotSupportedExceptionArrayTypeMismatchExceptionNotSupportedExceptionIndexOutOfRangeExceptionRankExceptionCultureNotFoundExceptionObjectDisposedExceptionUnauthorizedAccessException
-
ToArray
public byte[] ToArray() throws java.lang.Throwable, ArgumentException, ArgumentOutOfRangeException, PlatformNotSupportedException, ObjectDisposedException, InvalidOperationException, RankException, ArrayTypeMismatchException, NotSupportedException
-
Read
public int Read(byte[] buffer, int offset, int count) throws java.lang.Throwable, ArgumentException, ArgumentOutOfRangeException, PlatformNotSupportedException, NotSupportedException, ObjectDisposedException, InvalidOperationException, RankException, ArrayTypeMismatchException, ArgumentNullException- Overrides:
Readin classStream- Throws:
java.lang.ThrowableArgumentExceptionArgumentOutOfRangeExceptionPlatformNotSupportedExceptionNotSupportedExceptionObjectDisposedExceptionInvalidOperationExceptionRankExceptionArrayTypeMismatchExceptionArgumentNullException
-
Read
public int Read(JCORefOut dupParam0, int dupParam1, int dupParam2) throws java.lang.Throwable, ArgumentException, ArgumentOutOfRangeException, PlatformNotSupportedException, NotSupportedException, ObjectDisposedException, InvalidOperationException, RankException, ArrayTypeMismatchException, ArgumentNullException
- Overrides:
Readin classStream- Throws:
java.lang.ThrowableArgumentExceptionArgumentOutOfRangeExceptionPlatformNotSupportedExceptionNotSupportedExceptionObjectDisposedExceptionInvalidOperationExceptionRankExceptionArrayTypeMismatchExceptionArgumentNullException
-
ReadByte
public int ReadByte() throws java.lang.Throwable, ArgumentException, ArgumentOutOfRangeException, ArgumentNullException, InvalidOperationException, PlatformNotSupportedException, ArrayTypeMismatchException, NotSupportedException, ObjectDisposedException, RankException, IndexOutOfRangeException
-
Seek
public long Seek(long offset, SeekOrigin loc) throws java.lang.Throwable, ArgumentException, ArgumentOutOfRangeException, ArgumentNullException, InvalidOperationException, PlatformNotSupportedException, ArrayTypeMismatchException, NotSupportedException, ObjectDisposedException, RankException, IndexOutOfRangeException, IOException- Overrides:
Seekin classStream- Throws:
java.lang.ThrowableArgumentExceptionArgumentOutOfRangeExceptionArgumentNullExceptionInvalidOperationExceptionPlatformNotSupportedExceptionArrayTypeMismatchExceptionNotSupportedExceptionObjectDisposedExceptionRankExceptionIndexOutOfRangeExceptionIOException
-
CopyToAsync
public Task CopyToAsync(Stream destination, int bufferSize, CancellationToken cancellationToken) throws java.lang.Throwable, ArgumentException, NotSupportedException, InvalidOperationException, ArgumentOutOfRangeException, ArgumentNullException, PlatformNotSupportedException, IndexOutOfRangeException, FormatException, ObjectDisposedException, NullReferenceException, OperationCanceledException, TaskCanceledException, AggregateException, SemaphoreFullException, TaskSchedulerException
- Overrides:
CopyToAsyncin classStream- Throws:
java.lang.ThrowableArgumentExceptionNotSupportedExceptionInvalidOperationExceptionArgumentOutOfRangeExceptionArgumentNullExceptionPlatformNotSupportedExceptionIndexOutOfRangeExceptionFormatExceptionObjectDisposedExceptionNullReferenceExceptionOperationCanceledExceptionTaskCanceledExceptionAggregateExceptionSemaphoreFullExceptionTaskSchedulerException
-
FlushAsync
public Task FlushAsync(CancellationToken cancellationToken) throws java.lang.Throwable, ArgumentException, ArgumentOutOfRangeException, PlatformNotSupportedException, NotSupportedException, ObjectDisposedException, InvalidOperationException, RankException, ArrayTypeMismatchException, NullReferenceException, ArgumentNullException, IndexOutOfRangeException
- Overrides:
FlushAsyncin classStream- Throws:
java.lang.ThrowableArgumentExceptionArgumentOutOfRangeExceptionPlatformNotSupportedExceptionNotSupportedExceptionObjectDisposedExceptionInvalidOperationExceptionRankExceptionArrayTypeMismatchExceptionNullReferenceExceptionArgumentNullExceptionIndexOutOfRangeException
-
WriteAsync
public Task WriteAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken) throws java.lang.Throwable, ArgumentException, ArgumentOutOfRangeException, PlatformNotSupportedException, NotSupportedException, ObjectDisposedException, InvalidOperationException, RankException, ArrayTypeMismatchException, ArgumentNullException, NullReferenceException, IndexOutOfRangeException
- Overrides:
WriteAsyncin classStream- Throws:
java.lang.ThrowableArgumentExceptionArgumentOutOfRangeExceptionPlatformNotSupportedExceptionNotSupportedExceptionObjectDisposedExceptionInvalidOperationExceptionRankExceptionArrayTypeMismatchExceptionArgumentNullExceptionNullReferenceExceptionIndexOutOfRangeException
-
WriteAsync
public Task WriteAsync(JCORefOut dupParam0, int dupParam1, int dupParam2, CancellationToken dupParam3) throws java.lang.Throwable, ArgumentException, ArgumentOutOfRangeException, PlatformNotSupportedException, NotSupportedException, ObjectDisposedException, InvalidOperationException, RankException, ArrayTypeMismatchException, ArgumentNullException, NullReferenceException, IndexOutOfRangeException
- Overrides:
WriteAsyncin classStream- Throws:
java.lang.ThrowableArgumentExceptionArgumentOutOfRangeExceptionPlatformNotSupportedExceptionNotSupportedExceptionObjectDisposedExceptionInvalidOperationExceptionRankExceptionArrayTypeMismatchExceptionArgumentNullExceptionNullReferenceExceptionIndexOutOfRangeException
-
CopyTo
public void CopyTo(Stream destination, int bufferSize) throws java.lang.Throwable, NotSupportedException, ArgumentException, ArgumentNullException, PlatformNotSupportedException, IndexOutOfRangeException, ArgumentOutOfRangeException, FormatException, ObjectDisposedException
- Overrides:
CopyToin classStream- Throws:
java.lang.ThrowableNotSupportedExceptionArgumentExceptionArgumentNullExceptionPlatformNotSupportedExceptionIndexOutOfRangeExceptionArgumentOutOfRangeExceptionFormatExceptionObjectDisposedException
-
Flush
public void Flush() throws java.lang.Throwable
-
SetLength
public void SetLength(long value) throws java.lang.Throwable, ArgumentException, ArgumentOutOfRangeException, ArgumentNullException, InvalidOperationException, PlatformNotSupportedException, ArrayTypeMismatchException, NotSupportedException, IndexOutOfRangeException, RankException, CultureNotFoundException, ObjectDisposedException, IOException- Overrides:
SetLengthin classStream- Throws:
java.lang.ThrowableArgumentExceptionArgumentOutOfRangeExceptionArgumentNullExceptionInvalidOperationExceptionPlatformNotSupportedExceptionArrayTypeMismatchExceptionNotSupportedExceptionIndexOutOfRangeExceptionRankExceptionCultureNotFoundExceptionObjectDisposedExceptionIOException
-
Write
public void Write(byte[] buffer, int offset, int count) throws java.lang.Throwable, ArgumentException, ArgumentOutOfRangeException, PlatformNotSupportedException, NotSupportedException, ObjectDisposedException, InvalidOperationException, RankException, ArrayTypeMismatchException, ArgumentNullException, IOException, IndexOutOfRangeException- Overrides:
Writein classStream- Throws:
java.lang.ThrowableArgumentExceptionArgumentOutOfRangeExceptionPlatformNotSupportedExceptionNotSupportedExceptionObjectDisposedExceptionInvalidOperationExceptionRankExceptionArrayTypeMismatchExceptionArgumentNullExceptionIOExceptionIndexOutOfRangeException
-
Write
public void Write(JCORefOut dupParam0, int dupParam1, int dupParam2) throws java.lang.Throwable, ArgumentException, ArgumentOutOfRangeException, PlatformNotSupportedException, NotSupportedException, ObjectDisposedException, InvalidOperationException, RankException, ArrayTypeMismatchException, ArgumentNullException, IOException, IndexOutOfRangeException
- Overrides:
Writein classStream- Throws:
java.lang.ThrowableArgumentExceptionArgumentOutOfRangeExceptionPlatformNotSupportedExceptionNotSupportedExceptionObjectDisposedExceptionInvalidOperationExceptionRankExceptionArrayTypeMismatchExceptionArgumentNullExceptionIOExceptionIndexOutOfRangeException
-
WriteByte
public void WriteByte(byte value) throws java.lang.Throwable, ArgumentException, ArgumentOutOfRangeException, ArgumentNullException, InvalidOperationException, PlatformNotSupportedException, ArrayTypeMismatchException, NotSupportedException, ObjectDisposedException, RankException, IndexOutOfRangeException, IOException- Overrides:
WriteBytein classStream- Throws:
java.lang.ThrowableArgumentExceptionArgumentOutOfRangeExceptionArgumentNullExceptionInvalidOperationExceptionPlatformNotSupportedExceptionArrayTypeMismatchExceptionNotSupportedExceptionObjectDisposedExceptionRankExceptionIndexOutOfRangeExceptionIOException
-
WriteTo
public void WriteTo(Stream stream) throws java.lang.Throwable, ArgumentException, ArgumentOutOfRangeException, PlatformNotSupportedException, NotSupportedException, ObjectDisposedException, InvalidOperationException, RankException, ArrayTypeMismatchException, ArgumentNullException
-
getCapacity
public int getCapacity() throws java.lang.Throwable, ArgumentException, ArgumentOutOfRangeException, ArgumentNullException, InvalidOperationException, PlatformNotSupportedException, ArrayTypeMismatchException, NotSupportedException, ObjectDisposedException, RankException, IndexOutOfRangeException
-
setCapacity
public void setCapacity(int Capacity) throws java.lang.Throwable, ArgumentException, ArgumentOutOfRangeException, ArgumentNullException, InvalidOperationException, PlatformNotSupportedException, ArrayTypeMismatchException, NotSupportedException, IndexOutOfRangeException, RankException, CultureNotFoundException, ObjectDisposedException
-
-