public class IndentingWriter extends GenBuffer
| Modifier and Type | Field and Description |
|---|---|
protected boolean[] |
crDone |
protected int[] |
indentLevel |
protected String |
indentString |
bufferCount, curOut, INITIAL_BUFFER_CAPACITY, listOut, selectStack| Constructor and Description |
|---|
IndentingWriter(IndentingWriter source) |
IndentingWriter(int bufferCount) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
beforeWriteHook()
This method will get called before any write occurs.
|
void |
cr() |
String |
getIndent() |
void |
indent()
Adds indentLevel[curOut] number of indentString's to the current
buffer.
|
void |
indentLeft() |
void |
indentOneLevel()
Adds the indentString to the current buffer.
|
void |
indentRight() |
void |
insertAdditionalBuffers(int offset,
int count)
Insert some additional buffers.
|
void |
reset()
Reset the buffers so that you can use it again.
|
void |
setIndent(String indent) |
void |
write(String str)
write @param s to the current buffer
|
void |
writecr(String str) |
void |
writecr(String s1,
String s2) |
void |
writecr(String s1,
String s2,
String s3) |
void |
writecr(String s1,
String s2,
String s3,
String s4) |
void |
writeTo(GenBuffer o) |
anyContent, close, ensureCapacity, flush, getBuffer, getCurrentPosition, popSelect, pushSelect, select, setFirst, truncateAtPosition, write, write, write, write, write, write, write, write, write, write, write, write, write, write, writeNext, writeNext, writeNext, writeNext, writeTo, writeTo, writeToprotected boolean[] crDone
protected int[] indentLevel
protected String indentString
public IndentingWriter(int bufferCount)
public IndentingWriter(IndentingWriter source)
public void reset()
GenBufferpublic void insertAdditionalBuffers(int offset,
int count)
insertAdditionalBuffers in class GenBufferpublic void setIndent(String indent)
public String getIndent()
public void cr()
throws IOException
IOExceptionpublic void write(String str) throws IOException
GenBufferwrite in class GenBufferIOExceptionpublic void writecr(String str) throws IOException
IOExceptionpublic void writecr(String s1, String s2) throws IOException
IOExceptionpublic void writecr(String s1, String s2, String s3) throws IOException
IOExceptionpublic void writecr(String s1, String s2, String s3, String s4) throws IOException
IOExceptionpublic void indentRight()
public void indentLeft()
protected void beforeWriteHook()
GenBufferbeforeWriteHook in class GenBufferpublic void indentOneLevel()
public void indent()
Copyright © 2017–2019 Eclipse Foundation. All rights reserved.