/** * Parses URL into StyleSheet * * @param url * URL of file to be parsed * @param network * Network processor used for handling the URL connections * @param encoding * Encoding of file * @return Parsed StyleSheet * @throws CSSException * When exception during parse occurs * @throws IOException * When file not found */ public static final StyleSheet parse(URL url, NetworkProcessor network, String encoding) throws CSSException, IOException { return getCSSParserFactory().parse(url, network, encoding, SourceType.URL, url); }
/** * Parses URL into StyleSheet * * @param url * URL of file to be parsed * @param network * Network processor used for handling the URL connections * @param encoding * Encoding of file * @return Parsed StyleSheet * @throws CSSException * When exception during parse occurs * @throws IOException * When file not found */ public static final StyleSheet parse(URL url, NetworkProcessor network, String encoding) throws CSSException, IOException { return getCSSParserFactory().parse((Object) url, network, encoding, SourceType.URL, url); }
/** * Parses URL into StyleSheet * * @param url * URL of file to be parsed * @param network * Network processor used for handling the URL connections * @param encoding * Encoding of file * @return Parsed StyleSheet * @throws CSSException * When exception during parse occurs * @throws IOException * When file not found */ public static final StyleSheet parse(URL url, NetworkProcessor network, String encoding) throws CSSException, IOException { return getCSSParserFactory().parse(url, network, encoding, SourceType.URL, url); }
/** * Parses text into a StyleSheet * * @param css * Text with CSS declarations * @param base * The URL to be used as a base for loading external resources. Base URL may * be {@code null} if there are no external resources in the CSS string * referenced by relative URLs. * @param network * Network processor for retrieving the URL resources * @return Parsed StyleSheet * @throws IOException * When exception during read occurs * @throws CSSException * When exception during parse occurs */ public static final StyleSheet parseString(String css, URL base, NetworkProcessor network) throws IOException, CSSException { URL baseurl = base; if (baseurl == null) baseurl = new URL("file:///base/url/is/not/specified"); //prevent errors if there are still some relative URLs used return getCSSParserFactory().parse(css, network, null, SourceType.EMBEDDED, baseurl); }
/** * Parses text into a StyleSheet * * @param css * Text with CSS declarations * @param base * The URL to be used as a base for loading external resources. Base URL may * be {@code null} if there are no external resources in the CSS string * referenced by relative URLs. * @param network * Network processor for retrieving the URL resources * @return Parsed StyleSheet * @throws IOException * When exception during read occurs * @throws CSSException * When exception during parse occurs */ public static final StyleSheet parseString(String css, URL base, NetworkProcessor network) throws IOException, CSSException { URL baseurl = base; if (baseurl == null) baseurl = new URL("file:///base/url/is/not/specified"); //prevent errors if there are still some relative URLs used return getCSSParserFactory().parse(css, network, null, SourceType.EMBEDDED, baseurl); }
/** * Parses text into a StyleSheet * * @param css * Text with CSS declarations * @param base * The URL to be used as a base for loading external resources. Base URL may * be {@code null} if there are no external resources in the CSS string * referenced by relative URLs. * @param network * Network processor for retrieving the URL resources * @return Parsed StyleSheet * @throws IOException * When exception during read occurs * @throws CSSException * When exception during parse occurs */ public static final StyleSheet parseString(String css, URL base, NetworkProcessor network) throws IOException, CSSException { URL baseurl = base; if (baseurl == null) baseurl = new URL("file:///base/url/is/not/specified"); //prevent errors if there are still some relative URLs used return getCSSParserFactory().parse(css, network, null, SourceType.EMBEDDED, baseurl); }
/** * Parses text into StyleSheet * * @param css * Text with CSS declarations * @return Parsed StyleSheet * @throws IOException * When exception during read occurs * @throws CSSException * When exception during parse occurs * @deprecated * This function does not specify the base URL. {@link #parseString(String, URL)} * should be used instead. */ @Deprecated public static final StyleSheet parse(String css) throws IOException, CSSException { URL base = new URL("file:///base/url/is/not/specified"); //Cannot determine the base URI in this method but we need some base URI for relative URLs return getCSSParserFactory().parse(css, getNetworkProcessor(), null, SourceType.EMBEDDED, base); }
/** * Parses text into StyleSheet * * @param css * Text with CSS declarations * @return Parsed StyleSheet * @throws IOException * When exception during read occurs * @throws CSSException * When exception during parse occurs * @deprecated * This function does not specify the base URL. {@link #parseString(String, URL)} * should be used instead. */ @Deprecated public static final StyleSheet parse(String css) throws IOException, CSSException { URL base = new URL("file:///base/url/is/not/specified"); //Cannot determine the base URI in this method but we need some base URI for relative URLs return getCSSParserFactory().parse(css, new DefaultNetworkProcessor(), null, SourceType.EMBEDDED, base); }
/** * Parses text into StyleSheet * * @param css * Text with CSS declarations * @return Parsed StyleSheet * @throws IOException * When exception during read occurs * @throws CSSException * When exception during parse occurs * @deprecated * This function does not specify the base URL. {@link #parseString(String, URL)} * should be used instead. */ @Deprecated public static final StyleSheet parse(String css) throws IOException, CSSException { URL base = new URL("file:///base/url/is/not/specified"); //Cannot determine the base URI in this method but we need some base URI for relative URLs return getCSSParserFactory().parse(css, getNetworkProcessor(), null, SourceType.EMBEDDED, base); }
/** * Parses URL into StyleSheet * * @param url * URL of file to be parsed * @param encoding * Encoding of file * @return Parsed StyleSheet * @throws CSSException * When exception during parse occurs * @throws IOException * When file not found */ public static final StyleSheet parse(URL url, String encoding) throws CSSException, IOException { return getCSSParserFactory().parse(url, getNetworkProcessor(), encoding, SourceType.URL, url); }
/** * Parses URL into StyleSheet * * @param url * URL of file to be parsed * @param encoding * Encoding of file * @return Parsed StyleSheet * @throws CSSException * When exception during parse occurs * @throws IOException * When file not found */ public static final StyleSheet parse(URL url, String encoding) throws CSSException, IOException { return getCSSParserFactory().parse(url, getNetworkProcessor(), encoding, SourceType.URL, url); }
/** * Parses URL into StyleSheet * * @param url * URL of file to be parsed * @param encoding * Encoding of file * @return Parsed StyleSheet * @throws CSSException * When exception during parse occurs * @throws IOException * When file not found */ public static final StyleSheet parse(URL url, String encoding) throws CSSException, IOException { return getCSSParserFactory().parse((Object) url, new DefaultNetworkProcessor(), encoding, SourceType.URL, url); }