Related information:
"21-Day Learning Java Web Development"
Out Object
The Out object evaluates the buffer usage size
1. The size of the buffer can be obtained through the GetBufferSize () method of the Out object.
2. The buffer remaining size can be obtained through the getremaining () method.
3. The buffer usage size can be easily obtained by using these two values.
outdemo2.jsp
1 <%@ Page Language="Java"ContentType="text/html;charset=gb2312" %>2 <HTML>3 <Head>4 <title>Use out object to use buffer size</title>5 </Head>6 <Body>7 <%8 int All=out.getbuffersize ();//Get buffer size9 intremain=out.getremaining ();//get the remaining buffer sizeTen int Use= All-remain;//use buffer size by subtracting One Out.println ("Use buffer size:"+Use );//output using buffer size A %> - </Body> - </HTML>
View Code
Java-jsp the Out object of the built-in object to calculate the buffer usage size