We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
/*Protostuff 序列化泛型类*/ Page<User> pageUser = new Page<User>(); private RuntimeSchema<Item> schema = RuntimeSchema.createFrom(pageUser .class);//这里就不行了 byte[] array=ProtostuffIOUtil.toByteArray(item,schema, LinkedBuffer.allocate(LinkedBuffer.DEFAULT_BUFFER_SIZE)); /*Protostuff 无法序列化泛型类*/ System.out.println("序列化数据为"+array);
/*异常信息*/ Exception in thread "main" java.lang.RuntimeException: Reading from a byte array threw an IOException (should never happen). at com.dyuproject.protostuff.IOUtil.mergeFrom(IOUtil.java:52) at com.dyuproject.protostuff.ProtobufIOUtil.mergeFrom(ProtobufIOUtil.java:95) at com.cityline.shoe.common.utils.SerializationUtils.main(SerializationUtils.java:44) Caused by: com.dyuproject.protostuff.ProtostuffException: Corrupt input. at com.dyuproject.protostuff.runtime.ObjectSchema.readObjectFrom(ObjectSchema.java:641) at com.dyuproject.protostuff.runtime.ObjectSchema.mergeFrom(ObjectSchema.java:312) at com.dyuproject.protostuff.ByteArrayInput.mergeObject(ByteArrayInput.java:375) at com.dyuproject.protostuff.runtime.RuntimeRepeatedFieldFactory$5.mergeFrom(RuntimeRepeatedFieldFactory.java:385) at com.dyuproject.protostuff.runtime.MappedSchema.mergeFrom(MappedSchema.java:196) at com.dyuproject.protostuff.IOUtil.mergeFrom(IOUtil.java:43) ... 2 more
The text was updated successfully, but these errors were encountered:
No branches or pull requests
The text was updated successfully, but these errors were encountered: