本文整理汇总了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);
}
}
}
示例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();
}
}
}
示例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;
}
示例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;
}
示例5: DynamicZipInputStreamEntryAdapter
import org.cloudfoundry.client.lib.archive.ApplicationArchive; //导入方法依赖的package包/类
public DynamicZipInputStreamEntryAdapter(ApplicationArchive.Entry entry) {
this.entry = entry;
}