OSDN Git Service

Remove as sg.exe is not a open source product.
[nxt-jsp/etrobo-atk.git] / lejos_osek / lejos_nxj / src / java / classes / javax / microedition / io / StreamConnection.java
1 package javax.microedition.io;
2 import java.io.*;
3
4 /**
5  * 
6  * This interface defines the capabilities that a stream connection must have.
7  * 
8  * StreamConnections have one underlying InputStream and one OutputStream. 
9  * 
10  * Opening a DataInputStream counts as opening an InputStream and opening a DataOutputStream counts as opening an OutputStream. 
11  * 
12  * Trying to open another InputStream or OutputStream causes an IOException. 
13  * 
14  * Trying to open the InputStream or OutputStream after they have been closed causes an IOException
15  *
16  */
17 public interface StreamConnection {
18         
19         /**
20          * Close the stream connection
21          * 
22          * @throws IOException
23          */
24         public void close() throws IOException;
25
26         /**
27          * Open and return an InputStream - not yet implemented.
28          *
29          */
30         public InputStream openInputStream() throws IOException;
31         
32         /**
33          * Open and return a DataInputStream - not yet implemented.
34          */
35         public DataInputStream openDataInputStream() throws IOException;
36         
37         /**
38          * Open and return an OutputStream - not yet implemented.
39          */
40         public OutputStream openOutputStream() throws IOException;
41         
42         /**
43          * Open and return a DataOutputStream - not yet implemented.
44          */
45         public DataOutputStream openDataOutputStream() throws IOException;
46 }