当前位置: 首页>>代码示例>>Java>>正文


Java BluetoothConnection类代码示例

本文整理汇总了Java中org.fdroid.fdroid.net.bluetooth.BluetoothConnection的典型用法代码示例。如果您正苦于以下问题:Java BluetoothConnection类的具体用法?Java BluetoothConnection怎么用?Java BluetoothConnection使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


BluetoothConnection类属于org.fdroid.fdroid.net.bluetooth包,在下文中一共展示了BluetoothConnection类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: send

import org.fdroid.fdroid.net.bluetooth.BluetoothConnection; //导入依赖的package包/类
public void send(BluetoothConnection connection) throws IOException {

        Utils.debugLog(TAG, "Sending Bluetooth HTTP-ish response...");

        Writer output = new OutputStreamWriter(connection.getOutputStream());
        output.write("HTTP(ish)/0.1 200 OK\n");

        for (Map.Entry<String, String> entry : headers.entrySet()) {
            output.write(entry.getKey());
            output.write(": ");
            output.write(entry.getValue());
            output.write("\n");
        }

        output.write("\n");
        output.flush();

        if (contentStream != null) {
            Utils.copy(contentStream, connection.getOutputStream());
        }

        output.flush();

    }
 
开发者ID:uhuru-mobile,项目名称:mobile-store,代码行数:25,代码来源:Response.java

示例2: Request

import org.fdroid.fdroid.net.bluetooth.BluetoothConnection; //导入依赖的package包/类
private Request(String method, String path, BluetoothConnection connection) {
    this.method = method;
    this.path = path;
    this.connection = connection;

    output = new OutputStreamWriter(connection.getOutputStream());
    input = connection.getInputStream();
}
 
开发者ID:uhuru-mobile,项目名称:mobile-store,代码行数:9,代码来源:Request.java

示例3: createHEAD

import org.fdroid.fdroid.net.bluetooth.BluetoothConnection; //导入依赖的package包/类
public static Request createHEAD(String path, BluetoothConnection connection) {
    return new Request(Methods.HEAD, path, connection);
}
 
开发者ID:uhuru-mobile,项目名称:mobile-store,代码行数:4,代码来源:Request.java

示例4: createGET

import org.fdroid.fdroid.net.bluetooth.BluetoothConnection; //导入依赖的package包/类
public static Request createGET(String path, BluetoothConnection connection) {
    return new Request(Methods.GET, path, connection);
}
 
开发者ID:uhuru-mobile,项目名称:mobile-store,代码行数:4,代码来源:Request.java

示例5: listenForRequest

import org.fdroid.fdroid.net.bluetooth.BluetoothConnection; //导入依赖的package包/类
/**
 * This is a blocking method, which will wait until a full Request is received.
 */
public static Request listenForRequest(BluetoothConnection connection) throws IOException {
    Request request = new Request("", "", connection);
    return request.listen() ? request : null;
}
 
开发者ID:uhuru-mobile,项目名称:mobile-store,代码行数:8,代码来源:Request.java


注:本文中的org.fdroid.fdroid.net.bluetooth.BluetoothConnection类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。