List of usage examples for org.apache.thrift TDeserializer deserialize
public void deserialize(TBase base, byte[] bytes, int offset, int length) throws TException
From source file:org.apache.storm.utils.Utils.java
License:Apache License
public static <T> T thriftDeserialize(Class<T> c, byte[] b, int offset, int length) { try {//ww w . j a v a 2 s. co m T ret = c.newInstance(); TDeserializer des = getDes(); des.deserialize((TBase) ret, b, offset, length); return ret; } catch (Exception e) { throw new RuntimeException(e); } }