How to read erlang term from redis by using java client?
问题 e.g. I save the tuple T = {k1, v1, k2, v2} to the redis by jedis: eredis:q(Conn, ["SET", <<"mykey">>, term_to_binary(T)]). I am trying to use the code below to read this erlang term: Jedis j = Redis.pool.getResource(); byte[] t = j.get("mykey").getBytes(); OtpInputStream ois = new OtpInputStream(t); System.out.println(OtpErlangObject.decode(ois)); The error is: com.ericsson.otp.erlang.OtpErlangDecodeException: Uknown data type: 239. So how can I get the erlang term correctly? Erlang side: