PortableFilenameEncoder { public static String encodePathComponent(String name) { return UnicodeURLEncoder.encode(name); }  static String encodePathComponent(String name);  }
@Test public void encodePathComponent() throws Exception { assertEquals("hello", PortableFilenameEncoder.encodePathComponent("hello")); assertEquals("%E5%92%8C%E9%A3%9F", PortableFilenameEncoder.encodePathComponent("和食")); }