|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectde.avetana.bluetooth.connection.BTConnection
de.avetana.bluetooth.rfcomm.RFCommConnectionImpl
public class RFCommConnectionImpl
The top-class for the management of stream-oriented connections.
COPYRIGHT:
(c) Copyright 2004 Avetana GmbH ALL RIGHTS RESERVED.
This file is part of the Avetana bluetooth API for Linux.
The Avetana bluetooth API for Linux is free software; you can redistribute it
and/or modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2 of
the License, or (at your option) any later version.
The Avetana bluetooth API is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
The development of the Avetana bluetooth API is based on the work of
Christian Lorenz (see the Javabluetooth Stack at http://www.javabluetooth.org) for some classes,
on the work of the jbluez team (see http://jbluez.sourceforge.net/) and
on the work of the bluez team (see the BlueZ linux Stack at http://www.bluez.org) for the C code.
Classes, part of classes, C functions or part of C functions programmed by these teams and/or persons
are explicitly mentioned.
Description:
This class allows the management of data streams between a remote and local device.
It provides an InputStream and an OutputStream for easily receiving and sending data from/to a remote device.
The InputStream stores all retrieved data into its buffer: no data is therefore lost.
| Nested Class Summary | |
|---|---|
protected class |
RFCommConnectionImpl.MInputStream
An own extension of the classical java InputStream class. |
protected class |
RFCommConnectionImpl.MOutputStream
An own extension of the classical java OutputStream class. |
| Field Summary | |
|---|---|
protected RFCommConnectionImpl.MInputStream |
inStream
The own defined and implemented input stream. |
protected RFCommConnectionImpl.MOutputStream |
outStream
The own defined and implemented output stream. |
| Fields inherited from class de.avetana.bluetooth.connection.BTConnection |
|---|
closed, dataBuffer, fid, m_remote |
| Constructor Summary | |
|---|---|
protected |
RFCommConnectionImpl(int a_fid)
|
|
RFCommConnectionImpl(int fid,
java.lang.String string)
|
| Method Summary | |
|---|---|
static RFCommConnectionImpl |
createRFCommConnection(JSR82URL url,
int timeout)
Creates a new RFCOMM connection with a remote BT device. |
java.io.DataInputStream |
openDataInputStream()
If the nested input stream was not opened before, opens it and starts reading. |
java.io.DataOutputStream |
openDataOutputStream()
Opens the nested output stream and returns the DataOutputStream based on it. |
java.io.InputStream |
openInputStream()
Returns the inputstream used by this connection |
java.io.OutputStream |
openOutputStream()
Opens and returns the nested output stream. |
| Methods inherited from class de.avetana.bluetooth.connection.BTConnection |
|---|
available, close, getConnectionID, getRemoteDevice, isClosed, newData, read, setRemoteDevice |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected RFCommConnectionImpl.MInputStream inStream
protected RFCommConnectionImpl.MOutputStream outStream
| Constructor Detail |
|---|
protected RFCommConnectionImpl(int a_fid)
public RFCommConnectionImpl(int fid,
java.lang.String string)
fid - string - | Method Detail |
|---|
public static RFCommConnectionImpl createRFCommConnection(JSR82URL url,
int timeout)
throws java.lang.Exception
url - The connection URL encapsulating all connection options
java.lang.Exception
public java.io.DataInputStream openDataInputStream()
throws java.io.IOException
java.io.IOException
public java.io.OutputStream openOutputStream()
throws java.io.IOException
java.io.IOException
public java.io.DataOutputStream openDataOutputStream()
throws java.io.IOException
java.io.IOException
public java.io.InputStream openInputStream()
throws java.io.IOException
java.io.IOException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||