@Immutable public final class CSSDataURLHelper extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
BASE64_MARKER
The marker for Base64 encoding
|
static Charset |
DEFAULT_CHARSET
The default charset to be used for Data URLs: US-ASCII
|
static com.helger.commons.mime.IMimeType |
DEFAULT_MIME_TYPE
The default MIME type for Data URLs: text/plain;charset=US-ASCII
|
static com.helger.commons.mime.EMimeQuoting |
MIME_QUOTING
Data URLs should use the URL code to quote values!
|
static String |
PREFIX_DATA_URL
The default prefix for data URLs
|
static char |
SEPARATOR_CONTENT
The separator that starts the content
|
| Modifier and Type | Method and Description |
|---|---|
static boolean |
isDataURL(String sURL)
Check if the passed URL is a data URL.
|
static CSSDataURL |
parseDataURL(String sDataURL)
Parse a data URL into this type.
|
public static final Charset DEFAULT_CHARSET
public static final com.helger.commons.mime.IMimeType DEFAULT_MIME_TYPE
public static final String PREFIX_DATA_URL
public static final String BASE64_MARKER
public static final char SEPARATOR_CONTENT
public static final com.helger.commons.mime.EMimeQuoting MIME_QUOTING
public static boolean isDataURL(@Nullable String sURL)
sURL - The URL to check. May be null.true if the passed URL is a data URL,
false if not.@Nullable public static CSSDataURL parseDataURL(@Nullable String sDataURL)
Syntax dataurl := "data:" [ mediatype ] [ ";base64" ] "," data mediatype := [ type "/" subtype ] *( ";" parameter ) data := *urlchar parameter := attribute "=" value
sDataURL - The data URL to be parsed. May be null.null if parsing failedCopyright © 2014–2022 Philip Helger. All rights reserved.