public static String encodeBytesWithoutPadding(byte[] source, int offset, int length) {
    	String encoded = null;
 
    	try {
    		encoded = encodeBytes(source, offset, length, NO_OPTIONS);
    	} catch (java.io.IOException ex) {
    		assert false : ex.getMessage();
    	}
    	
    	assert encoded != null;
    	
    	if      (encoded.charAt(encoded.length()-2) == '=') return encoded.substring(0, encoded.length()-2);
    	else if (encoded.charAt(encoded.length()-1) == '=') return encoded.substring(0, encoded.length()-1);
    	else                                                return encoded;
    	
    }
public static String encodeBytesWithoutPadding ( byte [ ] source , int offset , int length ) { String encoded = null ; try { encoded = encodeBytes ( source , offset , length , NO_OPTIONS ) ; } catch ( java . io . IOException ex ) { assert false : ex . getMessage ( ) ; } assert encoded != null ; if ( encoded . charAt ( encoded . length ( ) - 2 ) == '=' ) return encoded . substring ( 0 , encoded . length ( ) - 2 ) ; else if ( encoded . charAt ( encoded . length ( ) - 1 ) == '=' ) return encoded . substring ( 0 , encoded . length ( ) - 1 ) ; else return encoded ; }
end encodeBytes