Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <dependency>
- <groupId>org.glassfish.jersey.core</groupId>
- <artifactId>jersey-client</artifactId>
- <version>2.25.1</version>
- </dependency>
- <dependency>
- <groupId>org.glassfish.jersey.media</groupId>
- <artifactId>jersey-media-json-jackson</artifactId>
- <version>2.25.1</version>
- </dependency>
- public static void main(String[] args) throws IOException {
- Map<String, String> map = new HashMap<String, String>();
- File f=new File("file.txt");
- System.out.println(f.getAbsolutePath());
- BufferedReader in = new BufferedReader(new FileReader("file.txt"));
- String line = "";
- while ((line = in.readLine()) != null) {
- String parts[] = line.split("\\s+");
- map.put(parts[0], parts[1]);
- }
- in.close();
- System.out.println(map.toString());
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement