private PDFFile loadPDFFile(File pdfFile) throws IOException
	{
		// load the pdf file in the byte buffer
//		RandomAccessFile raf = new RandomAccessFile(pdfFile, "r");
//		FileChannel channel = raf.getChannel();
//		ByteBuffer buf = channel.map(FileChannel.MapMode.READ_ONLY, 0, channel.size());
//		
//		PDFFile pdf = new PDFFile(buf);
//		channel.close();
//		raf.close();
		
		// http://stackoverflow.com/questions/6112686/reduce-number-of-opened-files-in-java-code
		FileInputStream stream = null;
		FileChannel channel = null;
		PDFFile pdf = null;

		try {
			stream = new FileInputStream(pdfFile);
		    channel = stream.getChannel();
			ByteBuffer buf = channel.map(FileChannel.MapMode.READ_ONLY, 0, channel.size());
			pdf = new PDFFile(buf);
		} catch (IOException e) {
		    // handle exception
		} finally {
		    if (channel != null)
		    	channel.close();
		    if (stream != null)
		    	stream.close();
		}

		return pdf;
	}