File tree Expand file tree Collapse file tree
src/java/org/apache/commons/codec Expand file tree Collapse file tree Original file line number Diff line number Diff line change 5353 */
5454package org .apache .commons .codec ;
5555
56-
57-
5856/**
59- * This interface defines common decoding methods for decoders
60- * which decode byte arrays.
57+ * Defines common decoding methods for byte arrays decoders.
6158 *
6259 * @author Tim O'Brien
63- * @version $Id: BinaryDecoder.java,v 1.3 2003/07/30 22:34:17 tobrien Exp $
60+ * @author Gary Gregory
61+ * @version $Id: BinaryDecoder.java,v 1.4 2003/08/14 07:40:17 ggregory Exp $
6462 */
6563public interface BinaryDecoder extends Decoder {
6664
6765 /**
68- * Decode a byte array and return the results of the decode
69- * as a byte array.
66+ * Decodes a byte array and returns the results as a byte array.
7067 *
7168 * @param pArray A byte array which has been encoded with the
7269 * appropriate encoder
Original file line number Diff line number Diff line change 5454package org .apache .commons .codec ;
5555
5656/**
57- * A binary encoder contains methods common to all
58- * encoders for binary data.
57+ * Defines common encoding methods for byte arrays encoders.
5958 *
6059 * @author Tim O'Brien
61- * @version $Id: BinaryEncoder.java,v 1.3 2003/07/30 22:34:17 tobrien Exp $
60+ * @author Gary Gregory
61+ * @version $Id: BinaryEncoder.java,v 1.4 2003/08/14 07:40:17 ggregory Exp $
6262 */
6363public interface BinaryEncoder extends Encoder {
6464
6565 /**
66- * Encode a byte array and return the encoded data
66+ * Encodes a byte array and return the encoded data
6767 * as a byte array.
6868 *
6969 * @param pArray Data to be encoded
Original file line number Diff line number Diff line change 5454package org .apache .commons .codec ;
5555
5656/**
57- * Forms one of the two interfaces at the center of the
58- * codec package. All decoders implement this interface
59- * which allows a user to pass a generic Object to any
60- * Decoder implementation in the codec package.
57+ * <p>Provides the highest level of abstraction for Decoders.
58+ * This is the sister interface of {@link Encoder}. All
59+ * Decoders implement this common generic interface.</p>
60+ *
61+ * <p>Allows a user to pass a generic Object to any Decoder
62+ * implementation in the codec package.</p>
63+ *
64+ * <p>One of the two interfaces at the center of the codec package.</p>
6165 *
6266 * @author Tim O'Brien
63- * @version $Id: Decoder.java,v 1.3 2003/07/30 22:34:17 tobrien Exp $
67+ * @author Gary Gregory
68+ * @version $Id: Decoder.java,v 1.4 2003/08/14 07:40:17 ggregory Exp $
6469 */
6570public interface Decoder {
6671
6772 /**
68- * Decode an "encoded" Object and return a "decoded"
73+ * Decodes an "encoded" Object and returns a "decoded"
6974 * Object. Note that the implementation of this
7075 * interface will try to cast the Object parameter
7176 * to the specific type expected by a particular Decoder
72- * implementation. If a ClassCastException occurs
77+ * implementation. If a {@link java.lang. ClassCastException} occurs
7378 * this decode method will throw a DecoderException.
7479 *
7580 * @param pObject an object to "decode"
Original file line number Diff line number Diff line change 5454package org .apache .commons .codec ;
5555
5656/**
57- * The DecoderException is thrown when a Decoder has
58- * encounter a failure condition during a decode.
57+ * Thrown when a Decoder has encountered a failure condition during a decode.
5958 *
6059 * @author Tim O'Brien
61- * @version $Id: DecoderException.java,v 1.3 2003/07/30 22:34:17 tobrien Exp $
60+ * @author Gary Gregory
61+ * @version $Id: DecoderException.java,v 1.4 2003/08/14 07:40:17 ggregory Exp $
6262 */
6363public class DecoderException extends Exception {
6464
6565 /**
66- * Create a DecoderException
66+ * Creates a DecoderException
6767 *
6868 * @param pMessage A message with meaning to a human
6969 */
Original file line number Diff line number Diff line change 5454package org .apache .commons .codec ;
5555
5656/**
57- * Encoder is the sister interface of Decoder, it provides
58- * the highest level of abstraction for Encoders. All
59- * Encoders implement this common generic interface.
57+ * <p>Provides the highest level of abstraction for Encoders.
58+ * This is the sister interface of {@link Decoder}. All
59+ * Encoder implement this common generic interface.</p>
60+ *
61+ * <p>Allows a user to pass a generic Object to any Encoder
62+ * implementation in the codec package.</p>
63+ *
64+ * <p>One of the two interfaces at the center of the codec package.</p>
6065 *
6166 * @author Tim O'Brien
62- * @version $Id: Encoder.java,v 1.3 2003/07/30 22:34:17 tobrien Exp $
67+ * @author Gary Gregory
68+ * @version $Id: Encoder.java,v 1.4 2003/08/14 07:40:17 ggregory Exp $
6369 */
6470public interface Encoder {
6571
6672 /**
67- * All encoders allow a library-user to pass an
68- * Object and get an Object in return. This function
69- * encodes an "Object" - returning the encoded content
70- * as an Object. The Objects here may just be byte[]
71- * or Strings depending on the implementation used.
73+ * Encodes an "Object" and returns the encoded content
74+ * as an Object. The Objects here may just be <code>byte[]</code>
75+ * or <code>String</code>s depending on the implementation used.
7276 *
7377 * @param pObject An object ot encode
7478 *
Original file line number Diff line number Diff line change 5454package org .apache .commons .codec ;
5555
5656/**
57- * An EncoderException is thrown when there is a
58- * failure condition during the encoding process.
57+ * Thrown when there is a failure condition during the encoding process.
5958 *
6059 * @author Tim O'Brien
61- * @version $Id: EncoderException.java,v 1.3 2003/07/30 22:34:17 tobrien Exp $
60+ * @author Gary Gregory
61+ * @version $Id: EncoderException.java,v 1.4 2003/08/14 07:40:17 ggregory Exp $
6262 */
6363public class EncoderException extends Exception {
6464
6565 /**
66- * Create a new instance of this exception with
66+ * Creates a new instance of this exception with
6767 * an informative message.
6868 *
6969 * @param pMessage a human intelligible message
Original file line number Diff line number Diff line change 5454package org .apache .commons .codec ;
5555
5656/**
57- * A StringDecoder is a decoder which expects a String as
58- * a method parameter and one that produces a String as the
59- * output of the decoding process.
57+ * Decodes a String into a String.
6058 *
6159 * @author Tim O'Brien
62- * @version $Id: StringDecoder.java,v 1.3 2003/07/30 22:34:17 tobrien Exp $
60+ * @author Gary Gregory
61+ * @version $Id: StringDecoder.java,v 1.4 2003/08/14 07:40:17 ggregory Exp $
6362 */
6463public interface StringDecoder extends Decoder {
6564
6665 /**
67- * Decode a String and produce a String.
66+ * Decodes a String and returns a String.
6867 *
6968 * @param pString a String to encode
7069 *
Original file line number Diff line number Diff line change 5454package org .apache .commons .codec ;
5555
5656/**
57- * A StringEncoder is an encoder which expects a String as
58- * a method parameter and one that produces a String as the
59- * output of the Encoding process.
57+ * Encodes a String into a String.
6058 *
6159 * @author Tim O'Brien
62- * @version $Id: StringEncoder.java,v 1.3 2003/07/30 22:34:17 tobrien Exp $
60+ * @author Gary Gregory
61+ * @version $Id: StringEncoder.java,v 1.4 2003/08/14 07:40:17 ggregory Exp $
6362 */
6463public interface StringEncoder extends Encoder {
6564
6665 /**
67- * Encode a String and produce a String.
66+ * Encodes a String and returns a String.
6867 *
6968 * @param pString a String to encode
7069 *
Original file line number Diff line number Diff line change 6565 * form of a name such as Soundex.
6666 *
6767 * @author Tim O'Brien
68- * @version $Id: StringEncoderComparator.java,v 1.3 2003/07/30 22:34:17 tobrien Exp $
68+ * @author Gary Gregory
69+ * @version $Id: StringEncoderComparator.java,v 1.4 2003/08/14 07:40:17 ggregory Exp $
6970 */
7071public class StringEncoderComparator implements Comparator {
7172
72- // Private encoder instance
73+ /**
74+ * Internal encoder instance.
75+ */
7376 private StringEncoder stringEncoder ;
7477
7578 /**
76- * A no-arg, do-nothing constructor
79+ * Constructs a new instance.
7780 */
7881 public StringEncoderComparator () {
7982 }
8083
8184 /**
82- * Use the provided soundex algorithm.
85+ * Constructs a new instance with the given soundex algorithm.
8386 */
8487 public StringEncoderComparator (StringEncoder en ) {
8588 this .stringEncoder = en ;
8689 }
8790
8891 /**
89- * Compare 2 strings based not on the strings
92+ * Compares 2 strings based not on the strings
9093 * themselves, but on an encoding of the two
9194 * strings using the StringEncoder this Comparator
9295 * was created with.
Original file line number Diff line number Diff line change 11< html >
22 < body >
3- Utilities for Base64 and Hexadecimal String encoding and decoding.
3+ Base64 and Hexadecimal String encoding and decoding.
44 </ body >
55</ html >
You can’t perform that action at this time.
0 commit comments