Byte,String 在clojure中互转:
(ns test
(:require [clojure.string]
[clojure.stacktrace]
[clojure.tools.logging :as log]
))
(defn- string-to-bytes [s] (.getBytes s))
(defn- bytes-to-string [b] (String. b))
(def test (string-to-bytes "abcdefg"))
(println (apply str (bytes-to-string test)))