D
Darko
Hi to all!
At the moment I'm using the API that hasn't got FileConnection class,
so I'm using
OutputStream o = ((OutputConnection)Connector.open(
"file:///root1/file" )).openOutputStream();
I don't know if I have some typos, but it doesn't matter. It works for
files that already exist but there are several problems:
1. If the file doesn't exist, it won't create it. I saw thew way
people do it by using FileConnection, but I don't have it. What's the
way around?
2. If the file is bigger than the content I'm writing, only the part
of it is overwritten. What I would like is the "truncate" behaviour,
meaning the file should be truncated the moment it's open for writing.
3. How do I delete the file later, once I don't need it?
Thank you in advance, I'm waiting by the computer for the answer
[just kidding :]
Darko
At the moment I'm using the API that hasn't got FileConnection class,
so I'm using
OutputStream o = ((OutputConnection)Connector.open(
"file:///root1/file" )).openOutputStream();
I don't know if I have some typos, but it doesn't matter. It works for
files that already exist but there are several problems:
1. If the file doesn't exist, it won't create it. I saw thew way
people do it by using FileConnection, but I don't have it. What's the
way around?
2. If the file is bigger than the content I'm writing, only the part
of it is overwritten. What I would like is the "truncate" behaviour,
meaning the file should be truncated the moment it's open for writing.
3. How do I delete the file later, once I don't need it?
Thank you in advance, I'm waiting by the computer for the answer
[just kidding :]
Darko