*/
OutputStream out = fc.openOutputStream();
byte[] b = "contents".getBytes("UTF-8");
out.write(b);
out.flush();
out.close();
}else
{
/** *//**
* 打开输入流,读取文件中的内容
* 要求文件打开方式为可读
*/
InputStream dis = fc.openInputStream();

/** *//**
* 获取文件大小
*/
int size = (int)fc.fileSize();
byte[] bytes = new byte[size];
dis.read(bytes, 0, bytes.length);
String str = new String(bytes, "UTF-8");
tb = new TextBox("", str, 200, TextField.ANY);
dis.close();
}
fc.close();

