private static Multimap<String, String> propertiesFromLinuxFile(String file) {
    try {
      List<String> lines = Files.readLines(new File(file), Charset.defaultCharset());
      ImmutableMultimap.Builder<String, String> result = ImmutableMultimap.builder();
      for (String line : lines) {
        // TODO(schmoe): replace with Splitter (in Guava release 10)
        String[] parts = line.split("\\s*\\:\\s*", 2);
        if (parts.length == 2) {
          result.put(parts[0], parts[1]);
        }
      }
      return result.build();
    } catch (IOException e) {
      // If there's any problem reading the file, just return an empty multimap.
      return ImmutableMultimap.of();
    }
  }
private static Multimap < String , String > propertiesFromLinuxFile ( String file ) { try { List < String > lines = Files . readLines ( new File ( file ) , Charset . defaultCharset ( ) ) ; ImmutableMultimap . Builder < String , String > result = ImmutableMultimap . builder ( ) ; for ( String line : lines ) { String [ ] parts = line . split ( "\\s*\\:\\s*" , 2 ) ; if ( parts . length == 2 ) { result . put ( parts [ 0 ] , parts [ 1 ] ) ; } } return result . build ( ) ; } catch ( IOException e ) { return ImmutableMultimap . of ( ) ; } }
Returns the key/value pairs from the specified properties-file like file.
Unlike standard Java properties files, {@code reader} is allowed to list
the same property multiple times. Comments etc. are unsupported.

<p>If there's any problem reading the file's contents, we'll return an
empty Multimap.