public static List < Feature > parseFeatures ( URL file ) throws IOException { InputStream input = file . openStream ( ) ; try { Reader reader = new InputStreamReader ( input , Charset . forName ( "UTF-8" ) ) ; try { FeatureDatabase . Builder database = FeatureDatabase . newBuilder ( ) ; JsonFormat . parser ( ) . merge ( reader , database ) ; return database . getFeatureList ( ) ; } finally { reader . close ( ) ; } } finally { input . close ( ) ; } }
Parses the JSON input file containing the list of features .