Thursday, 16 April 2015

Eclipse RCP: Reading text file resource to a string

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:
  1. StackOverFlow - Simplest way to read a file in to string
  2. StackOverFlow - Convert InputStream in to String


No comments:

Post a Comment

Gallery

Object Oritented, Git

Most Commented

OOAD

Contact Form

Name

Email *

Message *

2014 © Planer - Responsive Blogger Magazine Theme
Planer theme by Way2themes