java.util.zip.ZipEntry#getComment ( )源码实例Demo

下面列出了java.util.zip.ZipEntry#getComment ( ) 实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。

源代码1 项目: pentaho-reporting   文件: ZipContentLocation.java
public ZipContentLocation( ZipRepository repository, ZipContentLocation parent, ZipEntry zipEntry ) {
  if ( repository == null ) {
    throw new NullPointerException();
  }
  if ( parent == null ) {
    throw new NullPointerException();
  }
  if ( zipEntry == null ) {
    throw new NullPointerException();
  }

  this.repository = repository;
  this.parent = parent;
  this.entryName = IOUtils.getInstance().getFileName( zipEntry.getName() );
  this.comment = zipEntry.getComment();
  this.size = zipEntry.getSize();
  this.time = zipEntry.getTime();
  this.entries = new HashMap();
  this.name = RepositoryUtilities.buildName( this, "/" ) + '/';
}
 
public ZipReadContentLocation( ZipReadRepository repository, ZipReadContentLocation parent, ZipEntry zipEntry ) {
  if ( repository == null ) {
    throw new NullPointerException();
  }
  if ( parent == null ) {
    throw new NullPointerException();
  }
  if ( zipEntry == null ) {
    throw new NullPointerException();
  }

  this.repository = repository;
  this.parent = parent;
  this.comment = zipEntry.getComment();
  this.size = zipEntry.getSize();
  this.time = zipEntry.getTime();
  this.entries = new HashMap();
  this.entryName = IOUtils.getInstance().getFileName( zipEntry.getName() );
  this.name = RepositoryUtilities.buildName( this, "/" ) + '/';
}
 
源代码3 项目: pentaho-reporting   文件: ZipReadContentItem.java
public ZipReadContentItem( final ZipReadRepository repository,
                           final ZipReadContentLocation parent,
                           final ZipEntry zipEntry,
                           final byte[] bytes ) {
  if ( repository == null ) {
    throw new NullPointerException();
  }
  if ( zipEntry == null ) {
    throw new NullPointerException();
  }
  if ( bytes == null ) {
    throw new NullPointerException();
  }

  this.parent = parent;
  this.repository = repository;
  this.comment = zipEntry.getComment();
  this.name = zipEntry.getName();
  this.entryName = IOUtils.getInstance().getFileName( name );
  this.size = zipEntry.getSize();
  this.time = zipEntry.getTime();
  this.rawData = bytes;
}
 
源代码4 项目: buck   文件: GenAidlIntegrationTest.java
private String zipEntryDebugString(ZipEntry entryOne) {
  return "<ZE name="
      + entryOne.getName()
      + " crc="
      + entryOne.getCrc()
      + " comment="
      + entryOne.getComment()
      + " size="
      + entryOne.getSize()
      + " atime="
      + entryOne.getLastAccessTime()
      + " mtime="
      + entryOne.getLastModifiedTime()
      + " ctime="
      + entryOne.getCreationTime()
      + ">";
}
 
源代码5 项目: buck   文件: GenruleIntegrationTest.java
private String zipEntryDebugString(ZipEntry entryOne) {
  return "<ZE name="
      + entryOne.getName()
      + " crc="
      + entryOne.getCrc()
      + " comment="
      + entryOne.getComment()
      + " size="
      + entryOne.getSize()
      + " atime="
      + entryOne.getLastAccessTime()
      + " mtime="
      + entryOne.getLastModifiedTime()
      + " ctime="
      + entryOne.getCreationTime();
}
 
源代码6 项目: anyline   文件: ZipUtil.java
/** 
 * 取得压缩文件对象的注释 
 *  
 * @param entry 压缩文件对象 
 * @return 压缩文件对象的注释 
 */ 
public static String getEntryComment(ZipEntry entry) { 
	String result = ""; 
	try {

           result = entry.getComment();
           if(null != result) {
               result = new String(result.getBytes("GB2312"), "8859_1");
           }

	} catch (Exception e) { 
		e.printStackTrace(); 
	} 
	return result; 
}
 
源代码7 项目: rxjava2-extras   文件: ZippedEntry.java
public ZippedEntry(ZipEntry e, InputStream is) {
    this.name = e.getName();
    this.time = e.getTime();
    // this.mtime = e.getLastModifiedTime();
    // this.atime = e.getLastAccessTime();
    // this.ctime = e.getCreationTime();
    this.crc = e.getCrc();
    this.size = e.getSize();
    this.csize = e.getCompressedSize();
    this.method = e.getMethod();
    this.extra = e.getExtra();
    this.comment = e.getComment();
    this.is = is;
}
 
源代码8 项目: rxjava-extras   文件: ZippedEntry.java
public ZippedEntry(ZipEntry e, InputStream is) {
    this.name = e.getName();
    this.time = e.getTime();
    // this.mtime = e.getLastModifiedTime();
    // this.atime = e.getLastAccessTime();
    // this.ctime = e.getCreationTime();
    this.crc = e.getCrc();
    this.size = e.getSize();
    this.csize = e.getCompressedSize();
    this.method = e.getMethod();
    this.extra = e.getExtra();
    this.comment = e.getComment();
    this.is = is;
}
 
源代码9 项目: pentaho-reporting   文件: ZipContentItem.java
public ZipContentItem( final ZipRepository repository,
                       final ZipContentLocation parent,
                       final ZipEntry zipEntry,
                       final byte[] bytes ) {
  if ( repository == null ) {
    throw new NullPointerException();
  }
  if ( zipEntry == null ) {
    throw new NullPointerException();
  }
  if ( bytes == null ) {
    throw new NullPointerException();
  }
  if ( parent == null ) {
    throw new NullPointerException();
  }

  this.parent = parent;
  this.repository = repository;
  this.comment = zipEntry.getComment();
  this.name = RepositoryUtilities.buildName( this, "/" );
  this.entryName = IOUtils.getInstance().getFileName( name );
  this.size = zipEntry.getSize();
  this.crc32 = zipEntry.getCrc();
  this.time = zipEntry.getTime();
  this.rawData = bytes;
  final int method = zipEntry.getMethod();
  if ( method == ZipEntry.STORED || method == ZipEntry.DEFLATED ) {
    this.method = new Integer( method );
  } else {
    this.method = new Integer( ZipEntry.DEFLATED );
  }
  this.compression = Deflater.DEFAULT_COMPRESSION;
}
 
源代码10 项目: pentaho-reporting   文件: ZipContentLocation.java
private void updateMetaData( final ZipEntry zipEntry ) {
  this.comment = zipEntry.getComment();
  this.size = zipEntry.getSize();
  this.time = zipEntry.getTime();
}
 
源代码11 项目: pentaho-reporting   文件: ZipReadContentLocation.java
private void updateMetaData( final ZipEntry zipEntry ) {
  this.comment = zipEntry.getComment();
  this.size = zipEntry.getSize();
  this.time = zipEntry.getTime();
}