public class NullOutputStream extends OutputStream
| Modifier and Type | Field and Description |
|---|---|
static NullOutputStream |
NULL_OUTPUT_STREAM
单例
|
| Constructor and Description |
|---|
NullOutputStream() |
| Modifier and Type | Method and Description |
|---|---|
void |
write(byte[] b)
什么也不做,写出到
/dev/null. |
void |
write(byte[] b,
int off,
int len)
什么也不做,写出到
/dev/null. |
void |
write(int b)
什么也不做,写出到
/dev/null. |
close, flushpublic static final NullOutputStream NULL_OUTPUT_STREAM
public void write(byte[] b,
int off,
int len)
/dev/null.write in class OutputStreamb - 写出的数据off - 开始位置len - 长度public void write(int b)
/dev/null.write in class OutputStreamb - 写出的数据public void write(byte[] b)
throws IOException
/dev/null.write in class OutputStreamb - 写出的数据IOException - 不抛出Copyright © 2025. All rights reserved.