Code example for Scanner

0
		} 
		return htmlFiles;
	} 
 
	private String convertStreamToString(InputStream is) {
		return new Scanner(is).useDelimiter("\\A").next();
	} 
 
	private void showUrl(int pageNum) {
		assert pageNum >= 0 && pageNum < totalPages;
 
		String filename = htmlFiles.get(pageNum);
		String url = BASE_URL + filename;
		webView.loadUrl(url);
		showToast(currentPage + "");
	} 
 
	private void showToast(final String text) {
		Toast t = Toast.makeText(getBaseContext(), text, Toast.LENGTH_SHORT);
		t.show();
Contextual code suggestions in your IDE  Get Codota for Java