public static byte[] decode(byte[] input,int offset,int len,int flags){
  Decoder decoder=new Decoder(flags,new byte[len * 3 / 4]);
  if (!decoder.process(input,offset,len,true)) {
    throw new IllegalArgumentException("bad base-64");
  }
  if (decoder.op == decoder.output.length) {
    return decoder.output;
  }
  byte[] temp=new byte[decoder.op];
  System.arraycopy(decoder.output,0,temp,0,decoder.op);
  return temp;
}

public static byte [ ] decode ( byte [ ] input , int offset , int len , int flags ) { Decoder decoder = new Decoder ( flags , new byte [ len * 3 / 4 ] ) ; if ( ! decoder . process ( input , offset , len , true ) ) { throw new IllegalArgumentException ( "bad base-64" ) ; } if ( decoder . op == decoder . output . length ) { return decoder . output ; } byte [ ] temp = new byte [ decoder . op ] ; System . arraycopy ( decoder . output , 0 , temp , 0 , decoder . op ) ; return temp ; }
decode the base64 - encoded data in input and return the data in a new byte array . < p / > < p > the padding ' = ' characters at the end are considered optional , but if any are present , there must be the correct number of them .
