Overview | Package | Class | Deprecated | Index | Help
| Groovy 1.7.6
| FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.codehaus.groovy.runtime
[Java] Class EncodingGroovyMethods

    java.lang.Object
      org.codehaus.groovy.runtime.EncodingGroovyMethods

    public class EncodingGroovyMethods
    extends Object

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.

Method Summary
`static byte[]` | `decodeBase64(String value)` Decode the String from Base64 into a 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(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(byte[] data)` Produce a Writable object which writes the Base64 encoding of the byte array.

Methods inherited from class Object
wait, wait, wait, equals, toString, hashCode, getClass, notify, notifyAll

Method Detail

### decodeBase64

    public static byte[] decodeBase64(String value)

  Decode the String from Base64 into a byte array.
  Parameters:
    `value` - the string to be decoded
  Returns:
    the decoded bytes as an array
  Since:
    1.0

### encodeBase64

    public static Writable encodeBase64(Byte[] data, boolean chunked)

  Produce a Writable object which writes the Base64 encoding of the byte array. Calling toString() on the result returns the encoding as a String. For more information on Base64 encoding and chunking see `RFC 4648`.
  Parameters:
    `data` - Byte array to be encoded
    `chunked` - whether or not the Base64 encoded data should be MIME chunked
  Returns:
    object which will write the Base64 encoding of the byte array
  Since:
    1.5.1

### encodeBase64

    public static Writable encodeBase64(Byte[] data)

  Produce a Writable object which writes the Base64 encoding of the byte array. Calling toString() on the result returns the encoding as a String. For more information on Base64 encoding and chunking see `RFC 4648`.
  Parameters:
    `data` - Byte array to be encoded
  Returns:
    object which will write the Base64 encoding of the byte array
  Since:
    1.0

### encodeBase64

    public static Writable encodeBase64(byte[] data, boolean chunked)

  Produce a Writable object which writes the Base64 encoding of the byte array. Calling toString() on the result returns the encoding as a String. For more information on Base64 encoding and chunking see `RFC 4648`.
  Parameters:
    `data` - byte array to be encoded
    `chunked` - whether or not the Base64 encoded data should be MIME chunked
  Returns:
    object which will write the Base64 encoding of the byte array
  Since:
    1.5.7

### encodeBase64

    public static Writable encodeBase64(byte[] data)

  Produce a Writable object which writes the Base64 encoding of the byte array. Calling toString() on the result returns the encoding as a String. For more information on Base64 encoding and chunking see `RFC 4648`.
  Parameters:
    `data` - byte array to be encoded
  Returns:
    object which will write the Base64 encoding of the byte array
  Since:
    1.0

Copyright © 2003-2010 The Codehaus. All rights reserved.