FileDocCategorySizeDatePackage
EofSensorWatcher.javaAPI DocAndroid 1.5 API4276Wed May 06 22:41:10 BST 2009org.apache.http.conn

EofSensorWatcher

public interface EofSensorWatcher
A watcher for {@link EofSensorInputStream EofSensorInputStream}. Each stream will notify it's watcher at most once.
author
Roland Weber
version
$Revision: 552264 $
since
4.0

Fields Summary
Constructors Summary
Methods Summary
public booleaneofDetected(java.io.InputStream wrapped)
Indicates that EOF is detected.

param
wrapped the underlying stream which has reached EOF
return
true if wrapped should be closed, false if it should be left alone
throws
IOException in case of an IO problem, for example if the watcher itself closes the underlying stream. The caller will leave the wrapped stream alone, as if false was returned.

public booleanstreamAbort(java.io.InputStream wrapped)
Indicates that the {@link EofSensorInputStream stream} is aborted. This method will be called only if EOF was not detected before aborting. Otherwise, {@link #eofDetected eofDetected} is called.

This method will also be invoked when an input operation causes an IOException to be thrown to make sure the input stream gets shut down.

param
wrapped the underlying stream which has not reached EOF
return
true if wrapped should be closed, false if it should be left alone
throws
IOException in case of an IO problem, for example if the watcher itself closes the underlying stream. The caller will leave the wrapped stream alone, as if false was returned.

public booleanstreamClosed(java.io.InputStream wrapped)
Indicates that the {@link EofSensorInputStream stream} is closed. This method will be called only if EOF was not detected before closing. Otherwise, {@link #eofDetected eofDetected} is called.

param
wrapped the underlying stream which has not reached EOF
return
true if wrapped should be closed, false if it should be left alone
throws
IOException in case of an IO problem, for example if the watcher itself closes the underlying stream. The caller will leave the wrapped stream alone, as if false was returned.