/**
 * Licensed to the Apache Software Foundation (ASF) under one or more
 * contributor license agreements.  See the NOTICE file distributed with
 * this work for additional information regarding copyright ownership.
 * The ASF licenses this file to You under the Apache License, Version 2.0
 * (the "License"); you may not use this file except in compliance with
 * the License.  You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package at.illecker.storm.examples.util.io;

import java.io.BufferedReader;
import java.io.File;
import java.io.FileReader;
import java.io.IOException;
import java.util.List;
import java.util.Map;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import com.google.gson.GsonBuilder;

public class JsonUtil {
  private static final Logger LOG = LoggerFactory.getLogger(JsonUtil.class);

  public static List<Map<String, Object>> readJsonFile(File jsonFile) {
    LOG.info("Load file " + jsonFile.getAbsolutePath());
    BufferedReader br = null;
    try {
      br = new BufferedReader(new FileReader(jsonFile));
      GsonBuilder builder = new GsonBuilder();
      List<Map<String, Object>> elements = (List<Map<String, Object>>) builder
          .create().fromJson(br, Object.class);
      LOG.info("Loaded " + " elements: " + elements.size());
      return elements;
    } catch (IOException ioe) {
      ioe.printStackTrace();
    } finally {
      if (br != null) {
        try {
          br.close();
        } catch (IOException ignore) {
        }
      }
    }
    return null;
  }
}

@@ -916,42 +916,147 @@
 File
-Reader;%0Aimport java.io.IOException
+InputStream;%0Aimport java.io.FileNotFoundException;%0Aimport java.io.IOException;%0Aimport java.io.InputStream;%0Aimport java.io.InputStreamReader
 ;%0Aim
@@ -1421,24 +1421,290 @@
 utePath());%0A
+    try %7B%0A      return readJsonStream(new FileInputStream(jsonFile));%0A    %7D catch (FileNotFoundException e) %7B%0A      LOG.error(e.getMessage());%0A    %7D%0A    return null;%0A  %7D%0A%0A  public static List%3CMap%3CString, Object%3E%3E readJsonStream(%0A      InputStream jsonInputStream) %7B%0A
     Buffered
@@ -1769,27 +1769,41 @@
 new 
-FileReader(jsonFile
+InputStreamReader(jsonInputStream
 ));%0A
@@ -2064,69 +2064,8 @@
 ts;%0A
-    %7D catch (IOException ioe) %7B%0A      ioe.printStackTrace();%0A
     
@@ -2199,31 +2199,14 @@
 %7D%0A    %7D%0A
-    return null;%0A
   %7D%0A%7D%0A

Update JsonUtil