- 使用 Spring Initializr 创建 Spring Boot 应用程序
- 在Spring Boot中配置Cassandra
- 在 Spring Boot 上配置 Tomcat 连接池
- 将Camel消息路由到嵌入WildFly的Artemis上
本文整理了Java中com.badlogic.gdx.backends.android.ZipResourceFile
类的一些代码示例,展示了ZipResourceFile
类的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ZipResourceFile
类的具体详情如下:
包路径:com.badlogic.gdx.backends.android.ZipResourceFile
类名称:ZipResourceFile
暂无
代码示例来源:origin: libgdx/libgdx
static public ZipResourceFile getResourceZipFile(String[] expansionFiles)
throws IOException {
ZipResourceFile apkExpansionFile = null;
for (String expansionFilePath : expansionFiles) {
if (null == apkExpansionFile) {
apkExpansionFile = new ZipResourceFile(expansionFilePath);
} else {
apkExpansionFile.addPatchFile(expansionFilePath);
}
}
return apkExpansionFile;
}
代码示例来源:origin: libgdx/libgdx
@Override
public AssetFileDescriptor getAssetFileDescriptor() throws IOException {
return expansionFile.getAssetFileDescriptor(getPath());
}
代码示例来源: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
ZipResourceFile expansionFile = new ZipResourceFile("myZipFile.zip");
AssetFileDescriptor assetFileDescriptor = expansionFile.getAssetFileDescriptor("myMusic.mp3");
try {
mediaPlayer.setDataSource(assetFileDescriptor.getFileDescriptor());
mediaPlayer.prepare();
mediaPlayer.start();
}
catch (IOException e) {
// Handle exception
}
代码示例来源: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
byte[] buf = new byte[1024 * 256];
try {
zrf = new ZipResourceFile(fileName);
ZipEntryRO[] entries = zrf.getAllEntries();
try {
dis = new DataInputStream(
zrf.getInputStream(entry.mFileName));
代码示例来源:origin: stackoverflow.com
ZipResourceFile zip = new ZipResourceFile(strMainPath);
InputStream iStream = zip.getInputStream("img1.jpg");
代码示例来源:origin: libgdx/libgdx
@Override
public boolean exists() {
return hasAssetFd || expansionFile.getEntriesAt(getPath()).length != 0;
}
}
代码示例来源:origin: stackoverflow.com
private static void setMediaPlayerDataSourceFromZip(MediaPlayer mediaPlayer,
String zipFileName, String fileNameInZip) throws IOException,
FileNotFoundException {
ZipResourceFile zip = new ZipResourceFile(zipFileName);
FileInputStream fis = new FileInputStream(zipFileName);
try {
FileDescriptor zipfd = fis.getFD();
ZipEntryRO entry = zipFindFile(zip, fileNameInZip);
mediaPlayer.setDataSource(zipfd, entry.mOffset,
entry.mUncompressedLength);
} finally {
fis.close();
}
}
private static ZipEntryRO zipFindFile(ZipResourceFile zip, String fileNameInZip) {
for (ZipEntryRO entry : zip.getAllEntries()) {
if (entry.mFileName.equals(fileNameInZip))
return entry;
}
throw new RuntimeException(String.format("File \"%s\"not found in zip", fileNameInZip));
}
代码示例来源:origin: libgdx/libgdx
static private int read4LE(RandomAccessFile f) throws EOFException,
IOException {
return swapEndian(f.readInt());
}
代码示例来源:origin: libgdx/libgdx
public ZipResourceFile(String zipFileName) throws IOException {
addPatchFile(zipFileName);
}
代码示例来源:origin: libgdx/libgdx
int header = read4LE(f);
if (header == kEOCDSignature) {
Log.i(LOG_TAG, "Found Zip archive, but it looks empty");
代码示例来源:origin: stackoverflow.com
ZipResourceFile expansionFile = new ZipResourceFile("myZipFile.zip");
AssetFileDescriptor assetFileDescriptor = expansionFile.getAssetFileDescriptor("myMusic.mp3");
try {
mediaPlayer.setDataSource(assetFileDescriptor.getFileDescriptor(),
assetFileDescriptor.getStartOffset(),
assetFileDescriptor.getLength());
mediaPlayer.prepare();
mediaPlayer.start();
}
catch (IOException e) {
// Handle exception
}
代码示例来源:origin: libgdx/libgdx
@Override
public boolean exists() {
return hasAssetFd || expansionFile.getEntriesAt(getPath()).length != 0;
}
}
代码示例来源:origin: stackoverflow.com
for (String expansionFilePath : expansionFiles) {
if ( null == apkExpansionFile ) {
apkExpansionFile = new ZipResourceFile(expansionFilePath);
} else {
apkExpansionFile.addPatchFile(expansionFilePath);
代码示例来源:origin: libgdx/libgdx
static private int read4LE(RandomAccessFile f) throws EOFException,
IOException {
return swapEndian(f.readInt());
}
代码示例来源:origin: libgdx/libgdx
public ZipResourceFile(String zipFileName) throws IOException {
addPatchFile(zipFileName);
}
代码示例来源:origin: libgdx/libgdx
int header = read4LE(f);
if (header == kEOCDSignature) {
Log.i(LOG_TAG, "Found Zip archive, but it looks empty");
代码示例来源:origin: libgdx/libgdx
@Override
public AssetFileDescriptor getAssetFileDescriptor() throws IOException {
return expansionFile.getAssetFileDescriptor(getPath());
}
代码示例来源: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;
}
我正在尝试重写我的应用程序以使用 APK 扩展文件。我一直在关注这里的文档 http://developer.android.com/google/play/expansion-files.html
本文整理了Java中com.badlogic.gdx.backends.android.ZipResourceFile.addPatchFile()方法的一些代码示例,展示了ZipResourceFi
本文整理了Java中com.badlogic.gdx.backends.android.ZipResourceFile.()方法的一些代码示例,展示了ZipResourceFile.()的具体用法。这
本文整理了Java中com.badlogic.gdx.backends.android.ZipResourceFile.getEntriesAt()方法的一些代码示例,展示了ZipResourceFi
本文整理了Java中com.badlogic.gdx.backends.android.ZipResourceFile.getInputStream()方法的一些代码示例,展示了ZipResource
本文整理了Java中com.badlogic.gdx.backends.android.ZipResourceFile.swapEndian()方法的一些代码示例,展示了ZipResourceFile
本文整理了Java中com.badlogic.gdx.backends.android.ZipResourceFile.getAssetFileDescriptor()方法的一些代码示例,展示了Zip
本文整理了Java中com.badlogic.gdx.backends.android.ZipResourceFile.read4LE()方法的一些代码示例,展示了ZipResourceFile.re
我是一名优秀的程序员,十分优秀!