costin      01/01/06 16:10:33

  Modified:    src/share/org/apache/tomcat/core OutputBuffer.java
  Log:
  Small change in OutputBuffer - the number of chars written was not exposed.
  We also need to know if the buffer is new ( needed to fix bug in ErrorHandler).
  
  Revision  Changes    Path
  1.11      +11 -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.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- OutputBuffer.java 2000/12/29 20:31:28     1.10
  +++ OutputBuffer.java 2001/01/07 00:10:33     1.11
  @@ -424,6 +424,17 @@
        return bytesWritten;
       }
   
  +    public int getCharsWritten() {
  +     return charsWritten;
  +    }
  +
  +    /** True if this buffer hasn't been used ( since recycle() ) -
  +     i.e. no chars or bytes have been added to the buffer.  
  +    */
  +    public boolean isNew() {
  +     return bytesWritten==0 && charsWritten==0;
  +    }
  +    
       public void setBufferSize(int size) {
        if( size > buf.length ) {
            buf=new byte[size];
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

Reply via email to