当前位置: 首页>>代码示例>>Java>>正文


Java ApplicationArchive.Entry方法代码示例

本文整理汇总了Java中org.cloudfoundry.client.lib.archive.ApplicationArchive.Entry方法的典型用法代码示例。如果您正苦于以下问题:Java ApplicationArchive.Entry方法的具体用法?Java ApplicationArchive.Entry怎么用?Java ApplicationArchive.Entry使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.cloudfoundry.client.lib.archive.ApplicationArchive的用法示例。


在下文中一共展示了ApplicationArchive.Entry方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: CloudResources

import org.cloudfoundry.client.lib.archive.ApplicationArchive; //导入方法依赖的package包/类
/**
 * Create a new {@link CloudResources} instance for the specified {@link ApplicationArchive}.
 *
 * @param archive the application archive
 */
public CloudResources(ApplicationArchive archive) throws IOException {
    Assert.notNull(archive, "Archive must not be null");
    this.resources = new ArrayList<CloudResource>();
    for (ApplicationArchive.Entry entry : archive.getEntries()) {
        if (!entry.isDirectory()) {
            String name = entry.getName();
            long size = entry.getSize();
            String sha1 = bytesToHex(entry.getSha1Digest());
            CloudResource resource = new CloudResource(name, size, sha1);
            resources.add(resource);
        }
    }
}
 
开发者ID:SAP,项目名称:cf-java-client-sap,代码行数:19,代码来源:CloudResources.java

示例2: UploadApplicationPayload

import org.cloudfoundry.client.lib.archive.ApplicationArchive; //导入方法依赖的package包/类
/**
 * Create a new {@link UploadApplicationPayload}.
 *
 * @param archive              the source archive
 * @param knownRemoteResources resources that are already known on the remote server
 * @throws IOException
 */
public UploadApplicationPayload(ApplicationArchive archive, CloudResources knownRemoteResources) throws
        IOException {
    this.archive = archive;
    this.totalUncompressedSize = 0;
    Set<String> matches = knownRemoteResources.getFilenames();
    this.entriesToUpload = new ArrayList<DynamicZipInputStream.Entry>();
    for (ApplicationArchive.Entry entry : archive.getEntries()) {
        if (entry.isDirectory() || !matches.contains(entry.getName())) {
            entriesToUpload.add(new DynamicZipInputStreamEntryAdapter(entry));
            totalUncompressedSize += entry.getSize();
        }
    }
}
 
开发者ID:SAP,项目名称:cf-java-client-sap,代码行数:21,代码来源:UploadApplicationPayload.java

示例3: getEntries

import org.cloudfoundry.client.lib.archive.ApplicationArchive; //导入方法依赖的package包/类
@Override
public Iterable<Entry> getEntries() {
	Iterable<ArchiveEntry> cfEntries = cfArchive.getEntries();
	List<ApplicationArchive.Entry> legacyEntries = new ArrayList<ApplicationArchive.Entry>();
	if (cfEntries != null) {
		for (ArchiveEntry entry : cfEntries) {
			legacyEntries.add(new V1ArchiveEntry(entry));
		}
	}
	return legacyEntries;
}
 
开发者ID:eclipse,项目名称:cft,代码行数:12,代码来源:ApplicationUtil.java

示例4: getEntries

import org.cloudfoundry.client.lib.archive.ApplicationArchive; //导入方法依赖的package包/类
public Iterable<Entry> getEntries() {
	if (entries == null) {
		entries = new ArrayList<ApplicationArchive.Entry>();
		collectEntriesPriorToDeployment(entries, resources.toArray(new IModuleResource[0]));
	}
	return entries;
}
 
开发者ID:osswangxining,项目名称:dockerfoundry,代码行数:8,代码来源:AbstractModuleResourceArchive.java

示例5: DynamicZipInputStreamEntryAdapter

import org.cloudfoundry.client.lib.archive.ApplicationArchive; //导入方法依赖的package包/类
public DynamicZipInputStreamEntryAdapter(ApplicationArchive.Entry entry) {
    this.entry = entry;
}
 
开发者ID:SAP,项目名称:cf-java-client-sap,代码行数:4,代码来源:UploadApplicationPayload.java


注:本文中的org.cloudfoundry.client.lib.archive.ApplicationArchive.Entry方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。