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