udt
Class UDTOutputStream

java.lang.Object
  extended by java.io.OutputStream
      extended by udt.UDTOutputStream
All Implemented Interfaces:
Closeable, Flushable

public class UDTOutputStream
extends OutputStream

UDTOutputStream provides a UDT version of OutputStream


Constructor Summary
UDTOutputStream(UDTSocket socket)
           
 
Method Summary
 void close()
          close this output stream
 void flush()
           
 void pauseOutput()
          This method signals the UDT sender that it can pause the sending thread.
 void write(byte[] b)
           
 void write(byte[] b, int off, int len)
           
 void write(int args)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UDTOutputStream

public UDTOutputStream(UDTSocket socket)
Method Detail

write

public void write(int args)
           throws IOException
Specified by:
write in class OutputStream
Throws:
IOException

write

public void write(byte[] b,
                  int off,
                  int len)
           throws IOException
Overrides:
write in class OutputStream
Throws:
IOException

write

public void write(byte[] b)
           throws IOException
Overrides:
write in class OutputStream
Throws:
IOException

flush

public void flush()
           throws IOException
Specified by:
flush in interface Flushable
Overrides:
flush in class OutputStream
Throws:
IOException

pauseOutput

public void pauseOutput()
                 throws IOException
This method signals the UDT sender that it can pause the sending thread. The UDT sender will resume when the next write() call is executed.
For example, one can use this method on the receiving end of a file transfer, to save some CPU time which would otherwise be consumed by the sender thread.

Throws:
IOException

close

public void close()
           throws IOException
close this output stream

Specified by:
close in interface Closeable
Overrides:
close in class OutputStream
Throws:
IOException


Copyright © 2013 LittleShoot. All Rights Reserved.