private String getStringResource ( String path ) { InputStream in = getClass ( ) . getResourceAsStream ( path ) ; StringBuilder index = new StringBuilder ( ) ; char [ ] buffer = new char [ 1024 ] ; int read = 0 ; try ( InputStreamReader reader = new InputStreamReader ( in ) ) { while ( ( read = reader . read ( buffer ) ) != - 1 ) { index . append ( buffer , 0 , read ) ; } } catch ( IOException e ) { //just return what we've got return index . toString ( ) ; } return index . toString ( ) ; }
read the description contained in the index . html file