01: /*
02: * Copyright (c) 1999-2002 Sun Microsystems, Inc., 901 San Antonio Road,
03: * Palo Alto, CA 94303, U.S.A. All Rights Reserved.
04: *
05: * Sun Microsystems, Inc. has intellectual property rights relating
06: * to the technology embodied in this software. In particular, and
07: * without limitation, these intellectual property rights may include
08: * one or more U.S. patents, foreign patents, or pending
09: * applications. Sun, Sun Microsystems, the Sun logo, Java, KJava,
10: * and all Sun-based and Java-based marks are trademarks or
11: * registered trademarks of Sun Microsystems, Inc. in the United
12: * States and other countries.
13: *
14: * This software is distributed under licenses restricting its use,
15: * copying, distribution, and decompilation. No part of this
16: * software may be reproduced in any form by any means without prior
17: * written authorization of Sun and its licensors, if any.
18: *
19: * FEDERAL ACQUISITIONS: Commercial Software -- Government Users
20: * Subject to Standard License Terms and Conditions
21: */
22:
23: package com.sun.portal.microedition.io;
24:
25: import java.io.*;
26:
27: /**
28: * This is the most basic type of generic connection. Only the close
29: * method is defined. The open method is not defined here because opening is
30: * always done using the Connector.open() methods.
31: *
32: * @author Nik Shaylor
33: * @version 1.1 1/25/2000
34: * @since CLDC 1.0
35: */
36: public interface Connection {
37:
38: /**
39: * Close the connection.
40: * <p>
41: * When a connection has been closed, access to any of its methods
42: * except this close() will cause an IOException to be thrown.
43: * Closing an already closed connection has no effect. Streams
44: * derived from the connection may be open when method is called.
45: * Any open streams will cause the connection to be held open
46: * until they themselves are closed. In this latter case access
47: * to the open streams is permitted, but access to the connection
48: * is not.
49: *
50: * @exception IOException If an I/O error occurs
51: */
52: public void close() throws IOException;
53: }
|