#BAEL-5880: rename method to getNumberOfPages

This commit is contained in:
h_sharifi 2022-11-09 11:54:10 +03:30
parent f27e792a4c
commit ef3f32c405
1 changed files with 4 additions and 4 deletions

View File

@ -4,11 +4,11 @@ package com.baeldung.pdfinfo;
import com.itextpdf.text.pdf.PdfReader;
import java.io.IOException;
import java.util.HashMap;
import java.util.Map;
public class PdfInfoIText {
public static int getNumberOfPage(final String pdfFile) throws IOException {
public static int getNumberOfPages(final String pdfFile) throws IOException {
PdfReader reader = new PdfReader(pdfFile);
int pages = reader.getNumberOfPages();
reader.close();
@ -22,9 +22,9 @@ public class PdfInfoIText {
return isEncrypted;
}
public static HashMap<String, String> getInfo(final String pdfFile) throws IOException {
public static Map<String, String> getInfo(final String pdfFile) throws IOException {
PdfReader reader = new PdfReader(pdfFile);
HashMap<String, String> info = reader.getInfo();
Map<String, String> info = reader.getInfo();
reader.close();
return info;
}