jist.swans.trans
Class TcpOutputStream

java.lang.Object
  extended by jist.swans.app.io.OutputStream
      extended by jist.swans.trans.TcpOutputStream

public class TcpOutputStream
extends OutputStream

SWANS Implementation of OutputStream for Socket.

Since:
SWANS1.0

Constructor Summary
TcpOutputStream(SocketInterface.TcpSocketInterface entity)
          Constructor.
 
Method Summary
 void close()
          Closes this output stream and releases any system resources associated with this stream.
 void write(byte[] b)
          Writes b.length bytes from the specified byte array to this output stream.
 void write(byte[] b, int off, int len)
          Writes len bytes from the specified byte array starting at offset off to this output stream.
 void write(int b)
          Writes the specified byte to this output stream.
 
Methods inherited from class jist.swans.app.io.OutputStream
flush
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TcpOutputStream

public TcpOutputStream(SocketInterface.TcpSocketInterface entity)
Constructor.

Parameters:
entity - entity reference to Socket
Method Detail

close

public void close()
           throws java.io.IOException
Closes this output stream and releases any system resources associated with this stream.

Overrides:
close in class OutputStream
Throws:
java.io.IOException - if an I/O error occurs
See Also:
OutputStream

write

public void write(byte[] b)
           throws java.io.IOException
Writes b.length bytes from the specified byte array to this output stream.

Overrides:
write in class OutputStream
Parameters:
b - the data
Throws:
java.io.IOException - if an I/O error occurs
See Also:
OutputStream

write

public void write(byte[] b,
                  int off,
                  int len)
           throws java.io.IOException
Writes len bytes from the specified byte array starting at offset off to this output stream.

Overrides:
write in class OutputStream
Parameters:
b - the data
off - the start offset in the data
len - the number of bytes to write
Throws:
java.io.IOException - if an I/O error occurs
See Also:
OutputStream

write

public void write(int b)
           throws java.io.IOException
Writes the specified byte to this output stream.

Specified by:
write in class OutputStream
Parameters:
b - the byte
Throws:
java.io.IOException - if an I/O error occurs. In particular, an IOException may be thrown if the output stream has been closed.
See Also:
OutputStream