gpt4 book ai didi

com.badlogic.gdx.backends.android.ZipResourceFile.getInputStream()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-18 14:53:31 27 4
gpt4 key购买 nike

本文整理了Java中com.badlogic.gdx.backends.android.ZipResourceFile.getInputStream()方法的一些代码示例,展示了ZipResourceFile.getInputStream()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ZipResourceFile.getInputStream()方法的具体详情如下:
包路径:com.badlogic.gdx.backends.android.ZipResourceFile
类名称:ZipResourceFile
方法名:getInputStream

ZipResourceFile.getInputStream介绍

[英]getInputStream returns an AssetFileDescriptor.AutoCloseInputStream associated with the asset that is contained in the Zip file, or a standard ZipInputStream if necessary to uncompress the file
[中]getInputStream返回一个AssetFileDescriptor。与Zip文件中包含的资产关联的AutoCloseInputStream,或标准ZipInputStream(如果需要)来解压缩文件

代码示例

代码示例来源:origin: libgdx/libgdx

@Override
public InputStream read() {
  InputStream input = null;
  try {
    input = expansionFile.getInputStream(getPath());
  } catch (IOException ex) {
    throw new GdxRuntimeException("Error reading file: " + file + " (ZipResourceFile)", ex);
  }
  return input;
}

代码示例来源:origin: libgdx/libgdx

@Override
public InputStream read() {
  InputStream input = null;
  try {
    input = expansionFile.getInputStream(getPath());
  } catch (IOException ex) {
    throw new GdxRuntimeException("Error reading file: " + file + " (ZipResourceFile)", ex);
  }
  return input;
}

代码示例来源:origin: stackoverflow.com

// Get a ZipResourceFile representing a merger of both the main and patch files
ZipResourceFile expansionFile = APKExpansionSupport.getAPKExpansionZipFile(appContext,
    mainVersion, patchVersion);

// Get an input stream for a known file inside the expansion file ZIPs
InputStream fileStream = expansionFile.getInputStream(pathToFileInsideZip);

代码示例来源:origin: stackoverflow.com

// Get a ZipResourceFile representing a merger of both the main and patch files
ZipResourceFile expansionFile =
  APKExpansionSupport.getAPKExpansionZipFile(appContext,
    mainVersion, patchVersion);

// Get an input stream for a known file inside the expansion file ZIPs
InputStream fileStream = expansionFile.getInputStream(pathToFileInsideZip);

代码示例来源:origin: stackoverflow.com

// Get a ZipResourceFile representing a merger of both the main and patch files
ZipResourceFile expansionFile = APKExpansionSupport.getAPKExpansionZipFile(appContext,
  mainVersion, patchVersion);

// Get an input stream for a known file inside the expansion file ZIPs
InputStream fileStream = expansionFile.getInputStream(pathToFileInsideZip);

代码示例来源:origin: stackoverflow.com

// this one work with image file, media file
// Get a ZipResourceFile representing a specific expansion file

ZipResourceFile expansionFile = new ZipResourceFile(filePathToMyZip);

// Get an input stream for a known file inside the expansion file ZIPs

InputStream fileStream = expansionFile.getInputStream(pathToFileInsideZip);

代码示例来源:origin: stackoverflow.com

// This one works with an image file and a media file.
// Get a ZipResourceFile representing a specific expansion file

ZipResourceFile expansionFile = new ZipResourceFile(filePathToMyZip);

// Get an input stream for a known file inside the expansion file ZIPs

InputStream fileStream = expansionFile.getInputStream(pathToFileInsideZip);

代码示例来源:origin: stackoverflow.com

ZipResourceFile expansionFile = APKExpansionSupport.getAPKExpansionZipFile(this,2001,2001);
if(expansionFile!=null){
    FileDescriptor fd = expansionFile.getAssetFileDescriptor("audio_01.mp3");
    //or
    InputStream is = expansionFile.getInputStream("audio_01.mp3");
}

代码示例来源:origin: stackoverflow.com

String file = path + resource;
try {
  fileStream = expansionFile.getInputStream(file);
  Drawable drawable = Drawable.createFromStream(fileStream, null);
  return drawable;

代码示例来源:origin: stackoverflow.com

InputStream iStream = zip.getInputStream("img1.jpg");

代码示例来源:origin: stackoverflow.com

try {
  dis = new DataInputStream(
      zrf.getInputStream(entry.mFileName));

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com