Danh mục tài liệu

Java Server Pages: A Code-Intensive Premium Reference- P18

Số trang: 10      Loại file: pdf      Dung lượng: 170.59 KB      Lượt xem: 21      Lượt tải: 0    
Xem trước 2 trang đầu tiên của tài liệu này:

Thông tin tài liệu:

Java Server Pages: A Code-Intensive Premium Reference- P18:Before you begin reading Pure JSP Java Server Pages, you might want to take a look at its basicstructure. This should help you outline your reading plan if you choose not to read the text from cover tocover. This introduction gives you an overview of what each chapter covers.
Nội dung trích xuất từ tài liệu:
Java Server Pages: A Code-Intensive Premium Reference- P18releasePageContext() Methodpublic void releasePageContext(PageContext pc)The releasePageContext() method is called to release a previously allocated PageContext objectreturned from a call to getPageContext(). This method should be invoked prior to returning from the_jspService() method of a JSP implementation class. releasePageContext()returns no value andthrows no exceptions.Parameters PageContextgetEngineInfo() Methodpublic JspEngineInfo getEngineInfo()The getEngineInfo() method is called to get implementation-specific information on the current JSPengine. It has no parameters and throws no exceptions.Returns JspEngineInfoJspWriter Classpublic abstract class JspWriter extends java.io.WriterJspWriter is an abstract class that emulates some of the functionality found in thejava.io.BufferedWriter and java.io.PrintWriter classes. However, JspWriter differs fromthese other classes in that it throws a java.io.IOException from the print methods wherePrintWriter does not. JspWriter class has four fields and numerous methods, as described in thefollowing sections.NO_BUFFER Fieldpublic static final int NO_BUFFERThis field is a constant indicating that the writer is not buffering output.DEFAULT_BUFFER Fieldpublic static final int DEFAULT_BUFFERThis field is a constant indicating that the writer is buffered and is using the implementation default buffersize.bufferSize Fieldprotected int bufferSizeThis field indicates the writers buffer size.autoFlush Fieldprotected boolean autoFlushThis field indicates whether the buffer will be automatically flushed.JspWriter() Methodprotected JspWriter(int bufferSize, boolean autoFlush)The JspWriter() method is a protected constructor. It returns no value and throws no exceptions.Parameters int boolean - 171 -newLine() Methodpublic void newLine() throws java.io.IOExceptionExceptions Thrown java.io.IOExceptionprint(boolean b) Methodpublic void print(boolean b) throws java.io.IOExceptionThis print(boolean b) method prints a Boolean value. The string produced byString.valueOf(boolean) is translated into bytes according to the platforms default characterencoding. Note The print() method prints data type values, which are translated into bytes. For all values, these bytes are written in exactly the same manner as the Writer.write(int) method. Note The print() methods parameter is determined by the print value. The method always throws a java.io.IOException exception. For all print values, the print() method returns no value.Parameters booleanprint(char c) Methodpublic void print(char c) throws java.io.IOExceptionThis print() method prints a character value. The character is translated into one or more bytesaccording to the platforms default character encoding.Parameters charprint(int i) Methodpublic void print(int i) throws java.io.IOExceptionThis print(int i) method prints an integer. The string produced by String.valueOf(int) istranslated into bytes according to the platforms default character encoding.Parameters intprint(long l) Methodpublic void print(long l) throws java.io.IOExceptionThis print(long l) method prints a long. The string produced by String.valueOf(long) istranslated into bytes according to the platforms default character encoding.Parameters longprint(float f) Methodpublic void print(float f) throws java.io.IOExceptionThis print(float f) method prints a float. The string produced by String.valueOf(float) istranslated into bytes according to the platforms default character encoding.Parameters floatprint(double d) Methodpublic void print(double d) throws java.io.IOExceptionThis print(double d) method prints a double. The string produced by String.valueOf(double) istranslated into bytes according to the platforms default character encoding.Parameters - 172 - doubleprint(char[ ] s) Methodpublic void print(char[] s) throws java.io.IOExceptionThis print(char[] s) method prints an array of characters. The characters are converted into bytesaccording to the platforms default character encoding.Parameters char[]print(java.lang.String s) Methodpublic void print(java.lang.String s) throws java.io.IOExceptionThe print(java.lang.String s) method prints a string. If the argument is null, then the string nullis printed. Otherwise, the strings characters are converted into bytes according to the platforms defaultcharacter encoding.Parameters java.lang.Stringprint(java.lang.Object obj) Methodpublic void print(java.lang.Object obj) throws java.io.IOExceptionThis print() method prints an object. The string produced by the String.valueOf(Object) methodis translated into bytes according to the platforms default character encoding.Parameters java.lang.Objectprintln() Methodpublic void println() throws java.io.IOExceptionThis println() method terminates the current line by writing the line separator string. The line separatorstring is defined by the system property line.separator, and is not necessarily a single newlinecharacter (\n). This method has no parameters. Note The println() method always throws a java.io.IOException exception. It returns no value.println(boolean b) Methodpublic void println(boolean b) throws java.io.IOExceptionThis println(boolean b) method prints a Boolean value and then terminates the line. This methodbehaves as though it invokes print(boolean) and then println().Parameters booleanprintln(char c) Methodpublic void println(char c) throws java.io.IOExceptionThis println(char c) method prints a character and then terminates ...