[jboss-cvs] jboss-jms/src/main/org/jboss/jms/util ...

Timothy Fox tim.fox at jboss.com
Mon Jul 17 13:14:47 EDT 2006


  User: timfox  
  Date: 06/07/17 13:14:47

  Modified:    src/main/org/jboss/jms/util  SafeUTF.java
  Log:
  Many changes including implementation of prefetch, SEDAisation of server, changing of recovery
  
  Revision  Changes    Path
  1.2       +14 -8     jboss-jms/src/main/org/jboss/jms/util/SafeUTF.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: SafeUTF.java
  ===================================================================
  RCS file: /cvsroot/jboss/jboss-jms/src/main/org/jboss/jms/util/SafeUTF.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -b -r1.1 -r1.2
  --- SafeUTF.java	19 Jun 2006 15:16:07 -0000	1.1
  +++ SafeUTF.java	17 Jul 2006 17:14:47 -0000	1.2
  @@ -25,15 +25,18 @@
   import java.io.ObjectInput;
   import java.io.ObjectOutput;
   
  +import org.jboss.logging.Logger;
  +import org.jboss.messaging.core.message.MessageSupport;
  +
   /**
    * 
    * A SafeUTF
    * 
    * @author <a href="tim.fox at jboss.com">Tim Fox</a>
    * @author <a href="mailto:adrian at jboss.org">Adrian Brock</a>
  - * @version $Revision: 1.1 $
  + * @version $Revision: 1.2 $
    *
  - * $Id: SafeUTF.java,v 1.1 2006/06/19 15:16:07 timfox Exp $
  + * $Id: SafeUTF.java,v 1.2 2006/07/17 17:14:47 timfox Exp $
    * 
    * There is a "bug" in JDK1.4 / 1.5 DataOutputStream.writeUTF()
    * which means it does not work with Strings >= 64K serialized size.
  @@ -50,6 +53,9 @@
    */
   public class SafeUTF
   {      
  +   private static final Logger log = Logger.getLogger(SafeUTF.class);
  +
  +   
      //Default is 16K chunks
      private static final int CHUNK_SIZE = 16 * 1024;
      
  @@ -75,7 +81,6 @@
         
      public void safeWriteUTF(ObjectOutput out, String str) throws IOException
      {      
  -
         if (str == null)
         {
            out.writeByte(NULL);
  @@ -96,6 +101,7 @@
            }         
            
            out.writeByte(NOT_NULL);
  +         
            out.writeShort(numChunks);
            
            int i = 0;
  
  
  



More information about the jboss-cvs-commits mailing list