View Single Post
Old 11-23-2011, 12:18 PM   #6 (permalink)
berryapp
Knows Where the Search Button Is
 
Join Date: Nov 2011
Model: 9800T
PIN: N/A
Carrier: Rogers Canada
Posts: 34
Post Thanks: 3
Thanked 5 Times in 5 Posts
Exclamation Re: Read String in File text.

Quote:
Originally Posted by bankkab View Post
try {
fconn = (FileConnection) Connector.open("file:///D:/IP.txt", Connector.READ);
//is = fconn.openDataInputStream();
// data = IOUtilities.streamToBytes(is);
InputStream in = fconn.openInputStream();
byte[] data = IOUtilities.streamToBytes(in);
String sss = new String(data);
oxi = new LabelField(sss);
}



catch (IOException e)
{
System.out.println(e.getMessage());
}
add(oxi);


Build Complete but....In my App is Error !

Helpme please
You need to provide little bit more information. I believe you are saying that you can build fine, but you get error while running the app? What error message you exactly see. You could run your app in debug mode and add break point at certain line based on the error that you see.
Offline   Reply With Quote