public final class ZipEntryCharsetDetector extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
ZIP_ENTRY_ALTERNATIVE_ENCODING |
| Constructor and Description |
|---|
ZipEntryCharsetDetector() |
| Modifier and Type | Method and Description |
|---|---|
static Charset |
detect(File zipFile)
Returns the detected character set, which is suitable to read the entries of the provided ZIP file properly.
|
static Charset |
detect(InputStream resettableInputStream)
Returns the detected character set, which is suitable to read the entries of the provided ZIP file properly.
|
static Charset |
detect(JCRFileContent zipFileNode)
Returns the detected character set, which is suitable to read the entries of the provided ZIP file properly.
|
static Charset |
detect(URL resourceUrl)
Returns the detected character set, which is suitable to read the entries of the provided ZIP resource properly.
|
public static final String ZIP_ENTRY_ALTERNATIVE_ENCODING
public static Charset detect(File zipFile)
ZIP_ENTRY_ALTERNATIVE_ENCODING and also by the corresponding jahia.properties
entry. If the method fails to detect the charset it returns null.zipFile - the ZIP file to read entries fromnull if
we fail to detect the charsetpublic static Charset detect(InputStream resettableInputStream)
ZIP_ENTRY_ALTERNATIVE_ENCODING and also by the corresponding jahia.properties
entry. If the method fails to detect the charset it returns null.zipFileResettableInputStream - a ZIP file stream that has proper support for InputStream.reset() method, e.g. is a ByteArrayInputStreamnull if
we fail to detect the charsetpublic static Charset detect(JCRFileContent zipFileNode)
ZIP_ENTRY_ALTERNATIVE_ENCODING and also by the corresponding jahia.properties
entry. If the method fails to detect the charset it returns null.zipFile - the ZIP file to read entries fromnull if
we fail to detect the charsetpublic static Charset detect(URL resourceUrl)
ZIP_ENTRY_ALTERNATIVE_ENCODING and also by the corresponding jahia.properties
entry. If the method fails to detect the charset it returns null.resourceUrl - the URL of the resource to open a stream fromnull
if we fail to detect the charsetCopyright © 2004–2020 Jahia Solutions Group SA. All rights reserved.