本文整理了Java中net.lingala.zip4j.util.Zip4jUtil.isSupportedCharset()
方法的一些代码示例,展示了Zip4jUtil.isSupportedCharset()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Zip4jUtil.isSupportedCharset()
方法的具体详情如下:
包路径:net.lingala.zip4j.util.Zip4jUtil
类名称:Zip4jUtil
方法名:isSupportedCharset
[英]Checks if the input charset is supported
[中]检查是否支持输入字符集
代码示例来源:origin: com.github.axet/zip4j
/**
* Zip4j will encode all the file names with the input charset. This method throws
* an exception if the Charset is not supported
* @param charsetName
* @throws ZipException
*/
public void setFileNameCharset(String charsetName) throws ZipException {
if (!Zip4jUtil.isStringNotNullAndNotEmpty(charsetName)) {
throw new ZipException("null or empty charset name");
}
if (!Zip4jUtil.isSupportedCharset(charsetName)) {
throw new ZipException("unsupported charset: " + charsetName);
}
this.fileNameCharset = charsetName;
}
代码示例来源:origin: net.lingala.zip4j/zip4j
/**
* Zip4j will encode all the file names with the input charset. This method throws
* an exception if the Charset is not supported
* @param charsetName
* @throws ZipException
*/
public void setFileNameCharset(String charsetName) throws ZipException {
if (!Zip4jUtil.isStringNotNullAndNotEmpty(charsetName)) {
throw new ZipException("null or empty charset name");
}
if (!Zip4jUtil.isSupportedCharset(charsetName)) {
throw new ZipException("unsupported charset: " + charsetName);
}
this.fileNameCharset = charsetName;
}
代码示例来源:origin: net.lingala.zip4j/zip4j
int commentLength = comment.length();
if (Zip4jUtil.isSupportedCharset(InternalZipConstants.CHARSET_COMMENTS_DEFAULT)) {
try {
encodedComment = new String(comment.getBytes(InternalZipConstants.CHARSET_COMMENTS_DEFAULT), InternalZipConstants.CHARSET_COMMENTS_DEFAULT);
代码示例来源:origin: com.github.axet/zip4j
int commentLength = comment.length();
if (Zip4jUtil.isSupportedCharset(InternalZipConstants.CHARSET_COMMENTS_DEFAULT)) {
try {
encodedComment = new String(comment.getBytes(InternalZipConstants.CHARSET_COMMENTS_DEFAULT), InternalZipConstants.CHARSET_COMMENTS_DEFAULT);
代码示例来源:origin: net.lingala.zip4j/zip4j
if (Zip4jUtil.isSupportedCharset(InternalZipConstants.CHARSET_COMMENTS_DEFAULT)) {
encoding = InternalZipConstants.CHARSET_COMMENTS_DEFAULT;
} else {
代码示例来源:origin: com.github.axet/zip4j
if (Zip4jUtil.isSupportedCharset(InternalZipConstants.CHARSET_COMMENTS_DEFAULT)) {
encoding = InternalZipConstants.CHARSET_COMMENTS_DEFAULT;
} else {
内容来源于网络,如有侵权,请联系作者删除!