Package com.android.dx.util
Class IndentingWriter
java.lang.Object
java.io.Writer
java.io.FilterWriter
com.android.dx.util.IndentingWriter
- All Implemented Interfaces:
Closeable
,Flushable
,Appendable
,AutoCloseable
Writer that wraps another writer and passes width-limited and
optionally-prefixed output to its subordinate. When lines are
wrapped they are automatically indented based on the start of the
line.
-
Field Summary
Fields inherited from class java.io.FilterWriter
out
-
Constructor Summary
ConstructorDescriptionIndentingWriter
(Writer out, int width) Constructs a no-prefix instance.IndentingWriter
(Writer out, int width, String prefix) Constructs an instance. -
Method Summary
Methods inherited from class java.io.FilterWriter
close, flush
-
Constructor Details
-
IndentingWriter
Constructs an instance.- Parameters:
out
-non-null;
writer to send final output towidth
->= 0;
the maximum output width (not includingprefix
), or0
for no maximumprefix
-non-null;
the prefix for each line
-
IndentingWriter
Constructs a no-prefix instance.- Parameters:
out
-non-null;
writer to send final output towidth
->= 0;
the maximum output width (not includingprefix
), or0
for no maximum
-
-
Method Details
-
write
- Overrides:
write
in classFilterWriter
- Throws:
IOException
-
write
- Overrides:
write
in classFilterWriter
- Throws:
IOException
-
write
- Overrides:
write
in classFilterWriter
- Throws:
IOException
-