orpiske commented on a change in pull request #6270:
URL: https://github.com/apache/camel/pull/6270#discussion_r728683315



##########
File path: core/camel-util/src/main/java/org/apache/camel/util/IOHelper.java
##########
@@ -116,11 +118,22 @@ public static BufferedWriter buffered(Writer writer) {
     }
 
     public static String toString(Reader reader) throws IOException {
-        return toString(buffered(reader));
+        return toString(reader, INITIAL_OFFSET);
+    }
+
+    public static String toString(Reader reader, long offset) throws 
IOException {
+        return toString(buffered(reader), offset);
     }
 
     public static String toString(BufferedReader reader) throws IOException {
+        return toString(reader, INITIAL_OFFSET);
+    }
+
+    public static String toString(BufferedReader reader, long offset) throws 
IOException {
         StringBuilder sb = new StringBuilder(1024);
+
+        reader.skip(offset);

Review comment:
       Sorry, I meant that `reader.skip(0)` should be fine as per Reader API. I 
can include the check, for this, though. 




-- 
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.

To unsubscribe, e-mail: commits-unsubscr...@camel.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to