static int decodeDigit ( byte data ) { char charData = ( char ) data ; if ( charData <= ' ' && charData >= ' ' ) { return charData - ' ' ; } if ( charData <= ' ' && charData >= ' ' ) { return charData - ' ' + 26 ; } if ( charData <= ' ' && charData >= ' ' ) { return charData - ' ' + 52 ; } switch ( charData ) { case ' ' : return 62 ; case ' ' : return 63 ; default : throw new IllegalArgumentException ( "Invalid char to decode: " + data ) ; //$NON-NLS-1$ } }
This method converts a Base 64 digit to its numeric value .