public GVRAndroidResource addResource(GVRAndroidResource resource)
    {
        String fileName = resource.getResourcePath();
        GVRAndroidResource resourceValue = resourceMap.get(fileName);
        if (resourceValue != null)
        {
            return resourceValue;
        }
        // Only put the resourceKey into the map for the first time, later put
        // will simply return the first resource
        resourceValue = resourceMap.putIfAbsent(fileName, resource);
        return resourceValue == null ? resource : resourceValue;
    }
public GVRAndroidResource addResource ( GVRAndroidResource resource ) { String fileName = resource . getResourcePath ( ) ; GVRAndroidResource resourceValue = resourceMap . get ( fileName ) ; if ( resourceValue != null ) { return resourceValue ; } resourceValue = resourceMap . putIfAbsent ( fileName , resource ) ; return resourceValue == null ? resource : resourceValue ; }
Adds an android resource to the volume's resource map.
This function is useful if you have created the GVRAndroidResource from a resource ID
but would like to read it via it's filename. If you add the resource first,
you can call openResource() on it's filename.

@param resource
Android resource to open.

@throws IOException