public int read(String name) {
        status = STATUS_OK;
        try {
            name = name.trim().toLowerCase();
            if ((name.indexOf("file:") >= 0) ||
                    (name.indexOf(":/") > 0)) {
                URL url = new URL(name);
                in = new BufferedInputStream(url.openStream());
            } else {
                in = new BufferedInputStream(new FileInputStream(name));
            }
            status = read(in);
        } catch (IOException e) {
            status = STATUS_OPEN_ERROR;
        }

        return status;
    }
Reads GIF file from specified file/URL source
(URL assumed if name contains ":/" or "file:")

@param name String containing source
@return read status code (0 = no errors)
plugins/base-plugin/src/main/java/com/github/hui/quick/plugin/base/gif/GifDecoder.java