本文整理汇总了Java中javax.microedition.io.ConnectionNotFoundException.printStackTrace方法的典型用法代码示例。如果您正苦于以下问题:Java ConnectionNotFoundException.printStackTrace方法的具体用法?Java ConnectionNotFoundException.printStackTrace怎么用?Java ConnectionNotFoundException.printStackTrace使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类javax.microedition.io.ConnectionNotFoundException
的用法示例。
在下文中一共展示了ConnectionNotFoundException.printStackTrace方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: execute
import javax.microedition.io.ConnectionNotFoundException; //导入方法依赖的package包/类
/**
* @inheritDoc
*/
public void execute(String url) {
try {
mid.platformRequest(url);
} catch (ConnectionNotFoundException ex) {
ex.printStackTrace();
}
}
示例2: playAudio
import javax.microedition.io.ConnectionNotFoundException; //导入方法依赖的package包/类
public void playAudio() throws AudioException, FileException
{
errorItem.setLabel("");
errorItem.setText("");
System.err.println("Attempting to play audio...");
messageItem.setText("Starting the Player...");
recordService.startPlayback();
try
{
if(recMid!= null)
recMid.platformRequest(fullName);
else
throw new ConnectionNotFoundException("Since midlet is null, try 2nd method of playback");
}
catch(ConnectionNotFoundException cnfe)
{
cnfe.printStackTrace();
/*If the platform request fails, which it shouldn't, attempt to start playback
* through the service.*/
recordService.startPlayback();
}
System.err.println("Player has started.");
messageItem.setText("Player has started!");
form.removeCommand(eraseCommand);
form.removeCommand(saveCommand);
form.removeCommand(playCommand); //"Hide" playCommand when playing has started
form.removeCommand(recordCommand); //"Hide" recordCommand when playing has started
form.addCommand(stopCommand); //Show recordCommand when playing has started
//Thread.currentThread().sleep(FOREVER);
}
示例3: processView
import javax.microedition.io.ConnectionNotFoundException; //导入方法依赖的package包/类
private void processView(String file) {
try {
System.out.println("Opening: " + file);
midlet.platformRequest(file);
} catch (ConnectionNotFoundException e) {
System.out.println("Error displaying image: " + e.getMessage());
e.printStackTrace();
}
}
示例4: startApp
import javax.microedition.io.ConnectionNotFoundException; //导入方法依赖的package包/类
public void startApp() {
try {
platformRequest("http://localhost:8000/tests/Manifest1Updated.jad");
} catch (ConnectionNotFoundException e) {
e.printStackTrace();
System.out.println("FAIL");
}
Isolate.currentIsolate().exit(0);
}
示例5: startApp
import javax.microedition.io.ConnectionNotFoundException; //导入方法依赖的package包/类
public void startApp() {
try {
platformRequest("http://localhost:8000/tests/test.html");
} catch (ConnectionNotFoundException e) {
e.printStackTrace();
System.out.println("FAIL");
}
}