Class StringCollector

java.lang.Object
com.storedobject.common.StringCollector
All Implemented Interfaces:
Runnable

public class StringCollector extends Object implements Runnable
The StringCollector class reads input data asynchronously from a given Reader or InputStream and collects it into a single concatenated string. It is designed to be executed on a virtual thread. This class also allows retrieval of any exception encountered during the reading process. StringCollector starts a virtual thread that reads and processes lines from the input source. The collected string can be accessed after the reading process is completed, and users can wait for the process to complete using the provided methods. Typically, you invoke the Object.toString() method to the string being read.
Author:
Syam