1. Download our Official Android App: Forums for Android!

Support Issue in increasing the hashmap size

Discussion in 'Android Help' started by MahalakshmiSaravanan, Apr 28, 2016.

  1. MahalakshmiSaravanan

    Thread Starter
    Rank:
    None
    Points:
    5
    Posts:
    1
    Joined:
    Apr 28, 2016

    Apr 28, 2016
    1
    0
    5
    Female
    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;
    }
     

    Advertisement

Share This Page

Loading...