@Override public Message read(String location) { String strFile = ""; try { strFile = new Scanner(new File(location)).useDelimiter("\\Z").next(); } catch (IOException ex) { System.out.println(ex); } Message m = new Message(); m.setType("mess"); m.setBody(strFile); return m; }