public class Base64 extends Object
使用RFC 4648和RFC 2045表1中规定的“Base64字母表”进行编码和解码操作。 编码器不添加任何换行符(行分隔符)字符。 解码器拒绝包含base64字母外的字符的数据。
使用RFC 4648的表2中规定的“URL和Filename safe Base64 Alphabet”进行编码和解码。 编码器不添加任何换行符(行分隔符)字符。 解码器拒绝包含base64字母外的字符的数据。
 使用RFC 2045表1中规定的“Base64字母表”进行编码和解码操作。 编码输出必须以不超过76个字符的行'\n' ,并使用回车'\r'然后立即以换行'\n'作为行分隔符。 没有行分隔符添加到编码输出的末尾。 在解码操作中,将忽略base64字母表中未找到的所有行分隔符或其他字符。 
 除非另有说明,否则将null参数传递给null的方法将导致抛出NullPointerException 。 
| Modifier and Type | Class and Description | 
|---|---|
| static class  | Base64.Decoder
              该类使用RFC 4648和RFC 2045中规定的Base64编码方案来实现用于解码字节数据的解码器。 
             | 
| static class  | Base64.Encoder
              该类使用RFC 4648和RFC 2045中规定的Base64编码方案来实现用于编码字节数据的编码器。 
             | 
| Modifier and Type | Method and Description | 
|---|---|
| static Base64.Decoder | getDecoder() 
             返回 Base64.Decoder解码使用Basic型base64编码方案。 | 
| static Base64.Encoder | getEncoder() 
             返回一个 Base64.Encoder编码使用Basic型base64编码方案。 | 
| static Base64.Decoder | getMimeDecoder() 
             返回一个 Base64.Decoder解码使用MIME型BASE64解码方案。 | 
| static Base64.Encoder | getMimeEncoder() 
             返回一个 Base64.Encoder编码使用MIME型base64编码方案。 | 
| static Base64.Encoder | getMimeEncoder(int lineLength, byte[] lineSeparator) 
             返回一个 Base64.Encoder,它使用具有指定行长度和行分隔符的MIME类型base64编码方案进行编码。 | 
| static Base64.Decoder | getUrlDecoder() 
             返回 Base64.Decoder解码使用URL and Filename safe型base64编码方案。 | 
| static Base64.Encoder | getUrlEncoder() 
             返回一个 Base64.Encoder编码使用URL and Filename safe型base64编码方案。 | 
public static Base64.Encoder getEncoder()
Base64.Encoder编码使用Basic型base64编码方案。 
          public static Base64.Encoder getUrlEncoder()
Base64.Encoder编码使用URL and Filename safe型base64编码方案。 
          public static Base64.Encoder getMimeEncoder()
Base64.Encoder编码使用MIME型base64编码方案。 
          public static Base64.Encoder getMimeEncoder(int lineLength, byte[] lineSeparator)
Base64.Encoder ,它使用具有指定行长和行分隔符的MIME类型base64编码方案进行编码。 
          lineLength - 每个输出行的长度(向下舍入为4的最接近的倍数)。 
            如果lineLength <= 0的输出不会被分开 
           lineSeparator - 每个输出行的行分隔符 
           IllegalArgumentException - 如果 
            lineSeparator包括RFC 2045的表1中指定的“Base64 Alphabet”的任何字符。 
           public static Base64.Decoder getDecoder()
Base64.Decoder解码使用Basic型base64编码方案。 
          public static Base64.Decoder getUrlDecoder()
Base64.Decoder解码使用URL and Filename safe型base64编码方案。 
          public static Base64.Decoder getMimeDecoder()
Base64.Decoder解码使用MIME型BASE64解码方案。 
           Submit a bug or feature 
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
 Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.