Class Base64String


  • public class Base64String
    extends Object
    Wrapper for Base 64 encoded strings. The assumption is that this is created around a string that is a base 64 encoding of something. If you use the byte constructor,Base64String(byte[]) this will do the base 64 encoding for you. This allows typing so we don't pass b64 encoded strings around by accident. calling toString returns the decoded value.

    Created by Jeff Gaynor
    on 10/16/13 at 11:10 AM

    • Constructor Detail

      • Base64String

        public Base64String​(String b64String)
      • Base64String

        public Base64String​(byte[] rawbytes)
    • Method Detail

      • encodeValue

        public String encodeValue​(byte[] bytes)
        Encode the binary into a base 64 string. You may undo this with decodeValue();
        Parameters:
        bytes -
        Returns:
      • decodeValue

        public byte[] decodeValue()
      • getValue

        public String getValue()
        Equivalent to toString.Returns the base 64 encoded string itself.
        Returns: