public JsonTool fetch()

in velocity-tools-generic/src/main/java/org/apache/velocity/tools/generic/JsonTool.java [228:262]


    public JsonTool fetch(String url)
    {
        if (url != null)
        {
            Reader reader = null;
            try
            {
                if (importSupport == null)
                {
                    initializeImportSupport(new ValueParser());
                }
                reader = importSupport.acquireReader(url);
                if (reader != null)
                {
                    initJSON(reader);
                }
            }
            catch (Exception e)
            {
                getLog().error("could not fetch JSON content from URL {}", url, e);
            }
            finally
            {
                if (reader != null)
                {
                    try
                    {
                        reader.close();
                    }
                    catch (IOException ioe) {}
                }
            }
        }
        return this;
    }