Here you can find the source of decode(String name)
public static String decode(String name)
//package com.java2s; //License from project: Apache License import java.io.File; import java.io.FileOutputStream; import java.io.IOException; public class Main { public static String decode(String name) { StringBuilder sb = new StringBuilder(); for (int i = 0; i < name.length(); i++) { char c = name.charAt(i); if (c != '_') sb.append(c);/*w w w . j av a 2 s . c o m*/ else { c = (char) Integer.parseInt(name.substring(i + 1, i + 3), 16); sb.append(c); i += 2; } } return sb.toString(); } public static void append(File file, byte[] data) { try (FileOutputStream stream = new FileOutputStream(file, true)) { stream.write(data); stream.getChannel().force(true); stream.close(); } catch (IOException e) { throw new RuntimeException(e); } } public static void write(File file, byte[] data) { try (FileOutputStream stream = new FileOutputStream(file)) { stream.write(data); stream.getChannel().force(true); stream.close(); } catch (IOException e) { throw new RuntimeException(e); } } }