Code example for StringWriter

Methods: closetoString

0
	 * @throws IOException 
	 */ 
	public String parseText(String filePath) throws IOException {
		PDDocument pdfDocument = getPdfDocument(filePath);
		PDFTextStripper pdfTextStripper = new PDFTextStripper();
		StringWriter writer = new StringWriter();
		pdfTextStripper.writeText(pdfDocument, writer);
		String string = writer.toString();
		writer.close();
		return string;
	} 
} 
Stop searching for code, let great code find you!  Add Codota to your java IDE