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


Java InputConnection类代码示例

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


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

示例1: openInputStream

import javax.microedition.io.InputConnection; //导入依赖的package包/类
public static InputStream openInputStream(String name) throws IOException {
	InputConnection con = ((InputConnection) openImpl(name, READ, false, false));
	try {
		return con.openInputStream();
	} finally {
		con.close();
	}
}
 
开发者ID:ieee8023,项目名称:blucat,代码行数:9,代码来源:MicroeditionConnector.java

示例2: GPRSParametersResourceReader

import javax.microedition.io.InputConnection; //导入依赖的package包/类
/**
 * GPRS settings reader.
 *
 * @param source Source file to read in
 * @param names Names of the elements to search for in priority (usually
 * MCC-MNC, MCC).
 * @throws IOException
 */
public GPRSParametersResourceReader(InputConnection source, Vector names) throws IOException {
    if (source == null || names == null) {
        if (Logger.BUILD_DEBUG && LOG) {
            Logger.log("GPRSSettingsReader:28: is/names == null", true);
        }
    }
    this.source = source;
    this.names = names;
    reset();
}
 
开发者ID:fclairamb,项目名称:tc65lib,代码行数:19,代码来源:GPRSParametersResourceReader.java

示例3: Scanner

import javax.microedition.io.InputConnection; //导入依赖的package包/类
public Scanner(String fileName) {
    try {
        InputConnection connection = (InputConnection) Connector.open("file:///" + fileName, Connector.READ);
        input = connection.openDataInputStream();
    } catch (IOException e) {
        System.out.println("Hi, this is Sam Crane with the error report:");
        e.printStackTrace();
        System.exit(-1);
    }
}
 
开发者ID:wiredcats,项目名称:EventBasedWiredCats,代码行数:11,代码来源:Scanner.java

示例4: readLog

import javax.microedition.io.InputConnection; //导入依赖的package包/类
public Vector readLog(String fileName) throws NumberFormatException { 
    Vector nodes = new Vector();
    
    try {
        connection = (InputConnection) Connector.open("file:///" + fileName, Connector.READ);
        theFile = connection.openDataInputStream();
        
        while (hasMore) {
            String first = readToken();
            if (first == null)
            {
                hasMore = false;
                break;
            }
            
            nodes.addElement(new Node(
                    Double.parseDouble(first),
                    Double.parseDouble(readToken()),
                    Integer.parseInt(readToken()),
                    Double.parseDouble(readToken()),
                    Double.parseDouble(readToken()),
                    Double.parseDouble(readToken())));
        }
        
        theFile.close();
    }
    catch (IOException ioe)
    {
        ioe.printStackTrace();
    }
    
    return nodes;
}
 
开发者ID:wiredcats,项目名称:EventBasedWiredCats,代码行数:34,代码来源:AutonomousReader.java

示例5: readLog

import javax.microedition.io.InputConnection; //导入依赖的package包/类
public Vector readLog(String fileName)
{ 
    Vector nodes = new Vector();
    
    try
    {
         connection = (InputConnection) Connector.open("file:///" + fileName, Connector.READ);
        theFile = connection.openDataInputStream();
        
        while (hasMore)
        {
            String first = readToken();
            if (first == null)
            {
                hasMore = false;
                break;
            }
            
            nodes.addElement(new Node(
                    Double.parseDouble(first),
                    Double.parseDouble(readToken()),
                    Integer.parseInt(readToken()),
                    Double.parseDouble(readToken()),
                    Double.parseDouble(readToken()),
                    Double.parseDouble(readToken())));
        }
        
        theFile.close();
    }
    catch (IOException ioe)
    {
        ioe.printStackTrace();
    }
    
    return nodes;
}
 
开发者ID:wiredcats,项目名称:EventBasedWiredCats,代码行数:37,代码来源:LogReader.java

示例6: openDataInputStream

import javax.microedition.io.InputConnection; //导入依赖的package包/类
public DataInputStream openDataInputStream() throws IOException {
	return ((InputConnection) impl).openDataInputStream();
}
 
开发者ID:empeeoh,项目名称:bluecove-osx,代码行数:4,代码来源:Connection.java

示例7: openInputStream

import javax.microedition.io.InputConnection; //导入依赖的package包/类
public InputStream openInputStream() throws IOException {
	return ((InputConnection) impl).openInputStream();
}
 
开发者ID:empeeoh,项目名称:bluecove-osx,代码行数:4,代码来源:Connection.java

示例8: openDataInputStream

import javax.microedition.io.InputConnection; //导入依赖的package包/类
public DataInputStream openDataInputStream(String name) throws IOException {
	return ((InputConnection) open(name)).openDataInputStream();
}
 
开发者ID:BombusMod,项目名称:BombusMod,代码行数:4,代码来源:ConnectorAdapter.java

示例9: openInputStream

import javax.microedition.io.InputConnection; //导入依赖的package包/类
public InputStream openInputStream(String name) throws IOException {
	return ((InputConnection) open(name)).openInputStream();
}
 
开发者ID:BombusMod,项目名称:BombusMod,代码行数:4,代码来源:ConnectorAdapter.java

示例10: ConnectionInputStream

import javax.microedition.io.InputConnection; //导入依赖的package包/类
/**
 * Wraps input stream from the given connection.
 */
public ConnectionInputStream(InputConnection in) throws IOException {
	this.conn = in;
	this.input = in.openInputStream();
}
 
开发者ID:SBasalaev,项目名称:alchemy-os,代码行数:8,代码来源:ConnectionInputStream.java


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