public interface Connection
extends java.io.Closeable
close
method is defined. No open method is
defined here because opening is always done using the
Connector.open()
methods.Modifier and Type | Method and Description |
---|---|
void |
close()
Close the connection.
|
void close() throws java.io.IOException
When a connection has been closed, access to any of its methods
that involve an I/O operation will cause an IOException
to be thrown.
Closing an already closed connection has no effect. Streams
derived from the connection may be open when this method is called.
Any open streams will cause the connection to be held open
until they themselves are closed. In this latter case access
to the open streams is permitted, but access to the connection
is not.
close
in interface java.lang.AutoCloseable
close
in interface java.io.Closeable
java.io.IOException
- If an I/O error occursCopyright (c) 2014, Oracle and/or its affiliates. All rights reserved. Use of this specification is subject to license terms.