Skip to content

Commit

Permalink
Javadoc, no need to abbreviate in documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
garydgregory committed Oct 17, 2023
1 parent e2a18bf commit f33faf2
Show file tree
Hide file tree
Showing 5 changed files with 144 additions and 144 deletions.
32 changes: 16 additions & 16 deletions src/main/java/org/apache/commons/codec/binary/Hex.java
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ public static byte[] decodeHex(final String data) throws DecoderException {
* The returned array will be double the length of the passed array, as it takes two characters to represent any
* given byte.
*
* @param data a byte[] to convert to hex characters
* @param data a byte[] to convert to hexadecimal characters
* @return A char[] containing lower-case hexadecimal characters
*/
public static char[] encodeHex(final byte[] data) {
Expand All @@ -161,7 +161,7 @@ public static char[] encodeHex(final byte[] data, final boolean toLowerCase) {
* The returned array will be double the length of the passed array, as it takes two characters to represent any
* given byte.
*
* @param data a byte[] to convert to hex characters
* @param data a byte[] to convert to hexadecimal characters
* @param toDigits the output alphabet (must contain at least 16 chars)
* @return A char[] containing the appropriate characters from the alphabet For best results, this should be either
* upper- or lower-case hex.
Expand All @@ -177,7 +177,7 @@ protected static char[] encodeHex(final byte[] data, final char[] toDigits) {
/**
* Converts an array of bytes into an array of characters representing the hexadecimal values of each byte in order.
*
* @param data a byte[] to convert to hex characters
* @param data a byte[] to convert to hexadecimal characters
* @param dataOffset the position in {@code data} to start encoding from
* @param dataLen the number of bytes from {@code dataOffset} to encode
* @param toLowerCase {@code true} converts to lowercase, {@code false} to uppercase
Expand All @@ -195,7 +195,7 @@ public static char[] encodeHex(final byte[] data, final int dataOffset, final in
/**
* Converts an array of bytes into an array of characters representing the hexadecimal values of each byte in order.
*
* @param data a byte[] to convert to hex characters
* @param data a byte[] to convert to hexadecimal characters
* @param dataOffset the position in {@code data} to start encoding from
* @param dataLen the number of bytes from {@code dataOffset} to encode
* @param toLowerCase {@code true} converts to lowercase, {@code false} to uppercase
Expand All @@ -211,7 +211,7 @@ public static void encodeHex(final byte[] data, final int dataOffset, final int
/**
* Converts an array of bytes into an array of characters representing the hexadecimal values of each byte in order.
*
* @param data a byte[] to convert to hex characters
* @param data a byte[] to convert to hexadecimal characters
* @param dataOffset the position in {@code data} to start encoding from
* @param dataLen the number of bytes from {@code dataOffset} to encode
* @param toDigits the output alphabet (must contain at least 16 chars)
Expand All @@ -235,7 +235,7 @@ private static void encodeHex(final byte[] data, final int dataOffset, final int
* <p>All bytes identified by {@link ByteBuffer#remaining()} will be used; after this method
* the value {@link ByteBuffer#remaining() remaining()} will be zero.</p>
*
* @param data a byte buffer to convert to hex characters
* @param data a byte buffer to convert to hexadecimal characters
* @return A char[] containing lower-case hexadecimal characters
* @since 1.11
*/
Expand All @@ -251,7 +251,7 @@ public static char[] encodeHex(final ByteBuffer data) {
* <p>All bytes identified by {@link ByteBuffer#remaining()} will be used; after this method
* the value {@link ByteBuffer#remaining() remaining()} will be zero.</p>
*
* @param data a byte buffer to convert to hex characters
* @param data a byte buffer to convert to hexadecimal characters
* @param toLowerCase {@code true} converts to lowercase, {@code false} to uppercase
* @return A char[] containing hexadecimal characters in the selected case
* @since 1.11
Expand All @@ -268,7 +268,7 @@ public static char[] encodeHex(final ByteBuffer data, final boolean toLowerCase)
* <p>All bytes identified by {@link ByteBuffer#remaining()} will be used; after this method
* the value {@link ByteBuffer#remaining() remaining()} will be zero.</p>
*
* @param byteBuffer a byte buffer to convert to hex characters
* @param byteBuffer a byte buffer to convert to hexadecimal characters
* @param toDigits the output alphabet (must be at least 16 characters)
* @return A char[] containing the appropriate characters from the alphabet For best results, this should be either
* upper- or lower-case hex.
Expand All @@ -282,7 +282,7 @@ protected static char[] encodeHex(final ByteBuffer byteBuffer, final char[] toDi
* Converts an array of bytes into a String representing the hexadecimal values of each byte in order. The returned
* String will be double the length of the passed array, as it takes two characters to represent any given byte.
*
* @param data a byte[] to convert to hex characters
* @param data a byte[] to convert to hexadecimal characters
* @return A String containing lower-case hexadecimal characters
* @since 1.4
*/
Expand All @@ -294,7 +294,7 @@ public static String encodeHexString(final byte[] data) {
* Converts an array of bytes into a String representing the hexadecimal values of each byte in order. The returned
* String will be double the length of the passed array, as it takes two characters to represent any given byte.
*
* @param data a byte[] to convert to hex characters
* @param data a byte[] to convert to hexadecimal characters
* @param toLowerCase {@code true} converts to lowercase, {@code false} to uppercase
* @return A String containing lower-case hexadecimal characters
* @since 1.11
Expand All @@ -310,7 +310,7 @@ public static String encodeHexString(final byte[] data, final boolean toLowerCas
* <p>All bytes identified by {@link ByteBuffer#remaining()} will be used; after this method
* the value {@link ByteBuffer#remaining() remaining()} will be zero.</p>
*
* @param data a byte buffer to convert to hex characters
* @param data a byte buffer to convert to hexadecimal characters
* @return A String containing lower-case hexadecimal characters
* @since 1.11
*/
Expand All @@ -325,7 +325,7 @@ public static String encodeHexString(final ByteBuffer data) {
* <p>All bytes identified by {@link ByteBuffer#remaining()} will be used; after this method
* the value {@link ByteBuffer#remaining() remaining()} will be zero.</p>
*
* @param data a byte buffer to convert to hex characters
* @param data a byte buffer to convert to hexadecimal characters
* @param toLowerCase {@code true} converts to lowercase, {@code false} to uppercase
* @return A String containing lower-case hexadecimal characters
* @since 1.11
Expand Down Expand Up @@ -363,7 +363,7 @@ private static byte[] toByteArray(final ByteBuffer byteBuffer) {
* @param ch A character to convert to an integer digit
* @param index The index of the character in the source
* @return An integer
* @throws DecoderException Thrown if ch is an illegal hex character
* @throws DecoderException Thrown if ch is an illegal hexadecimal character
*/
protected static int toDigit(final char ch, final int index) throws DecoderException {
final int digit = Character.digit(ch, 16);
Expand Down Expand Up @@ -474,7 +474,7 @@ public Object decode(final Object object) throws DecoderException {
* {@link #getCharset()}.
* </p>
*
* @param array a byte[] to convert to hex characters
* @param array a byte[] to convert to hexadecimal characters
* @return A byte[] containing the bytes of the lower-case hexadecimal characters
* @since 1.7 No longer throws IllegalStateException if the charsetName is invalid.
* @see #encodeHex(byte[])
Expand All @@ -495,7 +495,7 @@ public byte[] encode(final byte[] array) {
* <p>All bytes identified by {@link ByteBuffer#remaining()} will be used; after this method
* the value {@link ByteBuffer#remaining() remaining()} will be zero.</p>
*
* @param array a byte buffer to convert to hex characters
* @param array a byte buffer to convert to hexadecimal characters
* @return A byte[] containing the bytes of the lower-case hexadecimal characters
* @see #encodeHex(byte[])
* @since 1.11
Expand All @@ -513,7 +513,7 @@ public byte[] encode(final ByteBuffer array) {
* {@link #getCharset()}.
* </p>
*
* @param object a String, ByteBuffer, or byte[] to convert to hex characters
* @param object a String, ByteBuffer, or byte[] to convert to hexadecimal characters
* @return A char[] containing lower-case hexadecimal characters
* @throws EncoderException Thrown if the given object is not a String or byte[]
* @see #encodeHex(byte[])
Expand Down
Loading

0 comments on commit f33faf2

Please sign in to comment.