/ Published in: Java

Shows reading a file bundled with a Sun SPOT application.
The file, called winners.txt contains the following 2 lines:
Walker
Griffin
-----------------------------------------------------------
The output would include:
NameOfFile=/winners.txt
line=Walker
line=Griffin
The file, called winners.txt contains the following 2 lines:
Walker
Griffin
-----------------------------------------------------------
The output would include:
NameOfFile=/winners.txt
line=Walker
line=Griffin
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
public class GetAppPropertiesSpotApp extends MIDlet { protected void startApp() throws MIDletStateChangeException { while ((line=br.readLine())!=null) { } } protected void pauseApp() {} protected void destroyApp(boolean arg0) throws MIDletStateChangeException {} }
Comments
