use of com.alibaba.dubbo.common.serialize.support.dubbo.GenericDataInput in project dubbo by alibaba.
the class DataInputOutputTest method testMain.
public void testMain() throws Exception {
// write.
UnsafeByteArrayOutputStream os = new UnsafeByteArrayOutputStream();
DataOutput cos = new GenericDataOutput(os);
writeTest(cos);
// read.
byte[] b = os.toByteArray();
DataInput cis = new GenericDataInput(new UnsafeByteArrayInputStream(b));
readTest(cis);
}
Aggregations