local.tomas.obex.transport.comm
Class CommTransport

java.lang.Object
  extended by local.tomas.obex.transport.TransportBase
      extended by local.tomas.obex.transport.comm.CommTransport
All Implemented Interfaces:
Transport
Direct Known Subclasses:
SerialCommTransport

public abstract class CommTransport
extends TransportBase


Field Summary
protected  java.io.InputStream inputStream
           
protected  java.lang.String name
           
protected  java.io.OutputStream outputStream
           
protected  java.util.Properties param
           
protected  gnu.io.CommPort port
           
protected static int PORT_PARALLEL
           
protected static int PORT_SERIAL
           
protected  gnu.io.CommPortIdentifier portId
           
 
Constructor Summary
protected CommTransport(int type)
           
 
Method Summary
 int available()
           
protected  void closeInternal()
           
static java.lang.String[] enumPorts(int type)
           
 java.lang.String getName()
           
 java.util.Properties getParam()
           
 java.lang.String getParam(java.lang.String name)
           
protected  void logBytes(java.lang.String head, byte[] bytes, int start, int length)
           
protected  void openInternal()
           
 int receive(byte[] data, int start, int length)
           
 void send(byte[] data, int start, int length)
           
 void setName(java.lang.String name)
           
 void setParam(java.util.Properties param)
           
 void setParam(java.lang.String name, java.lang.String value)
           
 
Methods inherited from class local.tomas.obex.transport.TransportBase
addListener, close, handleDataAvailable, isOpen, open, removeListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PORT_SERIAL

protected static final int PORT_SERIAL
See Also:
Constant Field Values

PORT_PARALLEL

protected static final int PORT_PARALLEL
See Also:
Constant Field Values

name

protected java.lang.String name

param

protected java.util.Properties param

portId

protected gnu.io.CommPortIdentifier portId

port

protected gnu.io.CommPort port

inputStream

protected java.io.InputStream inputStream

outputStream

protected java.io.OutputStream outputStream
Constructor Detail

CommTransport

protected CommTransport(int type)
Method Detail

logBytes

protected void logBytes(java.lang.String head,
                        byte[] bytes,
                        int start,
                        int length)

getName

public java.lang.String getName()

setName

public void setName(java.lang.String name)

getParam

public java.util.Properties getParam()

setParam

public void setParam(java.util.Properties param)

getParam

public java.lang.String getParam(java.lang.String name)

setParam

public void setParam(java.lang.String name,
                     java.lang.String value)

openInternal

protected void openInternal()
                     throws ObexException
Specified by:
openInternal in class TransportBase
Throws:
ObexException

enumPorts

public static java.lang.String[] enumPorts(int type)

closeInternal

protected void closeInternal()
Specified by:
closeInternal in class TransportBase

send

public void send(byte[] data,
                 int start,
                 int length)
          throws ObexException
Throws:
ObexException

receive

public int receive(byte[] data,
                   int start,
                   int length)
            throws ObexException
Throws:
ObexException

available

public int available()
              throws ObexException
Throws:
ObexException


Copyright © 2007 null. All Rights Reserved.