Java-jsp the Out object of the built-in object to calculate the buffer usage size

Source: Internet
Author: User

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.