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=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a..NET documentation at https://docs.microsoft.com/en-us/dotnet/api/System.Net.Sockets.NetworkStream
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.Net.Sockets, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3astatic java.lang.String
assemblyShortName
Assembly name: System.Net.Socketsstatic java.lang.String
className
Qualified class name: System.Net.Sockets.NetworkStreamstatic JCType
classType
The 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 IAsyncResult
BeginRead(byte[] buffer, int offset, int count, AsyncCallback callback, NetObject state)
IAsyncResult
BeginRead(JCORefOut dupParam0, int dupParam1, int dupParam2, AsyncCallback dupParam3, NetObject dupParam4)
IAsyncResult
BeginWrite(byte[] buffer, int offset, int count, AsyncCallback callback, NetObject state)
IAsyncResult
BeginWrite(JCORefOut dupParam0, int dupParam1, int dupParam2, AsyncCallback dupParam3, NetObject dupParam4)
static NetworkStream
cast(IJCOBridgeReflected from)
Try to cast theIJCOBridgeReflected
instance intoNetworkStream
, a cast assert is made to check if types are compatible.void
Close(int timeout)
void
Close(TimeSpan timeout)
int
EndRead(IAsyncResult asyncResult)
void
EndWrite(IAsyncResult asyncResult)
void
Flush()
Task
FlushAsync(CancellationToken cancellationToken)
boolean
getDataAvailable()
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 TypeSocket
getSocket()
int
Read(byte[] buffer, int offset, int count)
int
Read(JCORefOut dupParam0, int dupParam1, int dupParam2)
int
ReadByte()
long
Seek(long offset, SeekOrigin origin)
void
setJCOInstance(JCObject instance)
void
SetLength(long value)
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)
-
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, 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.Net.Sockets, Version=8.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.Throwable
Internal 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, NotSupportedException, InvalidOperationException, ArgumentOutOfRangeException, ArgumentNullException, IOException, PlatformNotSupportedException, IndexOutOfRangeException, OutOfMemoryException, FormatException, EventSourceException, ObjectDisposedException, SocketException
- Throws:
java.lang.Throwable
ArgumentException
NotSupportedException
InvalidOperationException
ArgumentOutOfRangeException
ArgumentNullException
IOException
PlatformNotSupportedException
IndexOutOfRangeException
OutOfMemoryException
FormatException
EventSourceException
ObjectDisposedException
SocketException
-
NetworkStream
public NetworkStream(Socket socket, FileAccess access, boolean ownsSocket) throws java.lang.Throwable, ArgumentException, ArgumentOutOfRangeException, PlatformNotSupportedException, NotSupportedException, ObjectDisposedException, InvalidOperationException, RankException, ArrayTypeMismatchException, ArgumentNullException, IOException, IndexOutOfRangeException, OutOfMemoryException, FormatException, EventSourceException, SocketException
- Throws:
java.lang.Throwable
ArgumentException
ArgumentOutOfRangeException
PlatformNotSupportedException
NotSupportedException
ObjectDisposedException
InvalidOperationException
RankException
ArrayTypeMismatchException
ArgumentNullException
IOException
IndexOutOfRangeException
OutOfMemoryException
FormatException
EventSourceException
SocketException
-
NetworkStream
public NetworkStream(Socket socket, FileAccess access) throws java.lang.Throwable, ArgumentException, NotSupportedException, InvalidOperationException, ArgumentOutOfRangeException, ArgumentNullException, IOException, PlatformNotSupportedException, IndexOutOfRangeException, OutOfMemoryException, FormatException, EventSourceException, ObjectDisposedException, SocketException
- Throws:
java.lang.Throwable
ArgumentException
NotSupportedException
InvalidOperationException
ArgumentOutOfRangeException
ArgumentNullException
IOException
PlatformNotSupportedException
IndexOutOfRangeException
OutOfMemoryException
FormatException
EventSourceException
ObjectDisposedException
SocketException
-
NetworkStream
public NetworkStream(Socket socket) throws java.lang.Throwable, ArgumentException, NotSupportedException, InvalidOperationException, ArgumentOutOfRangeException, ArgumentNullException, IOException, PlatformNotSupportedException, IndexOutOfRangeException, OutOfMemoryException, FormatException, EventSourceException, ObjectDisposedException, SocketException
- Throws:
java.lang.Throwable
ArgumentException
NotSupportedException
InvalidOperationException
ArgumentOutOfRangeException
ArgumentNullException
IOException
PlatformNotSupportedException
IndexOutOfRangeException
OutOfMemoryException
FormatException
EventSourceException
ObjectDisposedException
SocketException
-
-
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 NetworkStream cast(IJCOBridgeReflected from) throws java.lang.Throwable
Try to cast theIJCOBridgeReflected
instance intoNetworkStream
, a cast assert is made to check if types are compatible.- Parameters:
from
-IJCOBridgeReflected
instance to be casted- Returns:
NetworkStream
instance- Throws:
java.lang.Throwable
- in case of error during cast operation
-
EndRead
public int EndRead(IAsyncResult asyncResult) throws java.lang.Throwable, ArgumentException, NotSupportedException, InvalidOperationException, ArgumentOutOfRangeException, ObjectDisposedException, TaskSchedulerException, PlatformNotSupportedException, TaskCanceledException, AggregateException, ArgumentNullException, IndexOutOfRangeException, FormatException, IOException
- Overrides:
EndRead
in classStream
- Throws:
java.lang.Throwable
ArgumentException
NotSupportedException
InvalidOperationException
ArgumentOutOfRangeException
ObjectDisposedException
TaskSchedulerException
PlatformNotSupportedException
TaskCanceledException
AggregateException
ArgumentNullException
IndexOutOfRangeException
FormatException
IOException
-
Read
public int Read(byte[] buffer, int offset, int count) throws java.lang.Throwable, ArgumentException, ArgumentOutOfRangeException, PlatformNotSupportedException, NotSupportedException, ObjectDisposedException, InvalidOperationException, RankException, ArrayTypeMismatchException, ArgumentNullException, SocketException, IndexOutOfRangeException, IOException
- Overrides:
Read
in classStream
- Throws:
java.lang.Throwable
ArgumentException
ArgumentOutOfRangeException
PlatformNotSupportedException
NotSupportedException
ObjectDisposedException
InvalidOperationException
RankException
ArrayTypeMismatchException
ArgumentNullException
SocketException
IndexOutOfRangeException
IOException
-
Read
public int Read(JCORefOut dupParam0, int dupParam1, int dupParam2) throws java.lang.Throwable, ArgumentException, ArgumentOutOfRangeException, PlatformNotSupportedException, NotSupportedException, ObjectDisposedException, InvalidOperationException, RankException, ArrayTypeMismatchException, ArgumentNullException, SocketException, IndexOutOfRangeException, IOException
- Overrides:
Read
in classStream
- Throws:
java.lang.Throwable
ArgumentException
ArgumentOutOfRangeException
PlatformNotSupportedException
NotSupportedException
ObjectDisposedException
InvalidOperationException
RankException
ArrayTypeMismatchException
ArgumentNullException
SocketException
IndexOutOfRangeException
IOException
-
ReadByte
public int ReadByte() throws java.lang.Throwable, ArgumentException, ArgumentOutOfRangeException, PlatformNotSupportedException, NotSupportedException, ObjectDisposedException, InvalidOperationException, RankException, ArrayTypeMismatchException, IOException
- Overrides:
ReadByte
in classStream
- Throws:
java.lang.Throwable
ArgumentException
ArgumentOutOfRangeException
PlatformNotSupportedException
NotSupportedException
ObjectDisposedException
InvalidOperationException
RankException
ArrayTypeMismatchException
IOException
-
Seek
public long Seek(long offset, SeekOrigin origin) throws java.lang.Throwable, ArgumentNullException, ArgumentException, PlatformNotSupportedException, InvalidOperationException, ArgumentOutOfRangeException, CultureNotFoundException, ObjectDisposedException, NotSupportedException
- Overrides:
Seek
in classStream
- Throws:
java.lang.Throwable
ArgumentNullException
ArgumentException
PlatformNotSupportedException
InvalidOperationException
ArgumentOutOfRangeException
CultureNotFoundException
ObjectDisposedException
NotSupportedException
-
BeginRead
public IAsyncResult BeginRead(byte[] buffer, int offset, int count, AsyncCallback callback, NetObject state) throws java.lang.Throwable, ArgumentException, ArgumentOutOfRangeException, PlatformNotSupportedException, NotSupportedException, ObjectDisposedException, InvalidOperationException, RankException, ArrayTypeMismatchException, ArgumentNullException, FormatException, IOException
- Overrides:
BeginRead
in classStream
- Throws:
java.lang.Throwable
ArgumentException
ArgumentOutOfRangeException
PlatformNotSupportedException
NotSupportedException
ObjectDisposedException
InvalidOperationException
RankException
ArrayTypeMismatchException
ArgumentNullException
FormatException
IOException
-
BeginRead
public IAsyncResult BeginRead(JCORefOut dupParam0, int dupParam1, int dupParam2, AsyncCallback dupParam3, NetObject dupParam4) throws java.lang.Throwable, ArgumentException, ArgumentOutOfRangeException, PlatformNotSupportedException, NotSupportedException, ObjectDisposedException, InvalidOperationException, RankException, ArrayTypeMismatchException, ArgumentNullException, FormatException, IOException
- Overrides:
BeginRead
in classStream
- Throws:
java.lang.Throwable
ArgumentException
ArgumentOutOfRangeException
PlatformNotSupportedException
NotSupportedException
ObjectDisposedException
InvalidOperationException
RankException
ArrayTypeMismatchException
ArgumentNullException
FormatException
IOException
-
BeginWrite
public IAsyncResult BeginWrite(byte[] buffer, int offset, int count, AsyncCallback callback, NetObject state) throws java.lang.Throwable, ArgumentException, ArgumentOutOfRangeException, PlatformNotSupportedException, NotSupportedException, ObjectDisposedException, InvalidOperationException, RankException, ArrayTypeMismatchException, ArgumentNullException, FormatException, IOException
- Overrides:
BeginWrite
in classStream
- Throws:
java.lang.Throwable
ArgumentException
ArgumentOutOfRangeException
PlatformNotSupportedException
NotSupportedException
ObjectDisposedException
InvalidOperationException
RankException
ArrayTypeMismatchException
ArgumentNullException
FormatException
IOException
-
BeginWrite
public IAsyncResult BeginWrite(JCORefOut dupParam0, int dupParam1, int dupParam2, AsyncCallback dupParam3, NetObject dupParam4) throws java.lang.Throwable, ArgumentException, ArgumentOutOfRangeException, PlatformNotSupportedException, NotSupportedException, ObjectDisposedException, InvalidOperationException, RankException, ArrayTypeMismatchException, ArgumentNullException, FormatException, IOException
- Overrides:
BeginWrite
in classStream
- Throws:
java.lang.Throwable
ArgumentException
ArgumentOutOfRangeException
PlatformNotSupportedException
NotSupportedException
ObjectDisposedException
InvalidOperationException
RankException
ArrayTypeMismatchException
ArgumentNullException
FormatException
IOException
-
FlushAsync
public Task FlushAsync(CancellationToken cancellationToken) throws java.lang.Throwable
- Overrides:
FlushAsync
in classStream
- Throws:
java.lang.Throwable
-
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, OutOfMemoryException, FormatException, IOException
- Overrides:
WriteAsync
in classStream
- Throws:
java.lang.Throwable
ArgumentException
ArgumentOutOfRangeException
PlatformNotSupportedException
NotSupportedException
ObjectDisposedException
InvalidOperationException
RankException
ArrayTypeMismatchException
ArgumentNullException
OutOfMemoryException
FormatException
IOException
-
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, OutOfMemoryException, FormatException, IOException
- Overrides:
WriteAsync
in classStream
- Throws:
java.lang.Throwable
ArgumentException
ArgumentOutOfRangeException
PlatformNotSupportedException
NotSupportedException
ObjectDisposedException
InvalidOperationException
RankException
ArrayTypeMismatchException
ArgumentNullException
OutOfMemoryException
FormatException
IOException
-
Close
public void Close(int timeout) throws java.lang.Throwable, ArgumentException, ArgumentOutOfRangeException, ArgumentNullException, InvalidOperationException, PlatformNotSupportedException, ArrayTypeMismatchException, NotSupportedException, ObjectDisposedException, RankException, IndexOutOfRangeException, FormatException
-
Close
public void Close(TimeSpan timeout) throws java.lang.Throwable, ArgumentException, ArgumentOutOfRangeException, PlatformNotSupportedException, NotSupportedException, ObjectDisposedException, InvalidOperationException, RankException, ArrayTypeMismatchException, IndexOutOfRangeException, FormatException
-
EndWrite
public void EndWrite(IAsyncResult asyncResult) throws java.lang.Throwable, ArgumentException, NotSupportedException, InvalidOperationException, ArgumentOutOfRangeException, ObjectDisposedException, TaskSchedulerException, PlatformNotSupportedException, TaskCanceledException, AggregateException, ArgumentNullException, IndexOutOfRangeException, FormatException, IOException
- Overrides:
EndWrite
in classStream
- Throws:
java.lang.Throwable
ArgumentException
NotSupportedException
InvalidOperationException
ArgumentOutOfRangeException
ObjectDisposedException
TaskSchedulerException
PlatformNotSupportedException
TaskCanceledException
AggregateException
ArgumentNullException
IndexOutOfRangeException
FormatException
IOException
-
Flush
public void Flush() throws java.lang.Throwable
-
SetLength
public void SetLength(long value) throws java.lang.Throwable, ArgumentNullException, ArgumentException, PlatformNotSupportedException, InvalidOperationException, ArgumentOutOfRangeException, CultureNotFoundException, ObjectDisposedException, NotSupportedException
- Overrides:
SetLength
in classStream
- Throws:
java.lang.Throwable
ArgumentNullException
ArgumentException
PlatformNotSupportedException
InvalidOperationException
ArgumentOutOfRangeException
CultureNotFoundException
ObjectDisposedException
NotSupportedException
-
Write
public void Write(byte[] buffer, int offset, int count) throws java.lang.Throwable, ArgumentException, ArgumentOutOfRangeException, PlatformNotSupportedException, NotSupportedException, ObjectDisposedException, InvalidOperationException, RankException, ArrayTypeMismatchException, ArgumentNullException, SocketException, IndexOutOfRangeException, IOException
- Overrides:
Write
in classStream
- Throws:
java.lang.Throwable
ArgumentException
ArgumentOutOfRangeException
PlatformNotSupportedException
NotSupportedException
ObjectDisposedException
InvalidOperationException
RankException
ArrayTypeMismatchException
ArgumentNullException
SocketException
IndexOutOfRangeException
IOException
-
Write
public void Write(JCORefOut dupParam0, int dupParam1, int dupParam2) throws java.lang.Throwable, ArgumentException, ArgumentOutOfRangeException, PlatformNotSupportedException, NotSupportedException, ObjectDisposedException, InvalidOperationException, RankException, ArrayTypeMismatchException, ArgumentNullException, SocketException, IndexOutOfRangeException, IOException
- Overrides:
Write
in classStream
- Throws:
java.lang.Throwable
ArgumentException
ArgumentOutOfRangeException
PlatformNotSupportedException
NotSupportedException
ObjectDisposedException
InvalidOperationException
RankException
ArrayTypeMismatchException
ArgumentNullException
SocketException
IndexOutOfRangeException
IOException
-
WriteByte
public void WriteByte(byte value) throws java.lang.Throwable, ArgumentException, ArgumentOutOfRangeException, PlatformNotSupportedException, NotSupportedException, ObjectDisposedException, InvalidOperationException, RankException, ArrayTypeMismatchException
- Overrides:
WriteByte
in classStream
- Throws:
java.lang.Throwable
ArgumentException
ArgumentOutOfRangeException
PlatformNotSupportedException
NotSupportedException
ObjectDisposedException
InvalidOperationException
RankException
ArrayTypeMismatchException
-
getDataAvailable
public boolean getDataAvailable() throws java.lang.Throwable, ArgumentException, NotSupportedException, InvalidOperationException, ArgumentOutOfRangeException, ObjectDisposedException, PlatformNotSupportedException, IndexOutOfRangeException, OutOfMemoryException, FormatException, ArgumentNullException, EventSourceException, SocketException
-
getSocket
public Socket getSocket() throws java.lang.Throwable
- Throws:
java.lang.Throwable
-
-