base32 (dnsjava documentation)
Date: 2013-04-10

org.xbill.DNS.utils

## Class base32

- java.lang.Object
- - org.xbill.DNS.utils.base32

-     public class base32
      extends Object

  Routines for converting between Strings of base32-encoded data and arrays of binary data. This currently supports the base32 and base32hex alphabets specified in RFC 4648, sections 6 and 7.
  Author:
    Brian Wellington

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `base32.Alphabet`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `base32(String alphabet, boolean padding, boolean lowercase)` Creates an object that can be used to do base32 conversions.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `byte[]` | `fromString(String str)` Convert a base32-encoded String to binary data
    `String` | `toString(byte[] b)` Convert binary data to a base32-encoded String

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### base32

          public base32(String alphabet,
                boolean padding,
                boolean lowercase)

      Creates an object that can be used to do base32 conversions.
      Parameters:
        `alphabet` - Which alphabet should be used
        `padding` - Whether padding should be used
        `lowercase` - Whether lowercase characters should be used. default parameters (The standard base32 alphabet, no padding, uppercase)

  - ### Method Detail

    - #### toString

          public String toString(byte[] b)

      Convert binary data to a base32-encoded String
      Parameters:
        `b` - An array containing binary data
      Returns:
        A String containing the encoded data

    - #### fromString

          public byte[] fromString(String str)

      Convert a base32-encoded String to binary data
      Parameters:
        `str` - A String containing the encoded data
      Returns:
        An array containing the binary data, or null if the string is invalid