Skip to content

Commit 279577d

Browse files
committed
Javadoc.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/codec/trunk@1080701 13f79535-47bb-0310-9956-ffa450edef68
1 parent 24c5321 commit 279577d

11 files changed

Lines changed: 32 additions & 31 deletions

src/java/org/apache/commons/codec/DecoderException.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@
1818
package org.apache.commons.codec;
1919

2020
/**
21-
* Thrown when a Decoder has encountered a failure condition during a decode.
21+
* Thrown when there is a failure condition during the decoding process. This exception is thrown when a {@link Decoder}
22+
* encounters a decoding specific exception such as invalid data, or characters outside of the expected range.
2223
*
2324
* @author Apache Software Foundation
2425
* @version $Id$

src/java/org/apache/commons/codec/EncoderException.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@
1818
package org.apache.commons.codec;
1919

2020
/**
21-
* Thrown when there is a failure condition during the encoding process. This exception is thrown when an Encoder
22-
* encounters a encoding specific exception such as invalid data, inability to calculate a checksum, characters outside
23-
* of the expected range.
21+
* Thrown when there is a failure condition during the encoding process. This exception is thrown when an
22+
* {@link Encoder} encounters a encoding specific exception such as invalid data, inability to calculate a checksum,
23+
* characters outside of the expected range.
2424
*
2525
* @author Apache Software Foundation
2626
* @version $Id$

src/java/org/apache/commons/codec/StringDecoder.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
package org.apache.commons.codec;
1919

2020
/**
21-
* Decodes a String into a String.
21+
* Defines common decoding methods for String decoders.
2222
*
2323
* @author Apache Software Foundation
2424
* @version $Id$

src/java/org/apache/commons/codec/StringEncoder.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
package org.apache.commons.codec;
1919

2020
/**
21-
* Encodes a String into a String.
21+
* Defines common encoding methods for String encoders.
2222
*
2323
* @author Apache Software Foundation
2424
* @version $Id$

src/java/org/apache/commons/codec/StringEncoderComparator.java

Lines changed: 14 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,10 @@
2020
import java.util.Comparator;
2121

2222
/**
23-
* Strings are comparable, and this comparator allows
24-
* you to configure it with an instance of a class
25-
* which implements StringEncoder. This comparator
26-
* is used to sort Strings by an encoding scheme such
27-
* as Soundex, Metaphone, etc. This class can come in
28-
* handy if one need to sort Strings by an encoded
29-
* form of a name such as Soundex.
30-
*
23+
* Compares Strings using a {@link StringEncoder}. This comparator is used to sort Strings by an encoding scheme such as
24+
* Soundex, Metaphone, etc. This class can come in handy if one need to sort Strings by an encoded form of a name such
25+
* as Soundex.
26+
*
3127
* @author Apache Software Foundation
3228
* @version $Id$
3329
*/
@@ -50,22 +46,24 @@ public StringEncoderComparator() {
5046

5147
/**
5248
* Constructs a new instance with the given algorithm.
53-
* @param stringEncoder the StringEncoder used for comparisons.
49+
*
50+
* @param stringEncoder
51+
* the StringEncoder used for comparisons.
5452
*/
5553
public StringEncoderComparator(StringEncoder stringEncoder) {
5654
this.stringEncoder = stringEncoder;
5755
}
5856

5957
/**
60-
* Compares two strings based not on the strings
61-
* themselves, but on an encoding of the two
62-
* strings using the StringEncoder this Comparator
63-
* was created with.
58+
* Compares two strings based not on the strings themselves, but on an encoding of the two strings using the
59+
* StringEncoder this Comparator was created with.
6460
*
6561
* If an {@link EncoderException} is encountered, return <code>0</code>.
6662
*
67-
* @param o1 the object to compare
68-
* @param o2 the object to compare to
63+
* @param o1
64+
* the object to compare
65+
* @param o2
66+
* the object to compare to
6967
* @return the Comparable.compareTo() return code or 0 if an encoding error was caught.
7068
* @see Comparable
7169
*/
@@ -77,8 +75,7 @@ public int compare(Object o1, Object o2) {
7775
Comparable s1 = (Comparable) this.stringEncoder.encode(o1);
7876
Comparable s2 = (Comparable) this.stringEncoder.encode(o2);
7977
compareCode = s1.compareTo(s2);
80-
}
81-
catch (EncoderException ee) {
78+
} catch (EncoderException ee) {
8279
compareCode = 0;
8380
}
8481
return compareCode;

src/java/org/apache/commons/codec/binary/BaseNCodec.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
import org.apache.commons.codec.EncoderException;
2424

2525
/**
26-
* Implements common Base-N codec functions.
26+
* Abstract superclass for Base-N encoders and decoders.
2727
*
2828
* <p>
2929
* This class is not thread-safe.

src/java/org/apache/commons/codec/binary/BaseNCodecInputStream.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
import java.io.InputStream;
2323

2424
/**
25-
* Common base class for Base-N input streams.
25+
* Abstract superclass for Base-N input streams.
2626
*
2727
* @since 1.5
2828
*/

src/java/org/apache/commons/codec/binary/BaseNCodecOutputStream.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
import java.io.OutputStream;
2323

2424
/**
25-
* Common base class for Base-N output streams.
25+
* Abstract superclass for Base-N output streams.
2626
*
2727
* @since 1.5
2828
*/

src/java/org/apache/commons/codec/binary/BinaryCodec.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,10 @@
2323
import org.apache.commons.codec.EncoderException;
2424

2525
/**
26-
* Translates between byte arrays and strings of "0"s and "1"s.
26+
* Converts between byte arrays and strings of "0"s and "1"s.
2727
*
2828
* TODO: may want to add more bit vector functions like and/or/xor/nand
29-
* TODO: also might be good to generate boolean[] from byte[] et. cetera.
29+
* TODO: also might be good to generate boolean[] from byte[] et cetera.
3030
*
3131
* @author Apache Software Foundation
3232
* @since 1.3

src/java/org/apache/commons/codec/binary/Hex.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
import org.apache.commons.codec.EncoderException;
2727

2828
/**
29-
* Hex encoder and decoder. The charset used for certain operation can be set, the default is set in
29+
* Converts hexadecimal Strings. The charset used for certain operation can be set, the default is set in
3030
* {@link #DEFAULT_CHARSET_NAME}
3131
*
3232
* @since 1.1

0 commit comments

Comments
 (0)