Java Base64 base64Character(int number)

Here you can find the source of base64Character(int number)

Description

base Character

License

Open Source License

Declaration

public static char base64Character(int number) 

Method Source Code

//package com.java2s;
/*******************************************************************************
 * Copyright (c) 2000, 2010 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors:/*from w ww  . ja  va2 s  .  com*/
 *      IBM Corporation - initial API and implementation
 *******************************************************************************/

public class Main {
    private static final String BASE_64_ENCODING = "-0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz";

    public static char base64Character(int number) {
        if (number < 0 || number > 63) {
            return ' ';
        }
        return BASE_64_ENCODING.charAt(number);
    }
}

Related

  1. Base64(String msg)
  2. base64(String string)
  3. base64(String value)
  4. base64Append(StringBuilder sb, int digit, boolean haveNonZero)
  5. base64Append(StringBuilder sb, int digit, boolean haveNonZero)
  6. base64CharToValue(byte c)
  7. base64enc(byte[] in)
  8. base64Pad(String s)
  9. base64ReadChunk(InputStream in, byte[] chunk)