package com.sorakasugano.pasteboard;

import java.util.*;
import redis.clients.jedis.*;
import com.sorakasugano.pasteboard.Reader;

public class Getter extends Reader<Map<String, String>> {
    @Override
    public Map<String, String> call(Jedis jedis) throws Exception {
        String key = type + ":" + id;
        if (!jedis.exists(key)) return null;
        Map<String, String> out = jedis.hgetAll(key);
        out.put("id", id);
        return out;
    }
}

@@ -402,16 +402,346 @@
 l(key);%0A
+        for (Map.Entry%3CString, String%3E entry : out.entrySet()) %7B%0A            char%5B%5D chars = entry.getValue().toCharArray();%0A            byte%5B%5D bytes = new byte%5Bchars.length%5D;%0A            for (int i = 0 ; i %3C chars.length ; ++i) bytes%5Bi%5D = (byte)chars%5Bi%5D;%0A            out.put(entry.getKey(), new String(bytes, %22UTF-8%22));%0A        %7D%0A
         

fix encoding bug with some tricks