All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.jsoup.PortUtil Maven / Gradle / Ivy

Go to download

pdfHTML is an iText add-on that lets you to parse (X)HTML snippets and the associated CSS and converts them to PDF.

There is a newer version: 5.0.5
Show newest version
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