com.act365.net
Class GeneralSocketOutputStream

java.lang.Object
java.io.OutputStream
com.act365.net.GeneralSocketOutputStream
- public class GeneralSocketOutputStream
- extends java.io.OutputStream
GeneralSocketOutputStream writes to a TCP socket.
The class should be used in conjunction with GeneralSocketImpl.
|
Constructor Summary |
GeneralSocketOutputStream(int socketDescriptor)
Creates an output stream to write to the TCP socket with the given descriptor. |
|
Method Summary |
(package private) static int |
_close(int socketDescriptor)
|
(package private) static int |
_send(int socketDescriptor,
byte[] buffer,
int offset,
int count)
|
void |
close()
Closes the output stream. |
void |
write(byte[] buffer)
Writes a string of characters into the TCP stream from a buffer. |
void |
write(byte[] buffer,
int offset,
int count)
Writes a string of characters into the TCP stream from a given
location in a buffer. |
void |
write(int oneByte)
Writes a single character to the TCP stream. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
socketDescriptor
int socketDescriptor
GeneralSocketOutputStream
public GeneralSocketOutputStream(int socketDescriptor)
- Creates an output stream to write to the TCP socket with the given descriptor.
write
public void write(int oneByte)
throws java.io.IOException
- Writes a single character to the TCP stream.
write
public void write(byte[] buffer)
throws java.io.IOException
- Writes a string of characters into the TCP stream from a buffer.
write
public void write(byte[] buffer,
int offset,
int count)
throws java.io.IOException
- Writes a string of characters into the TCP stream from a given
location in a buffer.
_send
static int _send(int socketDescriptor,
byte[] buffer,
int offset,
int count)
close
public void close()
throws java.io.IOException
- Closes the output stream.
_close
static int _close(int socketDescriptor)