cvs commit: jakarta-tomcat-connectors/jk/java/org/apache/jk/util C2B.java

2002-04-09 Thread costin

costin  02/04/09 13:39:38

  Removed: jk/java/org/apache/jk/util C2B.java
  Log:
  Remove the duplicated class.

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




cvs commit: jakarta-tomcat-connectors/jk/java/org/apache/jk/util C2B.java

2002-02-06 Thread costin

costin  02/02/06 09:49:42

  Modified:jk/java/org/apache/jk/util C2B.java
  Log:
  remove debug statements.
  
  Revision  ChangesPath
  1.2   +3 -3  jakarta-tomcat-connectors/jk/java/org/apache/jk/util/C2B.java
  
  Index: C2B.java
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/java/org/apache/jk/util/C2B.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- C2B.java  26 Jan 2002 07:16:46 -  1.1
  +++ C2B.java  6 Feb 2002 17:49:42 -   1.2
  @@ -146,17 +146,17 @@
   
   if( type==MessageBytes.T_STR ) {
   convert( mb.getString() );
  -System.out.println("XXX Converting " + mb.getString() );
  +// System.out.println("XXX Converting " + mb.getString() );
   } else if( type==MessageBytes.T_CHARS ) {
   CharChunk charC=mb.getCharChunk();
   convert( charC.getBuffer(),
   charC.getOffset(), charC.getLength());
  -System.out.println("XXX Converting " + mb.getCharChunk() );
  +//System.out.println("XXX Converting " + mb.getCharChunk() );
   } else {
   System.out.println("XXX unknowon type " + type );
   }
   flushBuffer();
  -System.out.println("C2B: XXX " + bb.getBuffer() + bb.getLength()); 
  +//System.out.println("C2B: XXX " + bb.getBuffer() + bb.getLength()); 
   setByteChunk(orig);
   }
   
  
  
  

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: cvs commit: jakarta-tomcat-connectors/jk/java/org/apache/jk/util C2B.java

2002-01-28 Thread Remy Maucherat

> On Sat, 26 Jan 2002, Remy Maucherat wrote:
>
> > I think it should go in j-t-c/util/buf too.
> >
> > BTW, try doing an ant clean; ant next time before committing ;-)
>
> Sorry about that, I'm fixing it right now.
>
> For the C2B - there is a problem since it uses the same class name as in
> 3.3, so it will not work.
>
> Maybe we should we create a org.apache.jtc.util package ? Or
> org.apache.commons.tomcat ?

Forget it then, there are already too many util libraries in Jakarta. There
is roughly equivalent code in j-t-c/util, so it should be ok to keep it
specific to jk.

Remy


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: cvs commit: jakarta-tomcat-connectors/jk/java/org/apache/jk/util C2B.java

2002-01-26 Thread Remy Maucherat

> costin  02/01/25 23:16:46
>
>   Added:   jk/java/org/apache/jk/util C2B.java
>   Removed: jk/java/org/apache/jk/common C2B.java
>   Log:
>   Moved C2B to an util package.
>
>   It should go with the main util in commons, having the same package name
as in
>   3.3 creates problems.

I think it should go in j-t-c/util/buf too.

BTW, try doing an ant clean; ant next time before committing ;-)

Remy


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




cvs commit: jakarta-tomcat-connectors/jk/java/org/apache/jk/util C2B.java

2002-01-25 Thread costin

costin  02/01/25 23:16:46

  Added:   jk/java/org/apache/jk/util C2B.java
  Removed: jk/java/org/apache/jk/common C2B.java
  Log:
  Moved C2B to an util package.
  
  It should go with the main util in commons, having the same package name as in
  3.3 creates problems.
  
  Revision  ChangesPath
  1.1  jakarta-tomcat-connectors/jk/java/org/apache/jk/util/C2B.java
  
  Index: C2B.java
  ===
  /*
   * 
   *
   * The Apache Software License, Version 1.1
   *
   * Copyright (c) 1999 The Apache Software Foundation.  All rights 
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *notice, this list of conditions and the following disclaimer. 
   *
   * 2. Redistributions in binary form must reproduce the above copyright
   *notice, this list of conditions and the following disclaimer in
   *the documentation and/or other materials provided with the
   *distribution.
   *
   * 3. The end-user documentation included with the redistribution, if
   *any, must include the following acknowlegement:  
   *   "This product includes software developed by the 
   *Apache Software Foundation (http://www.apache.org/)."
   *Alternately, this acknowlegement may appear in the software itself,
   *if and wherever such third-party acknowlegements normally appear.
   *
   * 4. The names "The Jakarta Project", "Tomcat", and "Apache Software
   *Foundation" must not be used to endorse or promote products derived
   *from this software without prior written permission. For written 
   *permission, please contact [EMAIL PROTECTED]
   *
   * 5. Products derived from this software may not be called "Apache"
   *nor may "Apache" appear in their names without prior written
   *permission of the Apache Group.
   *
   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
   * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
   * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
   * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   * 
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation.  For more
   * information on the Apache Software Foundation, please see
   * .
   *
   * [Additional notices, if required by prior licensing conditions]
   *
   */ 
  package org.apache.jk.util;
  
  import org.apache.tomcat.util.buf.*;
  
  import java.io.*;
  
  // This is extended C2BConvertor. I need to add methods ( to convert strings )
  // and it can't work with 3.3 ( since the old class will be loaded ).
  // We should change the package name or find a different solution.
  
  /** Efficient conversion of character to bytes.
   *  
   *  This uses the standard JDK mechansim - a writer - but provides mechanisms
   *  to recycle all the objects that are used. It is compatible with JDK1.1 and up,
   *  ( nio is better, but it's not available even in 1.2 or 1.3 )
   * 
   */
  public final class C2B {
  private C2BIntermediateOutputStream ios;
  private C2BWriteConvertor conv;
  private ByteChunk bb;
  private String enc;
  
  /** Create a converter, with bytes going to a byte buffer
   */
  public C2B(ByteChunk output, String encoding) throws IOException {
this.bb=output;
ios=new C2BIntermediateOutputStream( output );
conv=new C2BWriteConvertor( ios, encoding );
  this.enc=enc;
  }
  
  /** Create a converter
   */
  public C2B(String encoding) throws IOException {
this( new ByteChunk(1024), encoding );
  }
  
  public ByteChunk getByteChunk() {
return bb;
  }
  
  public String getEncoding() {
  return enc;
  }
  
  public void setByteChunk(ByteChunk bb) {
this.bb=bb;
ios.setByteChunk( bb );
  }
  
  /** Reset the internal state, empty the buffers.
   *  The encoding remain in effect, the internal buffers remain allocated.
   */
  pub