MahalakshmiSaravanan
Lurker
I am working on android expansion files, I placed 100k files as a obb file in my storage while accessing it, only 21k files are been able to access, it was found in its size, remaining files are returning as null. How to increase the size so that, I can access all my 100 k files? I will attach my code here,
public InputStream getInputStream(String assetPath) throws IOException {
ZipEntryRO entry = mHashMap.get(assetPath);
if (mHashMap.containsKey(assetPath) ) {
if (entry.isUncompressed()) {
return entry.getAssetFileDescriptor().createInputStream();
} else {
ZipFile zf = mZipFiles.get(entry.getZipFile());
/** read compressed files **/
if (null == zf) {
zf = new ZipFile(entry.getZipFile(), ZipFile.OPEN_READ);
mZipFiles.put(entry.getZipFile(), zf);
}
ZipEntry zi = zf.getEntry(assetPath);
if (null != zi)
return zf.getInputStream(zi);
}
}
return null;
}
public InputStream getInputStream(String assetPath) throws IOException {
ZipEntryRO entry = mHashMap.get(assetPath);
if (mHashMap.containsKey(assetPath) ) {
if (entry.isUncompressed()) {
return entry.getAssetFileDescriptor().createInputStream();
} else {
ZipFile zf = mZipFiles.get(entry.getZipFile());
/** read compressed files **/
if (null == zf) {
zf = new ZipFile(entry.getZipFile(), ZipFile.OPEN_READ);
mZipFiles.put(entry.getZipFile(), zf);
}
ZipEntry zi = zf.getEntry(assetPath);
if (null != zi)
return zf.getInputStream(zi);
}
}
return null;
}