Package org.codehaus.commons.compiler.io
Class Readers
java.lang.Object
org.codehaus.commons.compiler.io.Readers
Utiltity methods related to
Reader
.-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Reader
Any attempts to read return an "end-of-input" condition. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Reader
static Reader
static void
static Reader
onFirstChar
(Reader in, Runnable runnable) static String
static Reader
static Reader
trackLineAndColumn
(Reader in, LineAndColumnTracker tracker)
-
Field Details
-
EMPTY_READER
Any attempts to read return an "end-of-input" condition.
-
-
Constructor Details
-
Readers
private Readers()
-
-
Method Details
-
onFirstChar
- Returns:
FilterReader
that runs the runnable right before the first character is read
-
trackLineAndColumn
- Returns:
- A
FilterReader
that tracks line and column numbers while characters are being read
-
concat
-
concat
- Returns:
- Reads from the first element of the delegates, then, after EOI, from the second until EOI, and so forth
-
teeReader
-
readAll
- Throws:
IOException
-
copy
- Throws:
IOException
-