/** * Read the CSS from the passed String using a byte stream. * * @param sCSS * The source string containing the CSS to be parsed. May not be * <code>null</code>. * @param aFallbackCharset * The charset to be used in case neither a <code>@charset</code> rule * nor a BOM is present. May not be <code>null</code>. * @param eVersion * The CSS version to use. May not be <code>null</code>. * @return <code>null</code> if reading failed, the CSS declarations * otherwise. */ @Nullable public static CascadingStyleSheet readFromString (@Nonnull final String sCSS, @Nonnull final Charset aFallbackCharset, @Nonnull final ECSSVersion eVersion) { return readFromStringStream (sCSS, new CSSReaderSettings ().setFallbackCharset (aFallbackCharset) .setCSSVersion (eVersion)); }
/** * Read the CSS from the passed String using a byte stream. * * @param sCSS * The source string containing the CSS to be parsed. May not be * <code>null</code>. * @param aFallbackCharset * The charset to be used in case neither a <code>@charset</code> rule * nor a BOM is present. May not be <code>null</code>. * @param eVersion * The CSS version to use. May not be <code>null</code>. * @param aCustomExceptionHandler * An optional custom exception handler that can be used to collect the * unrecoverable parsing errors. May be <code>null</code>. * @return <code>null</code> if reading failed, the CSS declarations * otherwise. */ @Nullable public static CascadingStyleSheet readFromString (@Nonnull final String sCSS, @Nonnull final Charset aFallbackCharset, @Nonnull final ECSSVersion eVersion, @Nullable final ICSSParseExceptionCallback aCustomExceptionHandler) { return readFromStringStream (sCSS, new CSSReaderSettings ().setFallbackCharset (aFallbackCharset) .setCSSVersion (eVersion) .setCustomExceptionHandler (aCustomExceptionHandler)); }
/** * Read the CSS from the passed String using a byte stream. * * @param sCSS * The source string containing the CSS to be parsed. May not be * <code>null</code>. * @param aFallbackCharset * The charset to be used in case neither a <code>@charset</code> rule * nor a BOM is present. May not be <code>null</code>. * @param eVersion * The CSS version to use. May not be <code>null</code>. * @param aCustomErrorHandler * An optional custom error handler that can be used to collect the * recoverable parsing errors. May be <code>null</code>. * @return <code>null</code> if reading failed, the CSS declarations * otherwise. */ @Nullable public static CascadingStyleSheet readFromString (@Nonnull final String sCSS, @Nonnull final Charset aFallbackCharset, @Nonnull final ECSSVersion eVersion, @Nullable final ICSSParseErrorHandler aCustomErrorHandler) { return readFromStringStream (sCSS, new CSSReaderSettings ().setFallbackCharset (aFallbackCharset) .setCSSVersion (eVersion) .setCustomErrorHandler (aCustomErrorHandler)); }
@Nullable final ICSSParseExceptionCallback aCustomExceptionHandler) return readFromStringStream (sCSS, new CSSReaderSettings ().setFallbackCharset (aFallbackCharset) .setCSSVersion (eVersion)