[JGIT PATCH 17/21] Misc. documentation fixes to Base64 utility
- From
Shawn O. Pearce <spearce@spearce.org>
- Date
- Jun 29, 2008, 07:59 UTC
- Message-ID
- <1214726371-93520-18-git-send-email-spearce@spearce.org>
- In-Reply-To
- <1214726371-93520-17-git-send-email-spearce@spearce.org>
These fixes silence warnings in the utility which are triggered by our (rather pedantic) Eclipse compiler settings.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org> --- .../src/org/spearce/jgit/util/Base64.java | 8 +++++++- 1 files changed, 7 insertions(+), 1 deletions(-)
diff --git a/org.spearce.jgit/src/org/spearce/jgit/util/Base64.java b/org.spearce.jgit/src/org/spearce/jgit/util/Base64.java index b0c19b6..9254bd0 100644 --- a/org.spearce.jgit/src/org/spearce/jgit/util/Base64.java +++ b/org.spearce.jgit/src/org/spearce/jgit/util/Base64.java @@ -378,6 +378,7 @@ public class Base64 * Does not GZip-compress data. * * @param source The data to convert + * @return encoded base64 representation of source. * @since 1.4 */ public static String encodeBytes( byte[] source ) @@ -403,6 +404,7 @@ public class Base64 * * @param source The data to convert * @param options Specified options + * @return encoded base64 representation of source. * @see Base64#GZIP * @see Base64#DONT_BREAK_LINES * @since 2.0 @@ -420,6 +422,7 @@ public class Base64 * @param source The data to convert * @param off Offset in array where conversion should begin * @param len Length of data to convert + * @return encoded base64 representation of source. * @since 1.4 */ public static String encodeBytes( byte[] source, int off, int len ) @@ -447,6 +450,7 @@ public class Base64 * @param off Offset in array where conversion should begin * @param len Length of data to convert * @param options Specified options + * @return encoded base64 representation of source. * @see Base64#GZIP * @see Base64#DONT_BREAK_LINES * @since 2.0 @@ -729,7 +733,7 @@ public class Base64 if( bytes != null && bytes.length >= 4 ) { - int head = ((int)bytes[0] & 0xff) | ((bytes[1] << 8) & 0xff00); + int head = (bytes[0] & 0xff) | ((bytes[1] << 8) & 0xff00); if( java.util.zip.GZIPInputStream.GZIP_MAGIC == head ) { java.io.ByteArrayInputStream bais = null; @@ -1386,6 +1390,7 @@ public class Base64 /** * Method added by PHIL. [Thanks, PHIL. -Rob] * This pads the buffer without closing the stream. + * @throws java.io.IOException input was not properly padded. */ public void flushBase64() throws java.io.IOException { @@ -1430,6 +1435,7 @@ public class Base64 * May be helpful if you need to embed a piece of * base640-encoded data in a stream. * + * @throws java.io.IOException input was not properly padded. * @since 1.5.1 */ public void suspendEncoding() throws java.io.IOException
-- 1.5.6.74.g8a5e