D
David Lamb
I'm designing some software to live within the restrictions of the JNLP
sandbox. I understand how to use the various interfaces to create an
open file dialog, read the contents, create a save file dialog, and
write the contents -- the stuff corresponding to conventional Open and
Save As menu items.
Now I'm trying to figure out how to do a "Reopen" dialog -- discard the
current internal data and reread the document from scratch. Is there
anyone who has used these facilities enough to be able to answer the
following more detailed version of my question?
The FileOpenService openFileDialog and saveFileDialog methods each
return a FileContents object, which provides a getInputStream operation
for reading the file from persistent storage, and a getOutputStream for
writing. If I close the input stream after reading, then call
getInputStream again, will that give me a new input stream for the same
FileContents so I can do a reread?
sandbox. I understand how to use the various interfaces to create an
open file dialog, read the contents, create a save file dialog, and
write the contents -- the stuff corresponding to conventional Open and
Save As menu items.
Now I'm trying to figure out how to do a "Reopen" dialog -- discard the
current internal data and reread the document from scratch. Is there
anyone who has used these facilities enough to be able to answer the
following more detailed version of my question?
The FileOpenService openFileDialog and saveFileDialog methods each
return a FileContents object, which provides a getInputStream operation
for reading the file from persistent storage, and a getOutputStream for
writing. If I close the input stream after reading, then call
getInputStream again, will that give me a new input stream for the same
FileContents so I can do a reread?