content: /* $Id: Base64Url.java 131008 2010-05-21 23:12:24Z daves $
   *
   * Copyright (c) 2010 Cycorp, Inc.  All rights reserved.
   * This software is the proprietary information of Cycorp, Inc.
   * Use is subject to license terms.
   */
  
  package org.opencyc.util;
  
  //// Internal Imports
  
  //// External Imports
  
  /** 
   * <P>Base64Url is designed to...
   *
   * <P>Copyright (c) 2010 Cycorp, Inc.  All rights reserved.
   * <BR>This software is the proprietary information of Cycorp, Inc.
   * <P>Use is subject to license terms.
   *
   * Created on : May 14, 2010, 2:00:10 PM
   * Author     : daves
   * @version $Id: Base64Url.java 131008 2010-05-21 23:12:24Z daves $
   */
  final public class Base64Url extends Base64 {
  
    //// Constructors
  
    /** Creates a new instance of Base64Url. */
    public Base64Url() {
    }
  
  
        /** The 64 valid Base64 values. */
      private final static byte[] BASE_64_URL_ALPHABET =
      {
          (byte)'A', (byte)'B', (byte)'C', (byte)'D', (byte)'E', (byte)'F', (byte)'G',
          (byte)'H', (byte)'I', (byte)'J', (byte)'K', (byte)'L', (byte)'M', (byte)'N',
          (byte)'O', (byte)'P', (byte)'Q', (byte)'R', (byte)'S', (byte)'T', (byte)'U',
          (byte)'V', (byte)'W', (byte)'X', (byte)'Y', (byte)'Z',
          (byte)'a', (byte)'b', (byte)'c', (byte)'d', (byte)'e', (byte)'f', (byte)'g',
          (byte)'h', (byte)'i', (byte)'j', (byte)'k', (byte)'l', (byte)'m', (byte)'n',
          (byte)'o', (byte)'p', (byte)'q', (byte)'r', (byte)'s', (byte)'t', (byte)'u',
          (byte)'v', (byte)'w', (byte)'x', (byte)'y', (byte)'z',
          (byte)'0', (byte)'1', (byte)'2', (byte)'3', (byte)'4', (byte)'5',
          (byte)'6', (byte)'7', (byte)'8', (byte)'9', (byte)'-', (byte)'_'
      };
  
  
    @Override
    protected byte[] getAlphabet() {
      return BASE_64_URL_ALPHABET;
    }
  
    private final static byte[] BASE_64_URL_DECODABET =
      {
          -9,-9,-9,-9,-9,-9,-9,-9,-9,                 // Decimal  0 -  8
          -5,-5,                                      // Whitespace: Tab and Linefeed
          -9,-9,                                      // Decimal 11 - 12
          -5,                                         // Whitespace: Carriage Return
          -9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,     // Decimal 14 - 26
          -9,-9,-9,-9,-9,                             // Decimal 27 - 31
          -5,                                         // Whitespace: Space
          -9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,        // Decimal 33 - 44
          62,                                         // dash at 45
          -9, -9,                                     // decimal 46 - 47
          52,53,54,55,56,57,58,59,60,61,              // Numbers zero through nine
          -9,-9,-9,                                   // Decimal 58 - 60
          -1,                                         // Equals sign at decimal 61
          -9,-9,-9,                                   // Decimal 62 - 64
          0,1,2,3,4,5,6,7,8,9,10,11,12,13,            // Letters 'A' through 'N'
          14,15,16,17,18,19,20,21,22,23,24,25,        // Letters 'O' through 'Z'
          -9,-9,-9,-9,                                // Decimal 91-94
          63,                                         // slash character
          -9,                                         // Decimal 96
          26,27,28,29,30,31,32,33,34,35,36,37,38,     // Letters 'a' through 'm'
          39,40,41,42,43,44,45,46,47,48,49,50,51,     // Letters 'n' through 'z'
          -9,-9,-9,-9                                 // Decimal 123 - 126
          /*,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,     // Decimal 127 - 139
          -9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,     // Decimal 140 - 152
          -9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,     // Decimal 153 - 165
          -9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,     // Decimal 166 - 178
          -9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,     // Decimal 179 - 191
          -9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,     // Decimal 192 - 204
          -9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,     // Decimal 205 - 217
          -9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,     // Decimal 218 - 230
          -9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,     // Decimal 231 - 243
          -9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9         // Decimal 244 - 255 */
      };
  
    protected byte[] getDecodabet() {
      return BASE_64_URL_DECODABET;
    }
  
  
    //// Public Area
    /**
     * 
     * @param bytes
     * @return
     */
  
    //// Protected Area
  
    //// Private Area
  
    //// Internal Rep
  
    //// Main
  
  }
  