de.jiac.micro.internal.io
Class AbstractConnectionMapper

java.lang.Object
  extended by de.jiac.micro.internal.io.AbstractConnectionMapper
All Implemented Interfaces:
IStreamConnection, javax.microedition.io.Connection
Direct Known Subclasses:
StreamMapper

public abstract class AbstractConnectionMapper
extends Object
implements IStreamConnection

Version:
$Revision: 21858 $
Author:
Marcel Patzlaff

Field Summary
protected  javax.microedition.io.Connection connection
           
 
Constructor Summary
AbstractConnectionMapper()
           
 
Method Summary
 void close()
          Closes the complete connection and both streams if acquired!
 boolean equals(Object obj)
           
 InputStream getInputStream()
          Method to obtain the InputStream for this connection.
 OutputStream getOutputStream()
          Method to obtain the OutputStream for this connection.
 int hashCode()
           
abstract  void initialise(javax.microedition.io.Connection mapped)
          Initialises this mapper.
 boolean isOpen()
          Checks whether the underlying connection is still open.
protected abstract  InputStream openInputStream()
           
protected abstract  OutputStream openOutputStream()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

connection

protected javax.microedition.io.Connection connection
Constructor Detail

AbstractConnectionMapper

public AbstractConnectionMapper()
Method Detail

close

public final void close()
Description copied from interface: IStreamConnection
Closes the complete connection and both streams if acquired!

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

getInputStream

public final InputStream getInputStream()
                                 throws IOException
Description copied from interface: IStreamConnection
Method to obtain the InputStream for this connection.

Specified by:
getInputStream in interface IStreamConnection
Returns:
the single InputStream for this connection
Throws:
IOException - if no InputStream is available or the connection is closed

getOutputStream

public final OutputStream getOutputStream()
                                   throws IOException
Description copied from interface: IStreamConnection
Method to obtain the OutputStream for this connection.

Specified by:
getOutputStream in interface IStreamConnection
Returns:
the single OutputStream for this connection
Throws:
IOException - if no OutputStream is available or the connection is closed

equals

public final boolean equals(Object obj)
Overrides:
equals in class Object

hashCode

public final int hashCode()
Overrides:
hashCode in class Object

isOpen

public final boolean isOpen()
Description copied from interface: IStreamConnection
Checks whether the underlying connection is still open.

Specified by:
isOpen in interface IStreamConnection
Returns:
true if this connection is still open and false otherwise

initialise

public abstract void initialise(javax.microedition.io.Connection mapped)
                         throws IOException
Initialises this mapper.

Parameters:
mapped - the open connection of a specific type
Throws:
IOException - if mapped has a wrong type or another problem occured

openInputStream

protected abstract InputStream openInputStream()
                                        throws IOException
Throws:
IOException

openOutputStream

protected abstract OutputStream openOutputStream()
                                          throws IOException
Throws:
IOException


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