Search in sources :

Example 1 with ByteArrayInputEx

use of io.protostuff.ByteArrayInputEx in project incubator-servicecomb-java-chassis by apache.

the class RootDeserializer method deserialize.

@SuppressWarnings("unchecked")
public T deserialize(byte[] bytes) throws IOException {
    InputEx input = new ByteArrayInputEx(bytes);
    T instance = schema.newMessage();
    schema.mergeFrom(input, instance);
    return instance;
}
Also used : ByteArrayInputEx(io.protostuff.ByteArrayInputEx) InputEx(io.protostuff.InputEx) ByteArrayInputEx(io.protostuff.ByteArrayInputEx)

Example 2 with ByteArrayInputEx

use of io.protostuff.ByteArrayInputEx in project java-chassis by ServiceComb.

the class RootDeserializer method deserialize.

@SuppressWarnings("unchecked")
public T deserialize(byte[] bytes) throws IOException {
    InputEx input = new ByteArrayInputEx(bytes);
    T instance = schema.newMessage();
    schema.mergeFrom(input, instance);
    return instance;
}
Also used : ByteArrayInputEx(io.protostuff.ByteArrayInputEx) InputEx(io.protostuff.InputEx) ByteArrayInputEx(io.protostuff.ByteArrayInputEx)

Aggregations

ByteArrayInputEx (io.protostuff.ByteArrayInputEx)2 InputEx (io.protostuff.InputEx)2