Code example for ZipEntry

Methods: getComment

0
     * @param entry 压缩文件对象 
     * @return 压缩文件对象的注释 
     * @throws UnsupportedEncodingException 
     */ 
    public static String getEntryComment(ZipEntry entry) throws UnsupportedEncodingException {
        return new String(entry.getComment().getBytes("GB2312"), "8859_1");
    } 
 
    /** 
     * 取得压缩文件对象的名称 
     *  
     * @param entry 压缩文件对象 
     * @return 压缩文件对象的名称 
     * @throws UnsupportedEncodingException 
     */ 
    public static String getEntryName(ZipEntry entry) throws UnsupportedEncodingException {
        return new String(entry.getName().getBytes("GB2312"), "8859_1");
    } 
 
    /** 
Contextual code suggestions in your IDE  Get Codota for Java