
eu.hgross.blaubot.bluetooth.BlaubotJsr82BluetoothConnection Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of blaubot-jsr82 Show documentation
Show all versions of blaubot-jsr82 Show documentation
Bluetooth Adapter for Blaubot using JSR82.
The newest version!
package eu.hgross.blaubot.bluetooth;
import java.io.IOException;
import javax.microedition.io.StreamConnection;
import eu.hgross.blaubot.core.GenericBlaubotConnection;
import eu.hgross.blaubot.core.IBlaubotDevice;
/**
* A bluetooth connection using the provided JSR82 implementation (probalby bluecove)
*/
public class BlaubotJsr82BluetoothConnection extends GenericBlaubotConnection {
private static final String LOG_TAG = "BlaubotJsr82BluetoothConnection";
private final StreamConnection streamConnection;
public BlaubotJsr82BluetoothConnection(IBlaubotDevice remoteDevice, StreamConnection streamConnection) throws IOException {
super(remoteDevice, streamConnection.openInputStream(), streamConnection.openOutputStream());
this.streamConnection = streamConnection;
}
@Override
protected String getLogTag() {
return LOG_TAG;
}
@Override
public void disconnect() {
disconnectStreams();
try {
streamConnection.close();
} catch (IOException e) {
}
notifyDisconnected();
}
@Override
public boolean isConnected() {
return false;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy