Package system.net.sockets
Class NetworkStream
- java.lang.Object
-
- org.mases.jcobridge.netreflection.NetObject
-
- system.MarshalByRefObject
-
- system.io.Stream
-
- system.net.sockets.NetworkStream
-
- All Implemented Interfaces:
java.lang.AutoCloseable,IJCOBridgeReflected
public class NetworkStream extends Stream
The base .NET class managing System.Net.Sockets.NetworkStream, System.Net.Sockets, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a.See: https://docs.microsoft.com/en-us/dotnet/api/System.Net.Sockets.NetworkStream
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringassemblyFullNameFully assembly qualified name: System.Net.Sockets, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3astatic java.lang.StringassemblyShortNameAssembly name: System.Net.Socketsstatic java.lang.StringclassNameQualified class name: System.Net.Sockets.NetworkStreamstatic JCTypeclassTypeThe type managed from JCOBridge.
-
Constructor Summary
Constructors Constructor Description NetworkStream()NetworkStream(java.lang.Object instance)Internal constructor.NetworkStream(Socket socket)NetworkStream(Socket socket, boolean ownsSocket)NetworkStream(Socket socket, FileAccess access)NetworkStream(Socket socket, FileAccess access, boolean ownsSocket)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description IAsyncResultBeginRead(byte[] buffer, int offset, int size, AsyncCallback callback, NetObject state)IAsyncResultBeginRead(JCORefOut dupParam0, int dupParam1, int dupParam2, AsyncCallback dupParam3, NetObject dupParam4)IAsyncResultBeginWrite(byte[] buffer, int offset, int size, AsyncCallback callback, NetObject state)IAsyncResultBeginWrite(JCORefOut dupParam0, int dupParam1, int dupParam2, AsyncCallback dupParam3, NetObject dupParam4)static NetworkStreamcast(IJCOBridgeReflected from)Try to cast theIJCOBridgeReflectedinstance intoNetworkStream, a cast assert is made to check if types are compatible.voidClose(int timeout)intEndRead(IAsyncResult asyncResult)voidEndWrite(IAsyncResult asyncResult)voidFlush()TaskFlushAsync(CancellationToken cancellationToken)booleangetDataAvailable()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 TypeSocketgetSocket()intRead(byte[] buffer, int offset, int size)intRead(JCORefOut dupParam0, int dupParam1, int dupParam2)intReadByte()longSeek(long offset, SeekOrigin origin)voidsetJCOInstance(JCObject instance)voidSetLength(long value)voidWrite(byte[] buffer, int offset, int size)voidWrite(JCORefOut dupParam0, int dupParam1, int dupParam2)TaskWriteAsync(byte[] buffer, int offset, int size, CancellationToken cancellationToken)TaskWriteAsync(JCORefOut dupParam0, int dupParam1, int dupParam2, CancellationToken dupParam3)voidWriteByte(byte value)-
Methods inherited from class system.io.Stream
close, Close, CopyTo, CopyTo, CopyToAsync, CopyToAsync, CopyToAsync, CopyToAsync, Dispose, DisposeAsync, FlushAsync, getCanRead, getCanSeek, getCanTimeout, getCanWrite, getLength, getPosition, getReadTimeout, getWriteTimeout, 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.Net.Sockets, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a- See Also:
- Constant Field Values
-
assemblyShortName
public static final java.lang.String assemblyShortName
Assembly name: System.Net.Sockets- See Also:
- Constant Field Values
-
className
public static final java.lang.String className
Qualified class name: System.Net.Sockets.NetworkStream- See Also:
- Constant Field Values
-
-
Constructor Detail
-
NetworkStream
public NetworkStream(java.lang.Object instance) throws java.lang.ThrowableInternal constructor. Use with caution- Throws:
java.lang.Throwable
-
NetworkStream
public NetworkStream() throws java.lang.Throwable- Throws:
java.lang.Throwable
-
NetworkStream
public NetworkStream(Socket socket, boolean ownsSocket) throws java.lang.Throwable, ArgumentException, ArgumentOutOfRangeException, IndexOutOfRangeException, NotSupportedException, ArgumentNullException, ObjectDisposedException, InvalidOperationException, RankException, ArrayTypeMismatchException, PlatformNotSupportedException, FormatException, EventSourceException, OutOfMemoryException, SocketException
- Throws:
java.lang.ThrowableArgumentExceptionArgumentOutOfRangeExceptionIndexOutOfRangeExceptionNotSupportedExceptionArgumentNullExceptionObjectDisposedExceptionInvalidOperationExceptionRankExceptionArrayTypeMismatchExceptionPlatformNotSupportedExceptionFormatExceptionEventSourceExceptionOutOfMemoryExceptionSocketException
-
NetworkStream
public NetworkStream(Socket socket, FileAccess access, boolean ownsSocket) throws java.lang.Throwable, ArgumentException, ArgumentOutOfRangeException, ArgumentNullException, InvalidOperationException, PlatformNotSupportedException, IndexOutOfRangeException, NotSupportedException, ObjectDisposedException, RankException, ArrayTypeMismatchException, FormatException, EventSourceException, OutOfMemoryException, SocketException
- Throws:
java.lang.ThrowableArgumentExceptionArgumentOutOfRangeExceptionArgumentNullExceptionInvalidOperationExceptionPlatformNotSupportedExceptionIndexOutOfRangeExceptionNotSupportedExceptionObjectDisposedExceptionRankExceptionArrayTypeMismatchExceptionFormatExceptionEventSourceExceptionOutOfMemoryExceptionSocketException
-
NetworkStream
public NetworkStream(Socket socket, FileAccess access) throws java.lang.Throwable, ArgumentException, ArgumentOutOfRangeException, IndexOutOfRangeException, NotSupportedException, ArgumentNullException, ObjectDisposedException, InvalidOperationException, RankException, ArrayTypeMismatchException, PlatformNotSupportedException, FormatException, EventSourceException, OutOfMemoryException, SocketException
- Throws:
java.lang.ThrowableArgumentExceptionArgumentOutOfRangeExceptionIndexOutOfRangeExceptionNotSupportedExceptionArgumentNullExceptionObjectDisposedExceptionInvalidOperationExceptionRankExceptionArrayTypeMismatchExceptionPlatformNotSupportedExceptionFormatExceptionEventSourceExceptionOutOfMemoryExceptionSocketException
-
NetworkStream
public NetworkStream(Socket socket) throws java.lang.Throwable, ArgumentException, ArgumentOutOfRangeException, IndexOutOfRangeException, NotSupportedException, ArgumentNullException, ObjectDisposedException, InvalidOperationException, RankException, ArrayTypeMismatchException, PlatformNotSupportedException, FormatException, EventSourceException, OutOfMemoryException, SocketException
- Throws:
java.lang.ThrowableArgumentExceptionArgumentOutOfRangeExceptionIndexOutOfRangeExceptionNotSupportedExceptionArgumentNullExceptionObjectDisposedExceptionInvalidOperationExceptionRankExceptionArrayTypeMismatchExceptionPlatformNotSupportedExceptionFormatExceptionEventSourceExceptionOutOfMemoryExceptionSocketException
-
-
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 NetworkStream cast(IJCOBridgeReflected from) throws java.lang.Throwable
Try to cast theIJCOBridgeReflectedinstance intoNetworkStream, a cast assert is made to check if types are compatible.- Parameters:
from-IJCOBridgeReflectedinstance to be casted- Returns:
NetworkStreaminstance- Throws:
java.lang.Throwable- in case of error during cast operation
-
EndRead
public int EndRead(IAsyncResult asyncResult) throws java.lang.Throwable, ArgumentException, IndexOutOfRangeException, NotSupportedException, ArgumentNullException, InvalidOperationException, ArgumentOutOfRangeException, PlatformNotSupportedException, ObjectDisposedException, FormatException, AbandonedMutexException, SocketException, IOException
- Overrides:
EndReadin classStream- Throws:
java.lang.ThrowableArgumentExceptionIndexOutOfRangeExceptionNotSupportedExceptionArgumentNullExceptionInvalidOperationExceptionArgumentOutOfRangeExceptionPlatformNotSupportedExceptionObjectDisposedExceptionFormatExceptionAbandonedMutexExceptionSocketExceptionIOException
-
Read
public int Read(byte[] buffer, int offset, int size) throws java.lang.Throwable, ArgumentException, IndexOutOfRangeException, NotSupportedException, ArgumentNullException, InvalidOperationException, ArgumentOutOfRangeException, PlatformNotSupportedException, ObjectDisposedException, SocketException, ArrayTypeMismatchException, IOException- Overrides:
Readin classStream- Throws:
java.lang.ThrowableArgumentExceptionIndexOutOfRangeExceptionNotSupportedExceptionArgumentNullExceptionInvalidOperationExceptionArgumentOutOfRangeExceptionPlatformNotSupportedExceptionObjectDisposedExceptionSocketExceptionArrayTypeMismatchExceptionIOException
-
Read
public int Read(JCORefOut dupParam0, int dupParam1, int dupParam2) throws java.lang.Throwable, ArgumentException, IndexOutOfRangeException, NotSupportedException, ArgumentNullException, InvalidOperationException, ArgumentOutOfRangeException, PlatformNotSupportedException, ObjectDisposedException, SocketException, ArrayTypeMismatchException, IOException
- Overrides:
Readin classStream- Throws:
java.lang.ThrowableArgumentExceptionIndexOutOfRangeExceptionNotSupportedExceptionArgumentNullExceptionInvalidOperationExceptionArgumentOutOfRangeExceptionPlatformNotSupportedExceptionObjectDisposedExceptionSocketExceptionArrayTypeMismatchExceptionIOException
-
ReadByte
public int ReadByte() throws java.lang.Throwable, ArgumentException, IndexOutOfRangeException, NotSupportedException, ArgumentNullException, InvalidOperationException, ArgumentOutOfRangeException, PlatformNotSupportedException, IOException, ArrayTypeMismatchException- Overrides:
ReadBytein classStream- Throws:
java.lang.ThrowableArgumentExceptionIndexOutOfRangeExceptionNotSupportedExceptionArgumentNullExceptionInvalidOperationExceptionArgumentOutOfRangeExceptionPlatformNotSupportedExceptionIOExceptionArrayTypeMismatchException
-
Seek
public long Seek(long offset, SeekOrigin origin) throws java.lang.Throwable, ArgumentNullException, ArgumentException, ArgumentOutOfRangeException, CultureNotFoundException, NotSupportedException- Overrides:
Seekin classStream- Throws:
java.lang.ThrowableArgumentNullExceptionArgumentExceptionArgumentOutOfRangeExceptionCultureNotFoundExceptionNotSupportedException
-
BeginRead
public IAsyncResult BeginRead(byte[] buffer, int offset, int size, AsyncCallback callback, NetObject state) throws java.lang.Throwable, ArgumentException, IndexOutOfRangeException, NotSupportedException, ArgumentNullException, InvalidOperationException, ArgumentOutOfRangeException, PlatformNotSupportedException, ObjectDisposedException, FormatException, EventSourceException, SecurityException, SocketException, IOException
- Overrides:
BeginReadin classStream- Throws:
java.lang.ThrowableArgumentExceptionIndexOutOfRangeExceptionNotSupportedExceptionArgumentNullExceptionInvalidOperationExceptionArgumentOutOfRangeExceptionPlatformNotSupportedExceptionObjectDisposedExceptionFormatExceptionEventSourceExceptionSecurityExceptionSocketExceptionIOException
-
BeginRead
public IAsyncResult BeginRead(JCORefOut dupParam0, int dupParam1, int dupParam2, AsyncCallback dupParam3, NetObject dupParam4) throws java.lang.Throwable, ArgumentException, IndexOutOfRangeException, NotSupportedException, ArgumentNullException, InvalidOperationException, ArgumentOutOfRangeException, PlatformNotSupportedException, ObjectDisposedException, FormatException, EventSourceException, SecurityException, SocketException, IOException
- Overrides:
BeginReadin classStream- Throws:
java.lang.ThrowableArgumentExceptionIndexOutOfRangeExceptionNotSupportedExceptionArgumentNullExceptionInvalidOperationExceptionArgumentOutOfRangeExceptionPlatformNotSupportedExceptionObjectDisposedExceptionFormatExceptionEventSourceExceptionSecurityExceptionSocketExceptionIOException
-
BeginWrite
public IAsyncResult BeginWrite(byte[] buffer, int offset, int size, AsyncCallback callback, NetObject state) throws java.lang.Throwable, ArgumentException, IndexOutOfRangeException, NotSupportedException, ArgumentNullException, InvalidOperationException, ArgumentOutOfRangeException, PlatformNotSupportedException, ObjectDisposedException, FormatException, EventSourceException, SocketException, ArrayTypeMismatchException, SecurityException, IOException
- Overrides:
BeginWritein classStream- Throws:
java.lang.ThrowableArgumentExceptionIndexOutOfRangeExceptionNotSupportedExceptionArgumentNullExceptionInvalidOperationExceptionArgumentOutOfRangeExceptionPlatformNotSupportedExceptionObjectDisposedExceptionFormatExceptionEventSourceExceptionSocketExceptionArrayTypeMismatchExceptionSecurityExceptionIOException
-
BeginWrite
public IAsyncResult BeginWrite(JCORefOut dupParam0, int dupParam1, int dupParam2, AsyncCallback dupParam3, NetObject dupParam4) throws java.lang.Throwable, ArgumentException, IndexOutOfRangeException, NotSupportedException, ArgumentNullException, InvalidOperationException, ArgumentOutOfRangeException, PlatformNotSupportedException, ObjectDisposedException, FormatException, EventSourceException, SocketException, ArrayTypeMismatchException, SecurityException, IOException
- Overrides:
BeginWritein classStream- Throws:
java.lang.ThrowableArgumentExceptionIndexOutOfRangeExceptionNotSupportedExceptionArgumentNullExceptionInvalidOperationExceptionArgumentOutOfRangeExceptionPlatformNotSupportedExceptionObjectDisposedExceptionFormatExceptionEventSourceExceptionSocketExceptionArrayTypeMismatchExceptionSecurityExceptionIOException
-
FlushAsync
public Task FlushAsync(CancellationToken cancellationToken) throws java.lang.Throwable
- Overrides:
FlushAsyncin classStream- Throws:
java.lang.Throwable
-
WriteAsync
public Task WriteAsync(byte[] buffer, int offset, int size, CancellationToken cancellationToken) throws java.lang.Throwable, ArgumentException, IndexOutOfRangeException, NotSupportedException, ArgumentNullException, InvalidOperationException, ArgumentOutOfRangeException, PlatformNotSupportedException, ObjectDisposedException, SynchronizationLockException, ArrayTypeMismatchException, FormatException, IOException
- Overrides:
WriteAsyncin classStream- Throws:
java.lang.ThrowableArgumentExceptionIndexOutOfRangeExceptionNotSupportedExceptionArgumentNullExceptionInvalidOperationExceptionArgumentOutOfRangeExceptionPlatformNotSupportedExceptionObjectDisposedExceptionSynchronizationLockExceptionArrayTypeMismatchExceptionFormatExceptionIOException
-
WriteAsync
public Task WriteAsync(JCORefOut dupParam0, int dupParam1, int dupParam2, CancellationToken dupParam3) throws java.lang.Throwable, ArgumentException, IndexOutOfRangeException, NotSupportedException, ArgumentNullException, InvalidOperationException, ArgumentOutOfRangeException, PlatformNotSupportedException, ObjectDisposedException, SynchronizationLockException, ArrayTypeMismatchException, FormatException, IOException
- Overrides:
WriteAsyncin classStream- Throws:
java.lang.ThrowableArgumentExceptionIndexOutOfRangeExceptionNotSupportedExceptionArgumentNullExceptionInvalidOperationExceptionArgumentOutOfRangeExceptionPlatformNotSupportedExceptionObjectDisposedExceptionSynchronizationLockExceptionArrayTypeMismatchExceptionFormatExceptionIOException
-
Close
public void Close(int timeout) throws java.lang.Throwable, ArgumentException, ArgumentOutOfRangeException, ArgumentNullException, InvalidOperationException, PlatformNotSupportedException, IndexOutOfRangeException, NotSupportedException, ObjectDisposedException, RankException, ArrayTypeMismatchException
-
EndWrite
public void EndWrite(IAsyncResult asyncResult) throws java.lang.Throwable, ArgumentException, IndexOutOfRangeException, NotSupportedException, ArgumentNullException, InvalidOperationException, ArgumentOutOfRangeException, PlatformNotSupportedException, ObjectDisposedException, FormatException, AbandonedMutexException, SocketException, IOException
- Overrides:
EndWritein classStream- Throws:
java.lang.ThrowableArgumentExceptionIndexOutOfRangeExceptionNotSupportedExceptionArgumentNullExceptionInvalidOperationExceptionArgumentOutOfRangeExceptionPlatformNotSupportedExceptionObjectDisposedExceptionFormatExceptionAbandonedMutexExceptionSocketExceptionIOException
-
Flush
public void Flush() throws java.lang.Throwable
-
SetLength
public void SetLength(long value) throws java.lang.Throwable, ArgumentNullException, ArgumentException, ArgumentOutOfRangeException, CultureNotFoundException, NotSupportedException- Overrides:
SetLengthin classStream- Throws:
java.lang.ThrowableArgumentNullExceptionArgumentExceptionArgumentOutOfRangeExceptionCultureNotFoundExceptionNotSupportedException
-
Write
public void Write(byte[] buffer, int offset, int size) throws java.lang.Throwable, ArgumentException, IndexOutOfRangeException, NotSupportedException, ArgumentNullException, InvalidOperationException, ArgumentOutOfRangeException, PlatformNotSupportedException, ObjectDisposedException, SocketException, ArrayTypeMismatchException, IOException- Overrides:
Writein classStream- Throws:
java.lang.ThrowableArgumentExceptionIndexOutOfRangeExceptionNotSupportedExceptionArgumentNullExceptionInvalidOperationExceptionArgumentOutOfRangeExceptionPlatformNotSupportedExceptionObjectDisposedExceptionSocketExceptionArrayTypeMismatchExceptionIOException
-
Write
public void Write(JCORefOut dupParam0, int dupParam1, int dupParam2) throws java.lang.Throwable, ArgumentException, IndexOutOfRangeException, NotSupportedException, ArgumentNullException, InvalidOperationException, ArgumentOutOfRangeException, PlatformNotSupportedException, ObjectDisposedException, SocketException, ArrayTypeMismatchException, IOException
- Overrides:
Writein classStream- Throws:
java.lang.ThrowableArgumentExceptionIndexOutOfRangeExceptionNotSupportedExceptionArgumentNullExceptionInvalidOperationExceptionArgumentOutOfRangeExceptionPlatformNotSupportedExceptionObjectDisposedExceptionSocketExceptionArrayTypeMismatchExceptionIOException
-
WriteByte
public void WriteByte(byte value) throws java.lang.Throwable, ArgumentException, IndexOutOfRangeException, NotSupportedException, ArgumentNullException, InvalidOperationException, ArgumentOutOfRangeException, PlatformNotSupportedException, ArrayTypeMismatchException- Overrides:
WriteBytein classStream- Throws:
java.lang.ThrowableArgumentExceptionIndexOutOfRangeExceptionNotSupportedExceptionArgumentNullExceptionInvalidOperationExceptionArgumentOutOfRangeExceptionPlatformNotSupportedExceptionArrayTypeMismatchException
-
getDataAvailable
public boolean getDataAvailable() throws java.lang.Throwable, ArgumentException, IndexOutOfRangeException, NotSupportedException, ArgumentNullException, InvalidOperationException, ArgumentOutOfRangeException, PlatformNotSupportedException, ObjectDisposedException, FormatException, EventSourceException, OutOfMemoryException, SocketException
-
getSocket
public Socket getSocket() throws java.lang.Throwable
- Throws:
java.lang.Throwable
-
-