|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.io.Writer javax.servlet.jsp.JspWriter org.japano.Buffer
public class Buffer
Collects String object references and finally flushes them to a Writer.
Field Summary | |
---|---|
static int |
DEFAULT_CAPACITY
default capacity counted in String objects |
Fields inherited from class javax.servlet.jsp.JspWriter |
---|
autoFlush, bufferSize, DEFAULT_BUFFER, NO_BUFFER, UNBOUNDED_BUFFER |
Fields inherited from class java.io.Writer |
---|
lock |
Constructor Summary | |
---|---|
Buffer()
Creates a new instance of Buffer with default capacity, |
|
Buffer(int capacity)
Creates a new instance of Buffer with given capacity. |
Method Summary | |
---|---|
void |
clear()
Clears the Buffer. |
void |
clearBuffer()
|
void |
close()
|
void |
ensureCapacity(int capacity)
Ensures that the Buffer has enough capacity for the given amount of String objects. |
void |
flush()
Flushes all collected Strings |
int |
getCapacity()
Gets the current capacity in String objects (NOT character) |
int |
getRemaining()
|
void |
insert(Buffer b,
int offset)
|
void |
insertInHead(Buffer b)
Inserts the given buffer content into the page's head section |
int |
length()
Returns the length of the buffer content (not the fragment count). |
void |
newLine()
|
void |
print(boolean param)
|
void |
print(char param)
|
void |
print(char[] values)
|
void |
print(double param)
|
void |
print(float param)
|
void |
print(int param)
|
void |
print(long param)
|
void |
print(java.lang.Object obj)
|
void |
print(java.lang.String str)
|
void |
println()
|
void |
println(boolean param)
|
void |
println(char param)
|
void |
println(char[] values)
|
void |
println(double param)
|
void |
println(float param)
|
void |
println(int param)
|
void |
println(long param)
|
void |
println(java.lang.Object obj)
|
void |
println(java.lang.String str)
|
void |
printNode(java.lang.Object o)
|
void |
setHeadMarker()
|
void |
setSize(int size)
Cuts the length of the buffer to the given fragment count. |
void |
setWriter(java.io.Writer writer)
Sets the writer this buffer flushes to. |
int |
size()
|
java.lang.String |
substring(int start,
int end)
Returns a substring of the buffer starting with the given fragment position and ending at the given fragment position. |
java.lang.String |
toString()
|
void |
write(char[] cbuf)
|
void |
write(char[] cbuf,
int off,
int len)
|
void |
write(int c)
|
void |
write(java.lang.String str)
|
void |
write(java.lang.String str,
int off,
int len)
|
Methods inherited from class javax.servlet.jsp.JspWriter |
---|
getBufferSize, isAutoFlush |
Methods inherited from class java.io.Writer |
---|
append, append, append |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final int DEFAULT_CAPACITY
Constructor Detail |
---|
public Buffer()
public Buffer(int capacity)
capacity
- capacity counted in string fragments ( not characters!). if this is 0 the allocation
of the string array will be defered until the first access to buffer (with print or ensureCapacity(int))Method Detail |
---|
public void setWriter(java.io.Writer writer)
writer
- Writerpublic void ensureCapacity(int capacity)
capacity
- Capacity in String objects (NOT character)public int getCapacity()
public void clear()
clear
in class javax.servlet.jsp.JspWriter
public void flush() throws java.io.IOException
flush
in interface java.io.Flushable
flush
in class javax.servlet.jsp.JspWriter
java.io.IOException
public int getRemaining()
getRemaining
in class javax.servlet.jsp.JspWriter
public void print(java.lang.String str)
print
in class javax.servlet.jsp.JspWriter
public java.lang.String substring(int start, int end)
start
- position of the first fragmentend
- position of the last fragment plus one.public int length()
public void newLine()
newLine
in class javax.servlet.jsp.JspWriter
public void print(char[] values)
print
in class javax.servlet.jsp.JspWriter
public void print(int param)
print
in class javax.servlet.jsp.JspWriter
public void print(boolean param)
print
in class javax.servlet.jsp.JspWriter
public void print(char param)
print
in class javax.servlet.jsp.JspWriter
public void print(float param)
print
in class javax.servlet.jsp.JspWriter
public void print(java.lang.Object obj)
print
in class javax.servlet.jsp.JspWriter
public void print(long param)
print
in class javax.servlet.jsp.JspWriter
public void print(double param)
print
in class javax.servlet.jsp.JspWriter
public void println()
println
in class javax.servlet.jsp.JspWriter
public void println(float param)
println
in class javax.servlet.jsp.JspWriter
public void println(java.lang.Object obj)
println
in class javax.servlet.jsp.JspWriter
public void println(int param)
println
in class javax.servlet.jsp.JspWriter
public void println(char param)
println
in class javax.servlet.jsp.JspWriter
public void println(boolean param)
println
in class javax.servlet.jsp.JspWriter
public void println(long param)
println
in class javax.servlet.jsp.JspWriter
public void println(double param)
println
in class javax.servlet.jsp.JspWriter
public void println(java.lang.String str)
println
in class javax.servlet.jsp.JspWriter
public void println(char[] values)
println
in class javax.servlet.jsp.JspWriter
public void write(char[] cbuf)
write
in class java.io.Writer
public void write(char[] cbuf, int off, int len)
write
in class java.io.Writer
public void write(int c)
write
in class java.io.Writer
public void write(java.lang.String str)
write
in class java.io.Writer
public void write(java.lang.String str, int off, int len)
write
in class java.io.Writer
public void clearBuffer()
clearBuffer
in class javax.servlet.jsp.JspWriter
public void close() throws java.io.IOException
close
in interface java.io.Closeable
close
in class javax.servlet.jsp.JspWriter
java.io.IOException
public int size()
public java.lang.String toString()
toString
in class java.lang.Object
public void setHeadMarker()
public void insertInHead(Buffer b)
public void insert(Buffer b, int offset)
public void setSize(int size)
public void printNode(java.lang.Object o)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |