| java.lang.Object java.io.Writer org.netbeans.modules.schema2beansdev.gen.GenBuffer
All known Subclasses: org.netbeans.modules.schema2beansdev.gen.IndentingWriter,
Constructor Summary | |
public | GenBuffer(int bufferCount) | public | GenBuffer(GenBuffer source) a fresh GenBuffer with the configuration duplicated(number of buffers, etc). |
Method Summary | |
public boolean | anyContent() | protected void | beforeWriteHook() This method will get called before any write occurs. | public void | close() This method has no effect. | public void | ensureCapacity(int minimumCapacity) Ensures the capacity of every buffer is at least @param minimumCapacity. | public void | flush() This does nothing as we're all in memory. | public StringBuffer | getBuffer() | public int | getCurrentPosition() | public void | insertAdditionalBuffers(int offset, int count) Insert some additional buffers. | public void | popSelect() | public void | pushSelect(int bufferNum) | public void | reset() Reset the buffers so that you can use it again. | public void | select(int bufferNum) Select the current buffer to use as output. | public void | setFirst(String separator) setFirst and writeNext work in together to allow easier generation
or lists where the items in the list are separated by some text
between each of them. | public void | truncateAtPosition(int pos) | public void | write(boolean b) Append the parameter to the current buffer. | public void | write(char c) Append the parameter to the current buffer. | public void | write(char[] str) Append the parameter to the current buffer. | public void | write(char[] cbuf, int off, int len) | public void | write(double d) Append the parameter to the current buffer. | public void | write(float f) Append the parameter to the current buffer. | public void | write(int i) Append the parameter to the current buffer *as a character*. | public void | write(long l) Append the parameter to the current buffer *as a character*. | public void | write(Object obj) Append the parameter to the current buffer. | public void | write(String s) | public void | write(StringBuffer s) | public void | write(String s1, String s2) write @param s1 and @param s2 to the current buffer just as if
2 separate writes were done. | public void | write(String s1, String s2, String s3) write @param s1, @param s2, and @param s3 to the current buffer
just as if 3 separate writes were done. | public void | write(String s1, String s2, String s3, String s4) write @param s1, @param s2, @param s3, and @param s4 to the current buffer
just as if 3 separate writes were done. | public void | write(String str, int bufferNum) | public void | writeNext(String msg) Write the next text in the sequence. | public void | writeNext(String msg1, String msg2) Write the next text in the sequence. | public void | writeNext(String msg1, String msg2, String msg3) Write the next text in the sequence. | public void | writeNext() Begin the next in the sequence. | public void | writeTo(Writer out) | public void | writeTo(OutputStream out) | public void | writeTo(StringBuffer out) | public void | writeTo(GenBuffer out) |
INITIAL_BUFFER_CAPACITY | protected int INITIAL_BUFFER_CAPACITY(Code) | | |
bufferCount | protected int bufferCount(Code) | | |
curOut | protected int curOut(Code) | | |
GenBuffer | public GenBuffer(int bufferCount)(Code) | | Parameters: bufferCount - is the number of buffers to create. |
GenBuffer | public GenBuffer(GenBuffer source)(Code) | | a fresh GenBuffer with the configuration duplicated(number of buffers, etc). The buffers are NOTduplicated. |
anyContent | public boolean anyContent()(Code) | | Has anything actually been written here?
|
beforeWriteHook | protected void beforeWriteHook()(Code) | | This method will get called before any write occurs.
|
close | public void close()(Code) | | This method has no effect.
|
ensureCapacity | public void ensureCapacity(int minimumCapacity)(Code) | | Ensures the capacity of every buffer is at least @param minimumCapacity.
|
flush | public void flush()(Code) | | This does nothing as we're all in memory.
|
getCurrentPosition | public int getCurrentPosition()(Code) | | |
insertAdditionalBuffers | public void insertAdditionalBuffers(int offset, int count)(Code) | | Insert some additional buffers.
Previous buffers are not adjusted automatically.
select() should be called afterwards to reestablish current buffer.
|
popSelect | public void popSelect()(Code) | | |
pushSelect | public void pushSelect(int bufferNum)(Code) | | |
reset | public void reset()(Code) | | Reset the buffers so that you can use it again.
|
select | public void select(int bufferNum)(Code) | | Select the current buffer to use as output.
Valid range is 0 <= @param bufferNum < bufferCount
|
setFirst | public void setFirst(String separator)(Code) | | setFirst and writeNext work in together to allow easier generation
or lists where the items in the list are separated by some text
between each of them.
For instance,
setFirst(", ");
if (doBlue) writeNext("blue");
if (doGreen) writeNext("green");
if (doRed) writeNext("red");
|
truncateAtPosition | public void truncateAtPosition(int pos)(Code) | | |
write | public void write(boolean b) throws IOException(Code) | | Append the parameter to the current buffer.
|
write | public void write(char c) throws IOException(Code) | | Append the parameter to the current buffer.
|
write | public void write(char[] str) throws IOException(Code) | | Append the parameter to the current buffer.
|
write | public void write(double d) throws IOException(Code) | | Append the parameter to the current buffer.
|
write | public void write(float f) throws IOException(Code) | | Append the parameter to the current buffer.
|
write | public void write(int i) throws IOException(Code) | | Append the parameter to the current buffer *as a character*.
|
write | public void write(long l) throws IOException(Code) | | Append the parameter to the current buffer *as a character*.
|
write | public void write(String s1, String s2) throws IOException(Code) | | write @param s1 and @param s2 to the current buffer just as if
2 separate writes were done.
|
write | public void write(String s1, String s2, String s3) throws IOException(Code) | | write @param s1, @param s2, and @param s3 to the current buffer
just as if 3 separate writes were done.
|
write | public void write(String s1, String s2, String s3, String s4) throws IOException(Code) | | write @param s1, @param s2, @param s3, and @param s4 to the current buffer
just as if 3 separate writes were done.
|
writeNext | public void writeNext() throws IOException(Code) | | Begin the next in the sequence.
Equivalent to writeNext(""), where we'll write out the separator.
|
|
|