dcsimg
Problem in FileHandeling
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Amit_Sri
Posted On:   Thursday, April 10, 2008 05:37 AM

hello all, I want to write some data into the file ,but i m not able to do this, please tell me where i am wrong... i have written code below public OutputStream os = null; public FileConnection connection; public PrintStream out; try{ connection = (FileConnection)Connector.open("file:///root1/amit.text;append=true", Connector.WRITE ); os=connection.openDataOutputStream(); out= new PrintStream(os); out.print("WELCOME TO J2ME"); out.close(); }catch(IOException e) { System.err.println("Exception caught:" + e); }    More>>



hello all,
I want to write some data into the file ,but i m not able to do this, please tell me where i am wrong...
i have written code below
			
public OutputStream os = null;
public FileConnection connection;
public PrintStream out;

try{
connection = (FileConnection)Connector.open("file:///root1/amit.text;append=true", Connector.WRITE );

os=connection.openDataOutputStream();
out= new PrintStream(os);
out.print("WELCOME TO J2ME");
out.close();
}catch(IOException e)
{
System.err.println("Exception caught:" + e);
}

   <<Less
About | Sitemap | Contact