用到fastjson
public static ByteBuffer getByteBuffer(String s) { return JSON.parseObject(s, ByteBuffer.class); }