Created
          May 8, 2018 08:58 
        
      - 
      
- 
        Save zubayerahamed/b05b9acc3c4a1f0557f285371aaee24b to your computer and use it in GitHub Desktop. 
    Base64 Encoding in Java
  
        
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | import org.apache.commons.codec.binary.Base64; | |
| byte[] encodedBytes = Base64.encodeBase64("Test".getBytes()); | |
| System.out.println("encodedBytes " + new String(encodedBytes)); | |
| byte[] decodedBytes = Base64.decodeBase64(encodedBytes); | |
| System.out.println("decodedBytes " + new String(decodedBytes)); | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment