@Test public void testExtension() { FsEntry e = new FsEntry(); e.put("name", "foo"); assertEquals("", e.extension()); e.clear(); e.put("name", "foo.txt"); assertEquals("txt", e.extension()); e.clear(); e.put("name", "foo..txt"); assertEquals("txt", e.extension()); e.clear(); e.put("name", "foo.tar.gz"); assertEquals("gz", e.extension()); e.clear(); e.put("name", "foo.html_file"); assertEquals("html_file", e.extension()); e.clear(); e.put("name", ""); assertEquals("", e.extension()); e.clear(); e.put("name", "foo.Html"); assertEquals("html", e.extension()); e.clear(); e.put("name", "foo."); assertEquals("", e.extension()); }
public String extension() { final String s = getName(); final int dot = s.lastIndexOf('.'); if (-1 < dot && dot < s.length() - 1) { return s.substring(dot + 1).toLowerCase(); } return ""; }
FsEntry extends HashMap<String,Object> { public String extension() { final String s = getName(); final int dot = s.lastIndexOf('.'); if (-1 < dot && dot < s.length() - 1) { return s.substring(dot + 1).toLowerCase(); } return ""; } }
FsEntry extends HashMap<String,Object> { public String extension() { final String s = getName(); final int dot = s.lastIndexOf('.'); if (-1 < dot && dot < s.length() - 1) { return s.substring(dot + 1).toLowerCase(); } return ""; }  }
FsEntry extends HashMap<String,Object> { public String extension() { final String s = getName(); final int dot = s.lastIndexOf('.'); if (-1 < dot && dot < s.length() - 1) { return s.substring(dot + 1).toLowerCase(); } return ""; }  void clear(); Map<String, Object> getChangedItems(); boolean containsKey(Object key); boolean containsValue(Object value); @Deprecated Set<Map.Entry<String,Object>> entrySet(); @Deprecated boolean equals(Object o); Object get(Object key); boolean isEmpty(); @Deprecated Set<String> keySet(); Object put(String key, Object value); void putAll(Map<? extends String,? extends Object> m); @Deprecated Object remove(Object key); int size(); @Deprecated Collection<Object> values(); void setFileSystem(FileSystem fs); Map<String, StreamProxy> getStreams(); Object getStream(); Object getStream(String key); InputStream getInputStream(); InputStream getInputStream(String key); boolean hasMetadata(); String getPath(); String getName(); String getID(); String extension(); String fullPath(); Date getCreated(); Date getWritten(); Date getAccessed(); Date getUpdated(); long getSize(); boolean parseJson(String jsonstr); }
FsEntry extends HashMap<String,Object> { public String extension() { final String s = getName(); final int dot = s.lastIndexOf('.'); if (-1 < dot && dot < s.length() - 1) { return s.substring(dot + 1).toLowerCase(); } return ""; }  void clear(); Map<String, Object> getChangedItems(); boolean containsKey(Object key); boolean containsValue(Object value); @Deprecated Set<Map.Entry<String,Object>> entrySet(); @Deprecated boolean equals(Object o); Object get(Object key); boolean isEmpty(); @Deprecated Set<String> keySet(); Object put(String key, Object value); void putAll(Map<? extends String,? extends Object> m); @Deprecated Object remove(Object key); int size(); @Deprecated Collection<Object> values(); void setFileSystem(FileSystem fs); Map<String, StreamProxy> getStreams(); Object getStream(); Object getStream(String key); InputStream getInputStream(); InputStream getInputStream(String key); boolean hasMetadata(); String getPath(); String getName(); String getID(); String extension(); String fullPath(); Date getCreated(); Date getWritten(); Date getAccessed(); Date getUpdated(); long getSize(); boolean parseJson(String jsonstr);  }