Hello friends,
I am writing an application, which saves the data(byte[]) on WTK filesystem.
I am getting the data(byte[]) from SreamConnection.
While writing this daya(byte[]) on file using:
try
{
fc1 = (FileConnection)Connector.open("file:///root1/Img.bmp");
if (!fc1.exists())
{
fc1.create();
}
if (fc1 != null)
{
if (fc1.exists())
{
out = fc1.openOutputStream();
out.write(imgData);
out.close();
fc1.close();
}
}
else
{
System.out.println("fc1 is null ");
}
fc1.close();
}
catch (Exception e)
{
e.printStackTrace();
}
I am not getting any exception. Idont know why it is not saving the data.
Please suggest me.

Reply With Quote


