JXTA

net.jxta.util
Class WatchedOutputStream

java.lang.Object
  extended by java.io.OutputStream
      extended by java.io.FilterOutputStream
          extended by net.jxta.util.WatchedOutputStream
All Implemented Interfaces:
Closeable, Flushable, WatchedStream

Deprecated. This class is no longer used by the JXTA core and should not have been part of the public JXTA API. If you use it, copy it to your own source base. It will be deleted after June 2007 release.

@Deprecated
public class WatchedOutputStream
extends FilterOutputStream
implements WatchedStream


Constructor Summary
WatchedOutputStream(OutputStream out)
          Deprecated.  
WatchedOutputStream(OutputStream out, int chunkSize)
          Deprecated.  
 
Method Summary
 void close()
          Deprecated. In case we want to close a watchStream regardless of its making progress.
 void flush()
          Deprecated.  
 void setWatchList(Collection watchList)
          Deprecated. Sets the watcher list onto which this stream must register when it is not idle (so that it can be watched).
 String toString()
          Deprecated. 

Debugging toString.

 void watch()
          Deprecated. This routine may be invoked as often as progress needs to be asserted.
 void write(byte[] b)
          Deprecated.  
 void write(byte[] b, int off, int len)
          Deprecated.  
 void write(int b)
          Deprecated.  
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

WatchedOutputStream

public WatchedOutputStream(OutputStream out,
                           int chunkSize)
Deprecated. 

WatchedOutputStream

public WatchedOutputStream(OutputStream out)
Deprecated. 
Method Detail

toString

public String toString()
Deprecated. 

Debugging toString.

Overrides:
toString in class Object

setWatchList

public void setWatchList(Collection watchList)
Deprecated. 
Sets the watcher list onto which this stream must register when it is not idle (so that it can be watched). This implementation may or may not remain registered while idle. This may affect performance but not functionality. It is assumed that that list is monitored by a watcher task that invokes the watch method as often as needed to monitor progress to its satisfaction.

Specified by:
setWatchList in interface WatchedStream
Parameters:
watchList - The watchList to register with. Must be a Synchronized Collection.

watch

public void watch()
Deprecated. 
Description copied from interface: WatchedStream
This routine may be invoked as often as progress needs to be asserted. After at most two watch cycles stalling is detected.

Specified by:
watch in interface WatchedStream

close

public void close()
           throws IOException
Deprecated. 
Description copied from interface: WatchedStream
In case we want to close a watchStream regardless of its making progress.

Specified by:
close in interface Closeable
Specified by:
close in interface WatchedStream
Overrides:
close in class FilterOutputStream
Throws:
IOException - if an io error occurs

flush

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

write

public void write(int b)
           throws IOException
Deprecated. 
Overrides:
write in class FilterOutputStream
Throws:
IOException

write

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

write

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

JXSE