|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.io.Writer
org.millscript.millscript.functions.ShortStringWriter
public class ShortStringWriter
This class implements a short string writer, which writes up to a specified number of characters into a StringBuffer for later retrieval.
| Field Summary |
|---|
| Fields inherited from class java.io.Writer |
|---|
lock |
| Constructor Summary | |
|---|---|
ShortStringWriter(int l)
Constructs a new ShortStringWriter which can write up to
the specified number of characters. |
|
| Method Summary | |
|---|---|
void |
close()
|
void |
flush()
|
boolean |
fullUp()
Indicates when the maximum number of characters have been written. |
java.lang.StringBuffer |
getBuffer()
Returns the underlying StringBuffer for this writer. |
int |
roomLeft()
Returns the remaining number of characters that can be written to this writer. |
java.lang.String |
toString()
Returns the buffer's current contents. |
void |
write(char[] cbuf,
int off,
int len)
|
void |
write(int c)
|
void |
write(java.lang.String str)
|
| Methods inherited from class java.io.Writer |
|---|
append, append, append, write, write |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public ShortStringWriter(int l)
ShortStringWriter which can write up to
the specified number of characters.
l - the maximum number of characters this writer can write| Method Detail |
|---|
public boolean fullUp()
true when the maximum number of characters have
been written, false otherwisepublic int roomLeft()
public java.lang.StringBuffer getBuffer()
public java.lang.String toString()
toString in class java.lang.Objectpublic void close()
close in interface java.io.Closeableclose in class java.io.WriterWriter.close()
public void flush()
throws java.io.IOException
flush in interface java.io.Flushableflush in class java.io.Writerjava.io.IOExceptionWriter.flush()
public void write(int c)
throws java.io.IOException
write in class java.io.Writerjava.io.IOExceptionWriter.write(int)
public void write(java.lang.String str)
throws java.io.IOException
write in class java.io.Writerjava.io.IOExceptionWriter.write(java.lang.String)
public void write(char[] cbuf,
int off,
int len)
throws java.io.IOException
write in class java.io.Writerjava.io.IOExceptionWriter.write(char[], int, int)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||