Skip to content

Commit

Permalink
fixed groovydoc
Browse files Browse the repository at this point in the history
  • Loading branch information
Tim Yates committed Dec 2, 2013
1 parent 558e91e commit da6b094
Showing 1 changed file with 49 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ package com.bloidonia.groovy.extensions
*/
class ArrayExtensionMethods {
/**
* Generate a hex-dump of a byte[]
* Generate a hex-dump of a byte array.
*
* <pre class="groovyTestCase">
* byte[] bytes = "Hello and welcome to ★ Groovy".bytes
*
Expand All @@ -40,9 +41,12 @@ class ArrayExtensionMethods {
* assert output == expected
* </pre>
*
* @param self the byte[]
* @param delegate the object to delegate to
* @return the closure but with its delegate set
* @param self the byte[] to dump
* @param writer the writer to dump to
* @param idx the index into self to start dumping from
* @param len the number of bytes to dump
*
* @since 0.5.7
*/
static void hexdump( byte[] self, Writer writer, int idx, int len ) {
writer.write ''' +--------------------------------------------------+
Expand All @@ -65,22 +69,63 @@ class ArrayExtensionMethods {
writer.write ' +----------+--------------------------------------------------+------------------+\n'
}

/**
* Generate a hex-dump of a byte array.
*
* @param self the byte[] to dump
* @param idx the index into self to start dumping from
* @param len the number of bytes to dump
*
* @since 0.5.7
*/
static void hexdump( byte[] self, int idx, int len ) {
hexdump( self, new PrintWriter( System.out ), idx, len )
}

/**
* Generate a hex-dump of a byte array.
*
* @param self the byte[] to dump
* @param writer the writer to dump to
* @param idx the index into self to start dumping from
*
* @since 0.5.7
*/
static void hexdump( byte[] self, Writer writer, int idx ) {
hexdump( self, writer, idx, self.length )
}

/**
* Generate a hex-dump of a byte array.
*
* @param self the byte[] to dump
* @param idx the index into self to start dumping from
*
* @since 0.5.7
*/
static void hexdump( byte[] self, int idx ) {
hexdump( self, new PrintWriter( System.out ), idx, self.length )
}

/**
* Generate a hex-dump of a byte array.
*
* @param self the byte[] to dump
* @param writer the writer to dump to
*
* @since 0.5.7
*/
static void hexdump( byte[] self, Writer writer ) {
hexdump( self, writer, 0, self.length )
}

/**
* Generate a hex-dump of a byte array.
*
* @param self the byte[] to dump
*
* @since 0.5.7
*/
static void hexdump( byte[] self ) {
hexdump( self, new PrintWriter( System.out ), 0, self.length )
}
Expand Down

0 comments on commit da6b094

Please sign in to comment.