public class Base64 extends Object
| 构造器和说明 |
|---|
Base64() |
Base64(char chPlus,
char chSplash,
char chPad,
int lineLength) |
Base64(int lineLength) |
| 限定符和类型 | 方法和说明 |
|---|---|
byte[] |
decode(String s)
decode a well-formed complete Base64 string back into an array of bytes.
|
byte[] |
decodeAuto(String s)
decode a well-formed complete Base64 string back into an array of bytes.
|
static void |
display(byte[] b)
debug display array
|
String |
encode(byte[] b)
Encode an arbitrary array of bytes as Base64 printable ASCII.
|
void |
setLineLength(int length)
determines how long the lines are that are generated by encode.
|
void |
setLineSeparator(String lineSeparator)
How lines are separated.
|
static void |
show(byte[] b)
debug display array
|
public Base64()
public Base64(char chPlus,
char chSplash,
char chPad,
int lineLength)
public Base64(int lineLength)
public String encode(byte[] b) throws IOException
b - byte[]IOException - if an error occurredpublic byte[] decodeAuto(String s)
s - Stringpublic byte[] decode(String s)
s - Stringpublic void setLineLength(int length)
length - 0 means no newlines inserted. Must be a multiple of 4.public void setLineSeparator(String lineSeparator)
lineSeparator - may be "" but not null.
Usually contains only a combination of chars \n and \r.
Could be any chars not in set A-Z a-z 0-9 + /.public static void show(byte[] b)
b - byte[]public static void display(byte[] b)
b - byte[]Copyright © 2017. All rights reserved.