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 int |
DEFAULT_TAB_SIZE |
static ECSSVersion |
DEFAULT_VERSION |
| Constructor and Description |
|---|
CSSReaderSettings() |
CSSReaderSettings(CSSReaderSettings aOther) |
public static final ECSSVersion DEFAULT_VERSION
public static final Charset DEFAULT_CHARSET
public static final boolean DEFAULT_BROWSER_COMPLIANT_MODE
public static final int DEFAULT_TAB_SIZE
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.@Nonnegative public int getTabSize()
DEFAULT_TAB_SIZE.@Nonnull public CSSReaderSettings setTabSize(@Nonnegative int nTabSize)
nTabSize - The tab size to use. Must be > 0.@Nullable public ICSSInterpretErrorHandler getInterpretErrorHandler()
null. If this is null
the default error handler from CSSReader is used.@Nonnull public CSSReaderSettings setInterpretErrorHandler(@Nullable ICSSInterpretErrorHandler aInterpretErrorHandler)
aInterpretErrorHandler - The special error handler to be used. May be null to
indicate to use the default error handler from CSSReader.@Nonnull public CSSReaderSettings getClone()
getClone in interface com.helger.commons.lang.ICloneable<CSSReaderSettings>Copyright © 2014–2018 Philip Helger. All rights reserved.