code: public static Properties loadPropertiesFromInputStream(InputStream fin) throws IOException {
          Properties props = new Properties();
          InputStreamReader reader = new InputStreamReader(fin, "UTF-8");
          try {
              props.load(reader);
              return props;
          } finally {
              if (reader != null) {
                  reader.close();
              }
              if (fin != null) {
                  fin.close();
              }
          }
      }
docs: Load properties from InputStream with utf-8 encoding, and it will take care of closing the input stream.
  @param fin
  @return
  @throws IOException