public class CSSReaderSettings extends Object implements com.helger.commons.lang.ICloneable<CSSReaderSettings>
CSSReader.| Modifier and Type | Field and Description |
|---|---|
static boolean |
DEFAULT_BROWSER_COMPLIANT_MODE |
static Charset |
DEFAULT_CHARSET |
static ECSSVersion |
DEFAULT_VERSION |
| Constructor and Description |
|---|
CSSReaderSettings() |
CSSReaderSettings(CSSReaderSettings aOther) |
| Modifier and Type | Method and Description |
|---|---|
CSSReaderSettings |
getClone() |
ECSSVersion |
getCSSVersion() |
ICSSParseErrorHandler |
getCustomErrorHandler() |
ICSSParseExceptionCallback |
getCustomExceptionHandler() |
Charset |
getFallbackCharset() |
String |
getFallbackCharsetName() |
boolean |
isBrowserCompliantMode() |
CSSReaderSettings |
setBrowserCompliantMode(boolean bBrowserCompliantMode)
Change the browser compliant mode to use.
|
CSSReaderSettings |
setCSSVersion(ECSSVersion eCSSVersion)
Set the CSS version to be read.
|
CSSReaderSettings |
setCustomErrorHandler(ICSSParseErrorHandler aCustomErrorHandler) |
CSSReaderSettings |
setCustomExceptionHandler(ICSSParseExceptionCallback aCustomExceptionHandler) |
CSSReaderSettings |
setFallbackCharset(Charset aFallbackCharset) |
String |
toString() |
public static final ECSSVersion DEFAULT_VERSION
public static final Charset DEFAULT_CHARSET
public static final boolean DEFAULT_BROWSER_COMPLIANT_MODE
public CSSReaderSettings()
public CSSReaderSettings(@Nonnull CSSReaderSettings aOther)
@Nonnull public ECSSVersion getCSSVersion()
DEFAULT_VERSION. Never null.@Nonnull public CSSReaderSettings setCSSVersion(@Nonnull ECSSVersion eCSSVersion)
eCSSVersion - The version number to use. May not be null.@Nonnull public Charset getFallbackCharset()
@charset rule nor a BOM is present. Never
null. Defaults to DEFAULT_CHARSET.@Nonnull public String getFallbackCharsetName()
@charset rule nor a BOM is present. Never
null. Defaults to the name of DEFAULT_CHARSET
.@Nonnull public CSSReaderSettings setFallbackCharset(@Nonnull @Nonempty Charset aFallbackCharset)
aFallbackCharset - The charset to be used for reading the CSS file in case neither a
@charset rule nor a BOM is present. May not be
null.@Nullable public ICSSParseErrorHandler getCustomErrorHandler()
null.@Nonnull public CSSReaderSettings setCustomErrorHandler(@Nullable ICSSParseErrorHandler aCustomErrorHandler)
aCustomErrorHandler - A custom error handler that can be used to collect the recoverable
parsing errors. May be null.@Nullable public ICSSParseExceptionCallback getCustomExceptionHandler()
null.@Nonnull public CSSReaderSettings setCustomExceptionHandler(@Nullable ICSSParseExceptionCallback aCustomExceptionHandler)
aCustomExceptionHandler - A custom exception handler that can be used to collect the
unrecoverable parsing errors. May be null.public boolean isBrowserCompliantMode()
true if browser compliant parsing is enabled,
false otherwise. The default is
DEFAULT_BROWSER_COMPLIANT_MODE.@Nonnull public CSSReaderSettings setBrowserCompliantMode(boolean bBrowserCompliantMode)
bBrowserCompliantMode - true to use enable browser compliant parsing,
false to disable it.@Nonnull public CSSReaderSettings getClone()
getClone in interface com.helger.commons.lang.ICloneable<CSSReaderSettings>Copyright © 2014–2016 Philip Helger. All rights reserved.