I have a function that accepts File as an argument. I don\'t want to create/write a new File (I don\'t have write access to filesystem) in order to pass my string data to th
FileReader r = new FileReader(file);
Use a file reader load the file and then write its contents to a string buffer.
example
The link above shows you an example of how to accomplish this. As other post to this answer say to load a file into memory you do not need write access as long as you do not plan on making changes to the actual file.