?? readfile.java
字號:
import javax.microedition.midlet.*;
import java.io.*;
public class ReadFile extends MIDlet{
InputStream is = null;
DataInputStream din = null;
String fileName;
public ReadFile(){
fileName = getAppProperty("Test-File-Name");
is = getClass().getResourceAsStream(fileName);
din = new DataInputStream(is);
}
public void startApp(){
int l;
byte[] buffer;
int c;
try{
l = din.available();
buffer = new byte[l+1];
}
catch(Exception ex){
buffer = new byte[10];
}
try{
while((c = is.read()) != -1) {
System.out.print(""+(char)c);
}
System.out.println("");
}catch(Exception ex){}
}
public void pauseApp(){
}
public void destroyApp(boolean unconditional){
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -