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
public final class IndentingWriter
- extends FilterWriter
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.
|
Method Summary |
void |
write(char[] cbuf,
int off,
int len)
|
void |
write(int c)
|
void |
write(String str,
int off,
int len)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
IndentingWriter
public IndentingWriter(Writer out,
int width,
String prefix)
- Constructs an instance.
- Parameters:
out - non-null; writer to send final output towidth - >= 0; the maximum output width (not including
prefix), or 0 for no maximumprefix - non-null; the prefix for each line
IndentingWriter
public IndentingWriter(Writer out,
int width)
- Constructs a no-prefix instance.
- Parameters:
out - non-null; writer to send final output towidth - >= 0; the maximum output width (not including
prefix), or 0 for no maximum
write
public void write(int c)
throws IOException
-
- Overrides:
write in class FilterWriter
- Throws:
IOException
write
public void write(char[] cbuf,
int off,
int len)
throws IOException
-
- Overrides:
write in class FilterWriter
- Throws:
IOException
write
public void write(String str,
int off,
int len)
throws IOException
-
- Overrides:
write in class FilterWriter
- Throws:
IOException
Copyright © 2015. All rights reserved.