sijie commented on a change in pull request #5123: Modify the schema decode 
method can decode ByteBuf
URL: https://github.com/apache/pulsar/pull/5123#discussion_r322407669
 
 

 ##########
 File path: 
pulsar-client-api/src/main/java/org/apache/pulsar/client/api/schema/SchemaReader.java
 ##########
 @@ -26,5 +26,17 @@
      * @param bytes the data
      * @return the serialized object
      */
-    T read(byte[] bytes);
+    default T read(byte[] bytes) {
+        return read(bytes, 0, bytes.length);
+    }
+
+    /**
+     * serialize bytes convert pojo
+     *
+     * @param bytes the data
+     * @param offset the byte[] initial position
+     * @param length the byte[] read length
+     * @return the serialized object
+     */
+    T read(byte[] bytes, int offset, int length);
 
 Review comment:
   Also add a method from read from `InputStream`

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to