Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

com.act365.net
Class GeneralSocketOutputStream  view GeneralSocketOutputStream download GeneralSocketOutputStream.java

java.lang.Object
  extended byjava.io.OutputStream
      extended bycom.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.


Field Summary
(package private)  int socketDescriptor
           
 
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.io.OutputStream
flush
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

socketDescriptor

int socketDescriptor
Constructor Detail

GeneralSocketOutputStream

public GeneralSocketOutputStream(int socketDescriptor)
Creates an output stream to write to the TCP socket with the given descriptor.

Method Detail

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)