Package net.sf.gridarta.utils
Class CopyReader
- java.lang.Object
-
- net.sf.gridarta.utils.CopyReader
-
public class CopyReader extends java.lang.ObjectCopies aReaderinto aString.
-
-
Constructor Summary
Constructors Constructor Description CopyReader(@NotNull java.io.Reader reader)Creates a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description @Nullable java.lang.StringgetFailure()Returns the failure reason.@NotNull java.lang.StringgetOutput()Returns the reader's output.voidjoin()Waits for the worker thread to terminate.voidstart()Starts reading.voidstop()Stops reading.
-
-
-
Method Detail
-
start
public void start()
Starts reading.
-
stop
public void stop()
Stops reading.
-
getFailure
@Nullable public @Nullable java.lang.String getFailure()
Returns the failure reason.- Returns:
- the failure reason or
nullif no failure occurred
-
getOutput
@NotNull public @NotNull java.lang.String getOutput()
Returns the reader's output.- Returns:
- the reader's output
-
join
public void join() throws java.lang.InterruptedExceptionWaits for the worker thread to terminate.- Throws:
java.lang.InterruptedException- if the current thread was interrupted waiting for the worker thread to terminate
-
-