public class Base64OutputStream
extends FilterOutputStream
| java.lang.Object | |||
| java.io.OutputStream | |||
| java.io.FilterOutputStream | |||
| android.util.Base64OutputStream | |||
一个OutputStream,对写入的数据执行Base64编码,将结果数据写入另一个OutputStream。
Inherited fields |
|---|
java.io.FilterOutputStream
|
Public constructors |
|
|---|---|
Base64OutputStream(OutputStream out, int flags) 对写入流的数据执行Base64编码,将编码数据写入另一个OutputStream。 |
|
公共方法(Public methods) |
|
|---|---|
void |
close() 关闭此输出流并释放与该流关联的所有系统资源。 |
void |
write(byte[] b, int off, int len) 将指定的 |
void |
write(int b) 将指定的 |
继承方法(Inherited methods) |
|
|---|---|
java.io.FilterOutputStream
|
|
java.io.OutputStream
|
|
java.lang.Object
|
|
java.io.Closeable
|
|
java.io.Flushable
|
|
java.lang.AutoCloseable
|
|
Base64OutputStream (OutputStream out, int flags)
对写入流的数据执行Base64编码,将编码数据写入另一个OutputStream。
| 参数(Parameters) | |
|---|---|
out |
OutputStream: the OutputStream to write the encoded data to |
flags |
int: bit flags for controlling the encoder; see the constants in Base64 |
void close ()
关闭此输出流并释放与该流关联的所有系统资源。
该 close的方法 FilterOutputStream调用其 flush方法,然后调用 close其基础输出流的方法。
| 抛出异常(Throws) | |
|---|---|
IOException |
|
void write (byte[] b,
int off,
int len)
将指定的 byte数组中的 len字节写入此偏移量 off到此输出流。
write方法 FilterOutputStream调用每个 byte输出的一个参数的 write方法。
请注意,此方法不会使用相同的参数调用其基础输入流的write方法。 FilterOutputStream子类应提供此方法的更高效的实现。
| 参数(Parameters) | |
|---|---|
b |
byte: the data. |
off |
int: the start offset in the data. |
len |
int: the number of bytes to write. |
| 抛出异常(Throws) | |
|---|---|
IOException |
|
void write (int b)
将指定的 byte写入此输出流。
该 write的方法 FilterOutputStream调用 write其基础输出流的方法,也就是说,它执行 out.write(b)。
实现 OutputStream的抽象方法 write 。
| 参数(Parameters) | |
|---|---|
b |
int: the byte. |
| 抛出异常(Throws) | |
|---|---|
IOException |
|