File tree Expand file tree Collapse file tree 1 file changed +0
-27
lines changed
core/src/main/java/io/github/cowwoc/anchor4j/core/internal/client Expand file tree Collapse file tree 1 file changed +0
-27
lines changed Original file line number Diff line number Diff line change 1
1
package io .github .cowwoc .anchor4j .core .internal .client ;
2
2
3
3
import io .github .cowwoc .pouch .core .WrappedCheckedException ;
4
- import org .slf4j .Logger ;
5
4
6
5
import java .io .BufferedReader ;
7
6
import java .io .File ;
@@ -43,32 +42,6 @@ public interface RunnableCommand
43
42
void run () throws IOException , InterruptedException ;
44
43
}
45
44
46
- /**
47
- * Discards the remaining data from the given reader and closes it.
48
- * <p>
49
- * This is typically used to drain a process's output or error reade to avoid deadlocks when the process
50
- * writes more data than the reader's buffer can hold.
51
- *
52
- * @param reader the reader
53
- * @param log the logger used to record any exceptions that are thrown while reading from the reader
54
- */
55
- public static void discard (BufferedReader reader , Logger log )
56
- {
57
- try (reader )
58
- {
59
- while (true )
60
- {
61
- String line = reader .readLine ();
62
- if (line == null )
63
- break ;
64
- }
65
- }
66
- catch (IOException | RuntimeException e )
67
- {
68
- log .error ("" , e );
69
- }
70
- }
71
-
72
45
/**
73
46
* Consumes a stream's output.
74
47
*
You can’t perform that action at this time.
0 commit comments