de.jiac.micro.core.io
Interface IStreamConnection

All Superinterfaces:
javax.microedition.io.Connection
All Known Implementing Classes:
AbstractConnectionMapper, StreamMapper

public interface IStreamConnection
extends javax.microedition.io.Connection

This interface maps specific connections (like StreamConnection, DatagramConnection etc...) to a generic IStreamConnection. It also allows only one InputStream / OutputStream per connection. IStreamConnections can be obtained by using IResourceHandle.openStreamConnection(String).

Version:
$Revision$
Author:
Marcel Patzlaff

Method Summary
 void close()
          Closes the complete connection and both streams if acquired!
 InputStream getInputStream()
          Method to obtain the InputStream for this connection.
 OutputStream getOutputStream()
          Method to obtain the OutputStream for this connection.
 boolean isOpen()
          Checks whether the underlying connection is still open.
 

Method Detail

getInputStream

InputStream getInputStream()
                           throws IOException
Method to obtain the InputStream for this connection.

Returns:
the single InputStream for this connection
Throws:
IOException - if no InputStream is available or the connection is closed

getOutputStream

OutputStream getOutputStream()
                             throws IOException
Method to obtain the OutputStream for this connection.

Returns:
the single OutputStream for this connection
Throws:
IOException - if no OutputStream is available or the connection is closed

close

void close()
Closes the complete connection and both streams if acquired!

Specified by:
close in interface javax.microedition.io.Connection

isOpen

boolean isOpen()
Checks whether the underlying connection is still open.

Returns:
true if this connection is still open and false otherwise


Copyright © 2008-2011 DAI-Labor. All Rights Reserved.