JEP 135: Base64 Encoding & DecodingJEP 135: Base64 Encoding & DecodingOwnerAlan BatemanTypeFeatureScopeSEStatusClosed / DeliveredRelease8Componentcore-libsDiscussioncore dash libs dash dev at openjdk dot java dot netEffortSDurationSEndorsed byBrian GoetzCreated2011/11/11 20:00Updated2017/06/14 20:12Issue8046125Summary
Define a standard API for Base64 encoding and decoding.
Motivation
Base64 encoding schemes are frequently used to encode binary/octet
sequences that are transmitted as textual data. It is commonly used by
applications using Multipurpose Internal Mail Extensions (MIME), encoding
passwords for HTTP headers, message digests, etc.
The JDK is long overdue a standard API for Base64 encoding and decoding. It has
been frequently requested by developers for many years, many resorting to using
JDK private and unsupported classes such as sun.misc.BASE64Encoder and
sun.misc.BASE64Decoder.
The JDK itself has several internal implementations: java.util.prefs.Base64,
com.sun.org.apache.xml.internal.security.utils.Base64, and
com.sun.net.httpserver.Base64 to name a few. A standard API would allow these
sorts of implementations to be retired.
Description
Define a simple API, probably in java.util, for Base64 encoding and decoding.
The API must clearly specify the Base64 encoding scheme that is implements,
probably the Base64 Content-Transfer-Encoding specified by RFC 1521.
The API should support common cases, such as encoding binary data in a byte
array or read from an input stream, and decoding strings to a byte array or
ByteBuffer.
Existing usages and implementations of Base64 in the JDK should be examined for
opportunities to replace and use the new API.
Testing
This API will require new unit tests that will be developed along with the
implementation. New functional tests would be useful too.
Impact

TCK: New tests will be required.

InstallingContributingSponsoringDevelopers' GuideVulnerabilitiesJDK GA/EA BuildsMailing listsWiki
                      · IRCBylaws · CensusLegalWorkshopJEP ProcessSource codeMercurialGitHubToolsGitjtreg harnessGroups(overview)AdoptionBuildClient LibrariesCompatibility & Specification ReviewCompilerConformanceCore LibrariesGoverning BoardHotSpotIDE Tooling & SupportInternationalizationJMXMembersNetworkingPortersQualitySecurityServiceabilityVulnerabilityWebProjects(overview,
      archive)AmberBabylonCRaCCaciocavalloClosuresCode ToolsCoinCommon VM InterfaceCompiler GrammarDetroitDevelopers' GuideDevice I/ODukeGalahadGraalIcedTeaJDK 7JDK 8JDK 8 UpdatesJDK 9JDK
      (…,
       21,
       22,
       23)JDK UpdatesJavaDoc.NextJigsawKonaKullaLambdaLanaiLeydenLilliputLocale EnhancementLoomMemory Model UpdateMetropolisMission ControlMulti-Language VMNashornNew I/OOpenJFXPanamaPenrosePort: AArch32Port: AArch64Port: BSDPort: HaikuPort: Mac OS XPort: MIPSPort: MobilePort: PowerPC/AIXPort: RISC-VPort: s390xPortolaSCTPShenandoahSkaraSumatraTiered AttributionTsanType AnnotationsValhallaVeronaVisualVMWakefieldZeroZGC

        © 2024 Oracle Corporation and/or its affiliates
        Terms of Use
        ·
        
            License: GPLv2
        · Privacy
        · Trademarks
