| Modifier and Type | Method and Description |
|---|---|
| public void | |
| public boolean | Returns: true if data is available; false if there was no data available even after waiting fortimeout.the maximum time to wait for data timeout)Checks if input data is available from the connection. |
| public boolean | Returns: true if attempts to use this connection are likely
to fail and this connection should be closed,
or false if they are likely to succeedChecks whether this connection has gone down. |
| flush | back to summary |
|---|---|
| public void flush() throws IOException Writes out all pending buffered data over the open connection.
| |
| isDataAvailable | back to summary |
|---|---|
| public boolean isDataAvailable(Timeout timeout) throws IOException Checks if input data is available from the connection. May wait for the specified time until some data becomes available. Note that some implementations may completely ignore the timeout parameter.
| |
| isStale | back to summary |
|---|---|
| public boolean isStale() throws IOException Checks whether this connection has gone down. Network connections may get closed during some time of inactivity for several reasons. The next time a read is attempted on such a connection it will throw an IOException. This method tries to alleviate this inconvenience by trying to find out if a connection is still usable. Implementations may do that by attempting a read with a very small timeout. Thus this method may block for a small amount of time before returning a result. It is therefore an expensive operation.
| |