org.jsoup.PortUtil Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of html2pdf Show documentation
Show all versions of html2pdf Show documentation
pdfHTML is an iText add-on that lets you to parse (X)HTML snippets and the associated CSS and converts
them to PDF.
package org.jsoup;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.RandomAccessFile;
import java.nio.charset.Charset;
import java.util.Properties;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
public class PortUtil {
public static final String escapedSingleBracket = "''";
public static final String signedNumberFormat = ",number,+#;-#";
public static boolean hasMatch(Pattern pattern, String input) {
return pattern.matcher(input).find();
}
public static boolean charsetIsSupported(String charsetName) {
try {
return Charset.isSupported(charsetName);
} catch (IllegalArgumentException e) {
return false;
}
}
public static RandomAccessFile getReadOnlyRandomAccesFile(File file)throws FileNotFoundException {
return new RandomAccessFile(file, "r");
}
public static boolean isSuccessful(Matcher m) {
return m.find();
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy