tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lar...@apache.org
Subject cvs commit: jakarta-tomcat/src/share/org/apache/tomcat/core OutputBuffer.java
Date Wed, 23 May 2001 03:19:47 GMT
larryi      01/05/22 20:19:46

  Modified:    src/share/org/apache/tomcat/core OutputBuffer.java
  Log:
  Add flushCharsNeeded() method to allow detecting if the CharBuffer needs
  flushing.  Also, set state to BYTE_STATE after flushing CharBuffer to
  avoid unnecessary additional flush.
  
  Revision  Changes    Path
  1.16      +6 -0      jakarta-tomcat/src/share/org/apache/tomcat/core/OutputBuffer.java
  
  Index: OutputBuffer.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/core/OutputBuffer.java,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- OutputBuffer.java	2001/05/22 19:30:49	1.15
  +++ OutputBuffer.java	2001/05/23 03:19:41	1.16
  @@ -292,8 +292,13 @@
       public void flushChars() throws IOException {
        	if( debug > 0 ) log("flushChars() " + cb.getPos());
   	cb.flushBuffer();
  +	state=BYTE_STATE;
       }
   
  +    public boolean flushCharsNeeded() {
  +	return state == CHAR_STATE;
  +    }
  +
       public void close() throws IOException {
         flush();
         closed =true;
  @@ -306,6 +311,7 @@
           if( state==CHAR_STATE ){
               cb.flushBuffer();
               bb.flushBuffer();
  +	    state=BYTE_STATE;
           }else if (state==BYTE_STATE)
               bb.flushBuffer();
           else if (state==INITIAL_STATE)
  
  
  

Mime
View raw message