FileInputStream and IFile [message #326570] |
Tue, 25 March 2008 09:26  |
Eclipse User |
|
|
|
Originally posted by: alexjaquet.gmail.com
Hi,
I'm looking for a way to create FileInputStream within an IFile,
i've tryed to create it with
private void initializeContents(IFile file) {
try {
FileInputStream fis = new
FileInputStream(file.getFullPath().toString());
BufferedReader myInput = new BufferedReader (new InputStreamReader(fis));
String thisLine = null;
StringBuffer buffer = new StringBuffer();
while ((thisLine = myInput.readLine()) != null) {
System.out.println(thisLine);
buffer.append(thisLine);
}
myInput.close();
setContents(buffer.toString());
} catch (Exception e) {
e.printStackTrace();
}
but the file.getFullPath doesn't give the absolut full path
How can I deal with it
Thanks
Alexandre
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.02733 seconds