You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by gg...@apache.org on 2003/08/14 09:40:17 UTC

cvs commit: jakarta-commons/codec/src/java/org/apache/commons/codec EncoderException.java BinaryDecoder.java StringEncoderComparator.java BinaryEncoder.java StringEncoder.java Encoder.java StringDecoder.java DecoderException.java Decoder.java

ggregory    2003/08/14 00:40:17

  Modified:    codec/src/java/org/apache/commons/codec
                        EncoderException.java BinaryDecoder.java
                        StringEncoderComparator.java BinaryEncoder.java
                        StringEncoder.java Encoder.java StringDecoder.java
                        DecoderException.java Decoder.java
  Log:
  Javadoc: normalize verb usage and general tidying.
  
  Revision  Changes    Path
  1.4       +4 -4      jakarta-commons/codec/src/java/org/apache/commons/codec/EncoderException.java
  
  Index: EncoderException.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/codec/src/java/org/apache/commons/codec/EncoderException.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- EncoderException.java	30 Jul 2003 22:34:17 -0000	1.3
  +++ EncoderException.java	14 Aug 2003 07:40:17 -0000	1.4
  @@ -54,16 +54,16 @@
   package org.apache.commons.codec;
   
   /**
  - * An EncoderException is thrown when there is a
  - * failure condition during the encoding process.
  + * Thrown when there is a failure condition during the encoding process.
    * 
    * @author Tim O'Brien
  + * @author Gary Gregory
    * @version $Id$
    */
   public class EncoderException extends Exception {
   
       /**
  -     * Create a new instance of this exception with
  +     * Creates a new instance of this exception with
        * an informative message.
        * 
        * @param pMessage a human intelligible message
  
  
  
  1.4       +4 -7      jakarta-commons/codec/src/java/org/apache/commons/codec/BinaryDecoder.java
  
  Index: BinaryDecoder.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/codec/src/java/org/apache/commons/codec/BinaryDecoder.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- BinaryDecoder.java	30 Jul 2003 22:34:17 -0000	1.3
  +++ BinaryDecoder.java	14 Aug 2003 07:40:17 -0000	1.4
  @@ -53,20 +53,17 @@
    */
   package org.apache.commons.codec;
   
  -
  -
   /**
  - * This interface defines common decoding methods for decoders
  - * which decode byte arrays.
  + * Defines common decoding methods for byte arrays decoders.
    *
    * @author Tim O'Brien
  + * @author Gary Gregory
    * @version $Id$
    */
   public interface BinaryDecoder extends Decoder {
   
       /**
  -     * Decode a byte array and return the results of the decode
  -     * as a byte array. 
  +     * Decodes a byte array and returns the results as a byte array. 
        *
        * @param pArray A byte array which has been encoded with the
        *      appropriate encoder
  
  
  
  1.4       +8 -5      jakarta-commons/codec/src/java/org/apache/commons/codec/StringEncoderComparator.java
  
  Index: StringEncoderComparator.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/codec/src/java/org/apache/commons/codec/StringEncoderComparator.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- StringEncoderComparator.java	30 Jul 2003 22:34:17 -0000	1.3
  +++ StringEncoderComparator.java	14 Aug 2003 07:40:17 -0000	1.4
  @@ -65,28 +65,31 @@
    * form of a name such as Soundex.
    *
    * @author Tim O'Brien
  + * @author Gary Gregory
    * @version $Id$
    */
   public class StringEncoderComparator implements Comparator {
   
  -    // Private encoder instance
  +    /**
  +     * Internal encoder instance.
  +     */
       private StringEncoder stringEncoder;
   
       /**
  -     * A no-arg, do-nothing constructor
  +     * Constructs a new instance.
        */
       public StringEncoderComparator() {
       }
   
       /**
  -     * Use the provided soundex algorithm.
  +     * Constructs a new instance with the given soundex algorithm.
        */
       public StringEncoderComparator(StringEncoder en) {
           this.stringEncoder = en;
       }
   
       /**
  -     * Compare 2 strings based not on the strings 
  +     * Compares 2 strings based not on the strings 
        * themselves, but on an encoding of the two 
        * strings using the StringEncoder this Comparator
        * was created with.
  
  
  
  1.4       +4 -4      jakarta-commons/codec/src/java/org/apache/commons/codec/BinaryEncoder.java
  
  Index: BinaryEncoder.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/codec/src/java/org/apache/commons/codec/BinaryEncoder.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- BinaryEncoder.java	30 Jul 2003 22:34:17 -0000	1.3
  +++ BinaryEncoder.java	14 Aug 2003 07:40:17 -0000	1.4
  @@ -54,16 +54,16 @@
   package org.apache.commons.codec;
   
   /**
  - * A binary encoder contains methods common to all
  - * encoders for binary data. 
  + * Defines common encoding methods for byte arrays encoders.
    * 
    * @author Tim O'Brien
  + * @author Gary Gregory
    * @version $Id$
    */
   public interface BinaryEncoder extends Encoder {
       
       /**
  -     * Encode a byte array and return the encoded data
  +     * Encodes a byte array and return the encoded data
        * as a byte array.
        * 
        * @param pArray Data to be encoded
  
  
  
  1.4       +4 -5      jakarta-commons/codec/src/java/org/apache/commons/codec/StringEncoder.java
  
  Index: StringEncoder.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/codec/src/java/org/apache/commons/codec/StringEncoder.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- StringEncoder.java	30 Jul 2003 22:34:17 -0000	1.3
  +++ StringEncoder.java	14 Aug 2003 07:40:17 -0000	1.4
  @@ -54,17 +54,16 @@
   package org.apache.commons.codec;
   
   /**
  - * A StringEncoder is an encoder which expects a String as
  - * a method parameter and one that produces a String as the
  - * output of the Encoding process.
  + * Encodes a String into a String. 
    *
    * @author Tim O'Brien
  + * @author Gary Gregory
    * @version $Id$
    */
   public interface StringEncoder extends Encoder {
       
       /**
  -     * Encode a String and produce a String.
  +     * Encodes a String and returns a String.
        * 
        * @param pString a String to encode
        * 
  
  
  
  1.4       +13 -9     jakarta-commons/codec/src/java/org/apache/commons/codec/Encoder.java
  
  Index: Encoder.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/codec/src/java/org/apache/commons/codec/Encoder.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- Encoder.java	30 Jul 2003 22:34:17 -0000	1.3
  +++ Encoder.java	14 Aug 2003 07:40:17 -0000	1.4
  @@ -54,21 +54,25 @@
   package org.apache.commons.codec;
   
   /**
  - * Encoder is the sister interface of Decoder, it provides
  - * the highest level of abstraction for Encoders.  All
  - * Encoders implement this common generic interface.
  + * <p>Provides the highest level of abstraction for Encoders.
  + * This is the sister interface of {@link Decoder}.  All
  + * Encoder implement this common generic interface.</p>
  + * 
  + * <p>Allows a user to pass a generic Object to any Encoder 
  + * implementation in the codec package.</p>
  + * 
  + * <p>One of the two interfaces at the center of the codec package.</p>
    *
    * @author Tim O'Brien
  + * @author Gary Gregory
    * @version $Id$
    */
   public interface Encoder {
       
       /**
  -     * All encoders allow a library-user to pass an 
  -     * Object and get an Object in return.  This function
  -     * encodes an "Object" - returning the encoded content 
  -     * as an Object.  The Objects here may just be byte[]
  -     * or Strings depending on the implementation used.
  +     * Encodes an "Object" and returns the encoded content 
  +     * as an Object.  The Objects here may just be <code>byte[]</code>
  +     * or <code>String</code>s depending on the implementation used.
        *   
        * @param pObject An object ot encode
        * 
  
  
  
  1.4       +4 -5      jakarta-commons/codec/src/java/org/apache/commons/codec/StringDecoder.java
  
  Index: StringDecoder.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/codec/src/java/org/apache/commons/codec/StringDecoder.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- StringDecoder.java	30 Jul 2003 22:34:17 -0000	1.3
  +++ StringDecoder.java	14 Aug 2003 07:40:17 -0000	1.4
  @@ -54,17 +54,16 @@
   package org.apache.commons.codec;
   
   /**
  - * A StringDecoder is a decoder which expects a String as
  - * a method parameter and one that produces a String as the
  - * output of the decoding process.
  + * Decodes a String into a String. 
    *
    * @author Tim O'Brien
  + * @author Gary Gregory
    * @version $Id$
    */
   public interface StringDecoder extends Decoder {
       
       /**
  -     * Decode a String and produce a String.
  +     * Decodes a String and returns a String.
        * 
        * @param pString a String to encode
        * 
  
  
  
  1.4       +4 -4      jakarta-commons/codec/src/java/org/apache/commons/codec/DecoderException.java
  
  Index: DecoderException.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/codec/src/java/org/apache/commons/codec/DecoderException.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- DecoderException.java	30 Jul 2003 22:34:17 -0000	1.3
  +++ DecoderException.java	14 Aug 2003 07:40:17 -0000	1.4
  @@ -54,16 +54,16 @@
   package org.apache.commons.codec;
   
   /**
  - * The DecoderException is thrown when a Decoder has
  - * encounter a failure condition during a decode. 
  + * Thrown when a Decoder has encountered a failure condition during a decode. 
    * 
    * @author Tim O'Brien
  + * @author Gary Gregory
    * @version $Id$
    */
   public class DecoderException extends Exception {
   
       /**
  -     * Create a DecoderException
  +     * Creates a DecoderException
        * 
        * @param pMessage A message with meaning to a human
        */
  
  
  
  1.4       +12 -7     jakarta-commons/codec/src/java/org/apache/commons/codec/Decoder.java
  
  Index: Decoder.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/codec/src/java/org/apache/commons/codec/Decoder.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- Decoder.java	30 Jul 2003 22:34:17 -0000	1.3
  +++ Decoder.java	14 Aug 2003 07:40:17 -0000	1.4
  @@ -54,22 +54,27 @@
   package org.apache.commons.codec;
   
   /**
  - * Forms one of the two interfaces at the center of the
  - * codec package.  All decoders implement this interface
  - * which allows a user to pass a generic Object to any
  - * Decoder implementation in the codec package.
  + * <p>Provides the highest level of abstraction for Decoders.
  + * This is the sister interface of {@link Encoder}.  All
  + * Decoders implement this common generic interface.</p>
  + * 
  + * <p>Allows a user to pass a generic Object to any Decoder 
  + * implementation in the codec package.</p>
  + * 
  + * <p>One of the two interfaces at the center of the codec package.</p>
    * 
    * @author Tim O'Brien
  + * @author Gary Gregory
    * @version $Id$
    */
   public interface Decoder {
   
       /**
  -     * Decode an "encoded" Object and return a "decoded"
  +     * Decodes an "encoded" Object and returns a "decoded"
        * Object.  Note that the implementation of this
        * interface will try to cast the Object parameter
        * to the specific type expected by a particular Decoder
  -     * implementation.  If a ClassCastException occurs
  +     * implementation.  If a {@link java.lang.ClassCastException} occurs
        * this decode method will throw a DecoderException.
        * 
        * @param pObject an object to "decode"
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org