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=8.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.String
assemblyFullName
Fully assembly qualified name: System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798estatic java.lang.String
assemblyShortName
Assembly name: System.Private.CoreLibstatic java.lang.String
className
Qualified class name: System.IO.MemoryStreamstatic JCType
classType
The 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 MemoryStream
cast(IJCOBridgeReflected from)
Try to cast theIJCOBridgeReflected
instance intoMemoryStream
, a cast assert is made to check if types are compatible.void
CopyTo(Stream destination, int bufferSize)
Task
CopyToAsync(Stream destination, int bufferSize, CancellationToken cancellationToken)
void
Flush()
Task
FlushAsync(CancellationToken cancellationToken)
byte[]
GetBuffer()
int
getCapacity()
java.lang.String
getJCOAssemblyName()
Returns the reflected Assembly namejava.lang.String
getJCOClassName()
Returns the reflected Class namejava.lang.Object
getJCOInstance()
Returns the instantiated classjava.lang.String
getJCOObjectName()
Returns the reflected Class name used to build the objectJCType
getJCOType()
Returns the instantiated class Typeint
Read(byte[] buffer, int offset, int count)
int
Read(JCORefOut dupParam0, int dupParam1, int dupParam2)
int
ReadByte()
long
Seek(long offset, SeekOrigin loc)
void
setCapacity(int Capacity)
void
setJCOInstance(JCObject instance)
void
SetLength(long value)
byte[]
ToArray()
void
Write(byte[] buffer, int offset, int count)
void
Write(JCORefOut dupParam0, int dupParam1, int dupParam2)
Task
WriteAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken)
Task
WriteAsync(JCORefOut dupParam0, int dupParam1, int dupParam2, CancellationToken dupParam3)
void
WriteByte(byte value)
void
WriteTo(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=8.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.Throwable
Internal 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, IndexOutOfRangeException, PlatformNotSupportedException, FormatException
-
MemoryStream
public MemoryStream(byte[] buffer, int index, int count) throws java.lang.Throwable, ArgumentException, NotSupportedException, InvalidOperationException, ArgumentOutOfRangeException, ArgumentNullException, IndexOutOfRangeException, PlatformNotSupportedException, FormatException
-
MemoryStream
public MemoryStream(byte[] buffer) throws java.lang.Throwable, ArgumentException, NotSupportedException, InvalidOperationException, ArgumentOutOfRangeException, ArgumentNullException
- Throws:
java.lang.Throwable
ArgumentException
NotSupportedException
InvalidOperationException
ArgumentOutOfRangeException
ArgumentNullException
-
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:IJCOBridgeReflected
Returns the reflected Assembly name- Specified by:
getJCOAssemblyName
in interfaceIJCOBridgeReflected
- Overrides:
getJCOAssemblyName
in classStream
- Returns:
- A
String
representing the Fullname of reflected Assembly
-
getJCOClassName
public java.lang.String getJCOClassName()
Description copied from interface:IJCOBridgeReflected
Returns the reflected Class name- Specified by:
getJCOClassName
in interfaceIJCOBridgeReflected
- Overrides:
getJCOClassName
in classStream
- Returns:
- A
String
representing the Fullname of reflected Class
-
getJCOObjectName
public java.lang.String getJCOObjectName()
Description copied from interface:IJCOBridgeReflected
Returns the reflected Class name used to build the object- Specified by:
getJCOObjectName
in interfaceIJCOBridgeReflected
- Overrides:
getJCOObjectName
in classStream
- Returns:
- A
String
representing the name used to allocated the object in CLR context
-
getJCOInstance
public java.lang.Object getJCOInstance()
Description copied from interface:IJCOBridgeReflected
Returns the instantiated class- Specified by:
getJCOInstance
in interfaceIJCOBridgeReflected
- Overrides:
getJCOInstance
in classStream
- Returns:
- An
Object
representing the CLR instance of the instantiated Class
-
setJCOInstance
public void setJCOInstance(JCObject instance)
- Overrides:
setJCOInstance
in classStream
-
getJCOType
public JCType getJCOType()
Description copied from interface:IJCOBridgeReflected
Returns the instantiated class Type- Specified by:
getJCOType
in interfaceIJCOBridgeReflected
- Overrides:
getJCOType
in classStream
- Returns:
- A
JCType
representing the CLR Type of the instantiated Class
-
cast
public static MemoryStream cast(IJCOBridgeReflected from) throws java.lang.Throwable
Try to cast theIJCOBridgeReflected
instance intoMemoryStream
, a cast assert is made to check if types are compatible.- Parameters:
from
-IJCOBridgeReflected
instance to be casted- Returns:
MemoryStream
instance- 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.Throwable
ArgumentException
ArgumentOutOfRangeException
ArgumentNullException
InvalidOperationException
PlatformNotSupportedException
ArrayTypeMismatchException
NotSupportedException
IndexOutOfRangeException
RankException
CultureNotFoundException
ObjectDisposedException
UnauthorizedAccessException
-
ToArray
public byte[] ToArray() throws java.lang.Throwable, ArgumentException, ArgumentOutOfRangeException, PlatformNotSupportedException, NotSupportedException, ObjectDisposedException, InvalidOperationException, RankException, ArrayTypeMismatchException
-
Read
public int Read(byte[] buffer, int offset, int count) throws java.lang.Throwable, ArgumentException, ArgumentOutOfRangeException, PlatformNotSupportedException, NotSupportedException, ObjectDisposedException, InvalidOperationException, RankException, ArrayTypeMismatchException, ArgumentNullException
- Overrides:
Read
in classStream
- Throws:
java.lang.Throwable
ArgumentException
ArgumentOutOfRangeException
PlatformNotSupportedException
NotSupportedException
ObjectDisposedException
InvalidOperationException
RankException
ArrayTypeMismatchException
ArgumentNullException
-
Read
public int Read(JCORefOut dupParam0, int dupParam1, int dupParam2) throws java.lang.Throwable, ArgumentException, ArgumentOutOfRangeException, PlatformNotSupportedException, NotSupportedException, ObjectDisposedException, InvalidOperationException, RankException, ArrayTypeMismatchException, ArgumentNullException
- Overrides:
Read
in classStream
- Throws:
java.lang.Throwable
ArgumentException
ArgumentOutOfRangeException
PlatformNotSupportedException
NotSupportedException
ObjectDisposedException
InvalidOperationException
RankException
ArrayTypeMismatchException
ArgumentNullException
-
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:
Seek
in classStream
- Throws:
java.lang.Throwable
ArgumentException
ArgumentOutOfRangeException
ArgumentNullException
InvalidOperationException
PlatformNotSupportedException
ArrayTypeMismatchException
NotSupportedException
ObjectDisposedException
RankException
IndexOutOfRangeException
IOException
-
CopyToAsync
public Task CopyToAsync(Stream destination, int bufferSize, CancellationToken cancellationToken) throws java.lang.Throwable, ArgumentException, NotSupportedException, InvalidOperationException, ArgumentOutOfRangeException, ArgumentNullException, IndexOutOfRangeException, PlatformNotSupportedException, FormatException, ObjectDisposedException, OperationCanceledException, TaskCanceledException, AggregateException, SemaphoreFullException, TaskSchedulerException
- Overrides:
CopyToAsync
in classStream
- Throws:
java.lang.Throwable
ArgumentException
NotSupportedException
InvalidOperationException
ArgumentOutOfRangeException
ArgumentNullException
IndexOutOfRangeException
PlatformNotSupportedException
FormatException
ObjectDisposedException
OperationCanceledException
TaskCanceledException
AggregateException
SemaphoreFullException
TaskSchedulerException
-
FlushAsync
public Task FlushAsync(CancellationToken cancellationToken) throws java.lang.Throwable, ArgumentException, ArgumentOutOfRangeException, PlatformNotSupportedException, NotSupportedException, ObjectDisposedException, InvalidOperationException, RankException, ArrayTypeMismatchException, ArgumentNullException, IndexOutOfRangeException
- Overrides:
FlushAsync
in classStream
- Throws:
java.lang.Throwable
ArgumentException
ArgumentOutOfRangeException
PlatformNotSupportedException
NotSupportedException
ObjectDisposedException
InvalidOperationException
RankException
ArrayTypeMismatchException
ArgumentNullException
IndexOutOfRangeException
-
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, IndexOutOfRangeException
- Overrides:
WriteAsync
in classStream
- Throws:
java.lang.Throwable
ArgumentException
ArgumentOutOfRangeException
PlatformNotSupportedException
NotSupportedException
ObjectDisposedException
InvalidOperationException
RankException
ArrayTypeMismatchException
ArgumentNullException
IndexOutOfRangeException
-
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, IndexOutOfRangeException
- Overrides:
WriteAsync
in classStream
- Throws:
java.lang.Throwable
ArgumentException
ArgumentOutOfRangeException
PlatformNotSupportedException
NotSupportedException
ObjectDisposedException
InvalidOperationException
RankException
ArrayTypeMismatchException
ArgumentNullException
IndexOutOfRangeException
-
CopyTo
public void CopyTo(Stream destination, int bufferSize) throws java.lang.Throwable, NotSupportedException, ArgumentException, ArgumentNullException, InvalidOperationException, ArgumentOutOfRangeException, PlatformNotSupportedException, FormatException, ObjectDisposedException
- Overrides:
CopyTo
in classStream
- Throws:
java.lang.Throwable
NotSupportedException
ArgumentException
ArgumentNullException
InvalidOperationException
ArgumentOutOfRangeException
PlatformNotSupportedException
FormatException
ObjectDisposedException
-
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:
SetLength
in classStream
- Throws:
java.lang.Throwable
ArgumentException
ArgumentOutOfRangeException
ArgumentNullException
InvalidOperationException
PlatformNotSupportedException
ArrayTypeMismatchException
NotSupportedException
IndexOutOfRangeException
RankException
CultureNotFoundException
ObjectDisposedException
IOException
-
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:
Write
in classStream
- Throws:
java.lang.Throwable
ArgumentException
ArgumentOutOfRangeException
PlatformNotSupportedException
NotSupportedException
ObjectDisposedException
InvalidOperationException
RankException
ArrayTypeMismatchException
ArgumentNullException
IOException
IndexOutOfRangeException
-
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:
Write
in classStream
- Throws:
java.lang.Throwable
ArgumentException
ArgumentOutOfRangeException
PlatformNotSupportedException
NotSupportedException
ObjectDisposedException
InvalidOperationException
RankException
ArrayTypeMismatchException
ArgumentNullException
IOException
IndexOutOfRangeException
-
WriteByte
public void WriteByte(byte value) throws java.lang.Throwable, ArgumentException, ArgumentOutOfRangeException, ArgumentNullException, InvalidOperationException, PlatformNotSupportedException, ArrayTypeMismatchException, NotSupportedException, ObjectDisposedException, RankException, IndexOutOfRangeException, IOException
- Overrides:
WriteByte
in classStream
- Throws:
java.lang.Throwable
ArgumentException
ArgumentOutOfRangeException
ArgumentNullException
InvalidOperationException
PlatformNotSupportedException
ArrayTypeMismatchException
NotSupportedException
ObjectDisposedException
RankException
IndexOutOfRangeException
IOException
-
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
-
-