[header] How to encode a string to base64 with java [title] Enter info and name file [title] Start up your editor, such as notepad or vi, and enter the preliminaries, such as the class declaration and known constants. [step] Name the file base64.java. [title] Those constant values are specified, so the article states, in the relevant rfcs. 
[step] It is generally a good idea read all relevant rfcs before beginning coding. [title] Treating characters as bytes means that multibyte characters, such as japanese or chinese, will not be correctly encoded.