org.eclipse.edje/src/main/java/org/eclipse/edje/io/AbstractConnection.java
private synchronized void checkCanOpen(Closeable stream) throws IOException {

		if (closeState != CloseState.NotClosed) {
			// connection closed or ready to be closed
			throw new IOException("Connection closed.");
		}

		if (stream != null) {
			// the stream is already opened
			throw new IOException("Stream already opened.");
		}
	}
/**
	 * Ensures the stream can be opened.
	 * <ul>
	 * <li>the stream is not already opened</li>
	 * <li>the connection is not ready to be closed</li>
	 * <li>the connection is not closed</li>
	 * </ul>
	 * 
	 * @param stream
	 * @throws IOException
	 */
Ensures the stream can be opened.

the stream is not already opened
the connection is not ready to be closed
the connection is not closed


@param stream
@throws IOException
Ensures the stream can be opened . the stream is not already opened the connection is not ready to be closed the connection is not closed @param stream @throws IOException
private synchronized void checkCanOpen(Closeable stream) throws IOException {
		if (closeState != CloseState.NotClosed) {
			throw new IOException("Connection closed.");
		}
		if (stream != null) {
			throw new IOException("Stream already opened.");
		}
	}
private synchronized void checkCanOpen ( Closeable stream ) throws IOException { if ( closeState != CloseState . NotClosed ) { throw new IOException ( "Connection closed." ) ; } if ( stream != null ) { throw new IOException ( "Stream already opened." ) ; } }
Ensures the stream can be opened.
Ensures the stream can be opened .
// connection closed or ready to be closed // the stream is already opened