Saturday, June 1, 2013

Base64 Encoder and Decoder in Java

Introduction

There are many third party libraries providing Base64 encoding and decoding functions. Many of them are open source solution. I am not going to say too much on the topic. I would just provide my implementation here. If you want to know more, go to the wiki page.


Source

The source contains over 200 lines, however about half of them are comments and unit test. Hence the encode() and decode() function are not really complex. In case you find reading other programmer code difficult. I would provide a typical way of how I read other people code.

Read the comment header first, then scroll down to the main program to see how to use the functions. Then read the functions following the flow in main().

1 comment:

  1. Until comparatively recently, plastic springs were not attainable, however advances in polymer properties make them now fairly sensible. Applications include buckles for anchoring and disconnecting outdoor-equipment webbing. Our 250 analysts and representatives of small and medium-sized companies have a high level of knowledge within the area of information assortment and administration. They use industrial methods to gather and analyze data in more than 15,000 highly environment friendly niches and markets. Our analysts are skilled to mix fashionable data Note 5 Stylus Pens assortment methods, glorious research methodologies, years of collective expertise and experience to conduct informative and correct research. Verified Market Research is the Global’s main research and consulting firm serving greater than 5,000 shoppers.

    ReplyDelete