com.liferay.faces.util.jsp.internal
Class BodyContentStringImpl

java.lang.Object
  extended by java.io.Writer
      extended by javax.servlet.jsp.JspWriter
          extended by javax.servlet.jsp.tagext.BodyContent
              extended by com.liferay.faces.util.jsp.internal.BodyContentStringImpl
All Implemented Interfaces:
Closeable, Flushable, Appendable

public class BodyContentStringImpl
extends javax.servlet.jsp.tagext.BodyContent

This class serves as an implementation of BodyContent that utilizes a StringJspWriter instead of a JspWriter provided by the servlet container. This provides the ability to have JSP Tag classes write their BodyContent to an underlying String rather than to a JSP, which is helpful when invoking Tag classes directly for use with Facelets.

Author:
Neil Griffin

Field Summary
 
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
BodyContentStringImpl(javax.servlet.jsp.JspWriter stringJspWriter)
           
 
Method Summary
 void clear()
           
 void clearBuffer()
           
 void close()
           
 Reader getReader()
           
 int getRemaining()
           
 String getString()
           
 void newLine()
           
 void print(boolean b)
           
 void print(char c)
           
 void print(char[] s)
           
 void print(double d)
           
 void print(float f)
           
 void print(int i)
           
 void print(long l)
           
 void print(Object o)
           
 void print(String s)
           
 void println()
           
 void println(boolean b)
           
 void println(char c)
           
 void println(char[] s)
           
 void println(double d)
           
 void println(float f)
           
 void println(int i)
           
 void println(long l)
           
 void println(Object o)
           
 void println(String s)
           
 void write(char[] buf, int off, int len)
           
 void writeOut(Writer out)
           
 
Methods inherited from class javax.servlet.jsp.tagext.BodyContent
clearBody, flush, getEnclosingWriter
 
Methods inherited from class javax.servlet.jsp.JspWriter
getBufferSize, isAutoFlush
 
Methods inherited from class java.io.Writer
append, append, append, write, write, write, write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BodyContentStringImpl

public BodyContentStringImpl(javax.servlet.jsp.JspWriter stringJspWriter)
Method Detail

clear

public void clear()
           throws IOException
Specified by:
clear in class javax.servlet.jsp.JspWriter
Throws:
IOException

clearBuffer

public void clearBuffer()
                 throws IOException
Specified by:
clearBuffer in class javax.servlet.jsp.JspWriter
Throws:
IOException

close

public void close()
           throws IOException
Specified by:
close in interface Closeable
Specified by:
close in class javax.servlet.jsp.JspWriter
Throws:
IOException

newLine

public void newLine()
             throws IOException
Specified by:
newLine in class javax.servlet.jsp.JspWriter
Throws:
IOException

print

public void print(boolean b)
           throws IOException
Specified by:
print in class javax.servlet.jsp.JspWriter
Throws:
IOException

print

public void print(char c)
           throws IOException
Specified by:
print in class javax.servlet.jsp.JspWriter
Throws:
IOException

print

public void print(int i)
           throws IOException
Specified by:
print in class javax.servlet.jsp.JspWriter
Throws:
IOException

print

public void print(long l)
           throws IOException
Specified by:
print in class javax.servlet.jsp.JspWriter
Throws:
IOException

print

public void print(float f)
           throws IOException
Specified by:
print in class javax.servlet.jsp.JspWriter
Throws:
IOException

print

public void print(double d)
           throws IOException
Specified by:
print in class javax.servlet.jsp.JspWriter
Throws:
IOException

print

public void print(char[] s)
           throws IOException
Specified by:
print in class javax.servlet.jsp.JspWriter
Throws:
IOException

print

public void print(String s)
           throws IOException
Specified by:
print in class javax.servlet.jsp.JspWriter
Throws:
IOException

print

public void print(Object o)
           throws IOException
Specified by:
print in class javax.servlet.jsp.JspWriter
Throws:
IOException

println

public void println()
             throws IOException
Specified by:
println in class javax.servlet.jsp.JspWriter
Throws:
IOException

println

public void println(boolean b)
             throws IOException
Specified by:
println in class javax.servlet.jsp.JspWriter
Throws:
IOException

println

public void println(char c)
             throws IOException
Specified by:
println in class javax.servlet.jsp.JspWriter
Throws:
IOException

println

public void println(int i)
             throws IOException
Specified by:
println in class javax.servlet.jsp.JspWriter
Throws:
IOException

println

public void println(long l)
             throws IOException
Specified by:
println in class javax.servlet.jsp.JspWriter
Throws:
IOException

println

public void println(float f)
             throws IOException
Specified by:
println in class javax.servlet.jsp.JspWriter
Throws:
IOException

println

public void println(double d)
             throws IOException
Specified by:
println in class javax.servlet.jsp.JspWriter
Throws:
IOException

println

public void println(char[] s)
             throws IOException
Specified by:
println in class javax.servlet.jsp.JspWriter
Throws:
IOException

println

public void println(String s)
             throws IOException
Specified by:
println in class javax.servlet.jsp.JspWriter
Throws:
IOException

println

public void println(Object o)
             throws IOException
Specified by:
println in class javax.servlet.jsp.JspWriter
Throws:
IOException

write

public void write(char[] buf,
                  int off,
                  int len)
           throws IOException
Specified by:
write in class Writer
Throws:
IOException

writeOut

public void writeOut(Writer out)
              throws IOException
Specified by:
writeOut in class javax.servlet.jsp.tagext.BodyContent
Throws:
IOException

getReader

public Reader getReader()
Specified by:
getReader in class javax.servlet.jsp.tagext.BodyContent

getRemaining

public int getRemaining()
Specified by:
getRemaining in class javax.servlet.jsp.JspWriter

getString

public String getString()
Specified by:
getString in class javax.servlet.jsp.tagext.BodyContent


Copyright © 2015 Liferay, Inc.. All rights reserved.