public class CopyReader
extends java.lang.Object
Reader
into a String
.Constructor and Description |
---|
CopyReader(@NotNull java.io.Reader reader)
Creates a new instance.
|
Modifier and Type | Method and Description |
---|---|
@Nullable java.lang.String |
getFailure()
Returns the failure reason.
|
@NotNull java.lang.String |
getOutput()
Returns the reader's output.
|
void |
join()
Waits for the worker thread to terminate.
|
void |
start()
Starts reading.
|
void |
stop()
Stops reading.
|
public CopyReader(@NotNull @NotNull java.io.Reader reader)
reader
- the reader to read frompublic void start()
public void stop()
@Nullable public @Nullable java.lang.String getFailure()
null
if no failure occurred@NotNull public @NotNull java.lang.String getOutput()
public void join() throws java.lang.InterruptedException
java.lang.InterruptedException
- if the current thread was interrupted
waiting for the worker thread to terminate