Code Snippets which is used to convert a text file inside a Eclipse RCP to a String.
Create a PluginResourceToString object and make a call to convertToString method with the filePath as the argument.
If in your plugin, resources is the directory containing text files to be read, and if the name of the text file is example.text. The parameter should be resources/example.text. Make sure that you are including the resources in build.properties file.
Related web links:
Create a PluginResourceToString object and make a call to convertToString method with the filePath as the argument.
If in your plugin, resources is the directory containing text files to be read, and if the name of the text file is example.text. The parameter should be resources/example.text. Make sure that you are including the resources in build.properties file.
Related web links:
- StackOverFlow - Simplest way to read a file in to string
- StackOverFlow - Convert InputStream in to String
No comments:
Post a Comment