public final class WriteBuffer extends OutputStream
| 限定符和类型 | 方法和说明 |
|---|---|
void |
close() |
void |
flush() |
void |
write(byte[] b,
int off,
int len) |
void |
write(ByteBuffer buffer) |
void |
write(int b)
已过时。
|
void |
write(VirtualBuffer virtualBuffer) |
void |
writeByte(byte b) |
void |
writeInt(int v)
输出int数值,占用4个字节
|
void |
writeLong(long v)
输出long数值,占用8个字节
|
void |
writeShort(short v)
输出一个short类型的数据
|
writepublic void write(int b)
OutputStream.write(int)规范:要写入的字节是参数 b 的八个低位。 b 的 24 个高位将被忽略。
writeByte(byte)。write 在类中 OutputStreamb - 输出字节public void writeShort(short v)
throws IOException
v - short数值IOException - IO异常public void writeByte(byte b)
b - 待输出数值write(int)public void writeInt(int v)
throws IOException
v - int数值IOException - IO异常public void writeLong(long v)
throws IOException
v - long数值IOException - IO异常public void write(byte[] b,
int off,
int len)
throws IOException
write 在类中 OutputStreamIOExceptionpublic void write(ByteBuffer buffer)
public void write(VirtualBuffer virtualBuffer)
public void flush()
flush 在接口中 Flushableflush 在类中 OutputStreampublic void close()
close 在接口中 Closeableclose 在接口中 AutoCloseableclose 在类中 OutputStreamCopyright © 2023. All rights reserved.