|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.codehaus.groovy.runtime.EncodingGroovyMethods
public class EncodingGroovyMethods
This class defines all the encoding/decoding groovy methods which enhance the normal JDK classes when inside the Groovy environment. Static methods are used with the first parameter the destination class.
| Constructor Summary | |
|---|---|
EncodingGroovyMethods()
|
|
| Method Summary | |
|---|---|
static byte[] |
decodeBase64(java.lang.String value)
Decode the String from Base64 into a byte array. |
static byte[] |
decodeHex(java.lang.String value)
Decodes a hex string to a byte array. |
static Writable |
encodeBase64(byte[] data)
Produce a Writable object which writes the Base64 encoding of the byte array. |
static Writable |
encodeBase64(java.lang.Byte[] data)
Produce a Writable object which writes the Base64 encoding of the byte array. |
static Writable |
encodeBase64(byte[] data,
boolean chunked)
Produce a Writable object which writes the Base64 encoding of the byte array. |
static Writable |
encodeBase64(java.lang.Byte[] data,
boolean chunked)
Produce a Writable object which writes the Base64 encoding of the byte array. |
static Writable |
encodeHex(byte[] data)
Produces a Writable that writes the hex encoding of the byte[]. |
static Writable |
encodeHex(java.lang.Byte[] data)
Produces a Writable that writes the hex encoding of the Byte[]. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public EncodingGroovyMethods()
| Method Detail |
|---|
public static Writable encodeBase64(java.lang.Byte[] data,
boolean chunked)
RFC 4648.
data - Byte array to be encodedchunked - whether or not the Base64 encoded data should be MIME chunked
public static Writable encodeBase64(java.lang.Byte[] data)
RFC 4648.
data - Byte array to be encoded
public static Writable encodeBase64(byte[] data,
boolean chunked)
RFC 4648.
data - byte array to be encodedchunked - whether or not the Base64 encoded data should be MIME chunked
public static Writable encodeBase64(byte[] data)
RFC 4648.
data - byte array to be encoded
public static byte[] decodeBase64(java.lang.String value)
value - the string to be decoded
public static Writable encodeHex(java.lang.Byte[] data)
data - byte array to be encoded
Integer.toHexString(int)public static Writable encodeHex(byte[] data)
data - byte array to be encoded
Integer.toHexString(int)public static byte[] decodeHex(java.lang.String value)
value - string to be decoded
java.lang.NumberFormatException - If the string contains an odd number of characters
or if the characters are not valid hexadecimal values.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||