date = expand && date == null ? TimeUtil.toHumanDate(d) .getBytes("UTF-8") : date;
date = expand && date == null ? SVNFormatUtil.formatDate(jDate).getBytes("UTF-8") : date;
    public static Map computeKeywords(String keywords, String u, String a,            String d, String r) {        if (keywords == null) {            return Collections.EMPTY_MAP;        }        boolean expand = u != null;        byte[] date = null;        byte[] url = null;        byte[] rev = null;        byte[] author = null;        byte[] name = null;        byte[] id = null;        Map map = new HashMap();        try {            for (StringTokenizer tokens = new StringTokenizer(keywords,                    " \t\n\b\r\f"); tokens.hasMoreTokens();) {                String token = tokens.nextToken();                if ("LastChangedDate".equals(token) || "Date".equals(token)) {                    date = expand && date == null ? TimeUtil.toHumanDate(d)                            .getBytes("UTF-8") : date;                    map.put("LastChangedDate", date);                    map.put("Date", date);                } else if ("LastChangedRevision".equals(token)                        || "Revision".equals(token) || "Rev".equals(token)) {                    rev = expand && rev == null ? r.getBytes("UTF-8") : rev;                    map.put("LastChangedRevision", rev);                    map.put("Revision", rev);                    map.put("Rev", rev);                } else if ("LastChangedBy".equals(token)                        || "Author".equals(token)) {                    author = expand && author == null ? (a == null ? new byte[0]                            : a.getBytes("UTF-8"))                            : author;                    map.put("LastChangedBy", author);                    map.put("Author", author);                } else if ("HeadURL".equals(token) || "URL".equals(token)) {                    url = expand && url == null ? PathUtil.decode(u).getBytes(                            "UTF-8") : url;                    map.put("HeadURL", url);                    map.put("URL", url);                } else if ("Id".equals(token)) {                    if (expand && id == null) {                        rev = rev == null ? r.getBytes("UTF-8") : rev;                        date = date == null ? TimeUtil.toHumanDate(d).getBytes(                                "UTF-8") : date;                        name = name == null ? PathUtil.decode(PathUtil.tail(u))                                .getBytes("UTF-8") : name;                        author = author == null ? (a == null ? new byte[0] : a                                .getBytes("UTF-8")) : author;                        ByteArrayOutputStream bos = new ByteArrayOutputStream();                        bos.write(name);                        bos.write(' ');                        bos.write(rev);                        bos.write(' ');                        bos.write(date);                        bos.write(' ');                        bos.write(author);                        bos.close();                        id = bos.toByteArray();                    }                    map.put("Id", expand ? id : null);                }            }        } catch (IOException e) {            //        }        return map;    }