Class StdIn
java.lang.Object
java.io.InputStream
org.junitpioneer.jupiter.StdIn
- All Implemented Interfaces:
Closeable, AutoCloseable
For details and examples, see
the documentation on standard input/output.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate intKeeps track of number of bytes that are still available toread().private final StringReaderprivate final StringWriter -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class InputStream
close, mark, markSupported, nullInputStream, read, readAllBytes, readNBytes, readNBytes, reset, skip, transferTo
-
Field Details
-
reader
-
writer
-
availableBytes
private int availableBytesKeeps track of number of bytes that are still available toread().
-
-
Constructor Details
-
StdIn
-
-
Method Details
-
available
- Overrides:
availablein classInputStream- Throws:
IOException
-
read
- Specified by:
readin classInputStream- Throws:
IOException
-
read
- Overrides:
readin classInputStream- Throws:
IOException
-
capturedString
- Returns:
- the string that was read from
System.in; note that buffering readers may read all lines eagerly
-
capturedLines
- Returns:
- the lines that were read from
System.in; note that buffering readers may read all lines eagerly
-