本文整理汇总了Java中info.ata4.vpk.VPKEntry.getName方法的典型用法代码示例。如果您正苦于以下问题:Java VPKEntry.getName方法的具体用法?Java VPKEntry.getName怎么用?Java VPKEntry.getName使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类info.ata4.vpk.VPKEntry
的用法示例。
在下文中一共展示了VPKEntry.getName方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: buildItemPortraits
import info.ata4.vpk.VPKEntry; //导入方法依赖的package包/类
private void buildItemPortraits(VPKArchive vpk)
{
BufferedImage image = null;
for (VPKEntry entry : vpk.getEntriesForDir("resource/flash3/images/items/"))
{
if (entry.getType().equals("png"))
{
File imageFile = new File(entry.getPath());
try (FileChannel fc = FileUtils.openOutputStream(imageFile).getChannel())
{
fc.write(entry.getData());
image = ImageIO.read(imageFile);
String item = entry.getName();
portraitMap.put(item, image);
}
catch (IOException ex)
{
System.err.println("Can't write " + entry.getPath() + ": " + ex.getMessage());
}
}
}
}
示例2: buildAnnouncerPortraits
import info.ata4.vpk.VPKEntry; //导入方法依赖的package包/类
private void buildAnnouncerPortraits(VPKArchive vpk)
{
BufferedImage image = null;
for(VPKEntry entry : vpk.getEntriesForDir("resource/flash3/images/econ/announcer/"))
{
if (entry.getName().contains("large"))
{
continue; //don't grab the huge images, we won't use them.
}
File imageFile = new File(entry.getPath());
try (FileChannel fc = FileUtils.openOutputStream(imageFile).getChannel())
{
fc.write(entry.getData());
image = ImageIO.read(imageFile);
String announcer = entry.getName();
portraitMap.put(announcer, image);
}
catch (IOException ex)
{
System.err.println("Can't write " + entry.getPath() + ": " + ex.getMessage());
}
}
}
示例3: Script
import info.ata4.vpk.VPKEntry; //导入方法依赖的package包/类
public Script(VPKEntry scriptFile, Category category)
{
_rawFileName = scriptFile.getName() + "." + scriptFile.getType();
_internalScriptName = StringParsing.getScriptNameFromFileName(_rawFileName);
friendlyScriptName.set(StringParsing.prettyFormatScriptName(_internalScriptName));
_parentCategoryName = category.getCategoryName();
_isCustom = false;
_vpkPath = scriptFile.getPath();
}