public interface ObjectOutput extends DataOutput, AutoCloseable
InputStream
,
ObjectOutputStream
,
ObjectInputStream
Modifier and Type | Method and Description |
---|---|
void |
close()
关闭流。
|
void |
flush()
冲流。
|
void |
write(byte[] b)
写入一个字节数组。
|
void |
write(byte[] b, int off, int len)
写入字节数组的字节数。
|
void |
write(int b)
写一个字节。
|
void |
writeObject(Object obj)
写一个对象到基础存储或流。
|
writeBoolean, writeByte, writeBytes, writeChar, writeChars, writeDouble, writeFloat, writeInt, writeLong, writeShort, writeUTF
void writeObject(Object obj) throws IOException
obj
-要写入的对象
IOException
-任何常见的输入/输出相关异常。
void write(int b) throws IOException
write
接口
DataOutput
b
-字节
IOException
如果发生I/O错误。
void write(byte[] b) throws IOException
write
接口
DataOutput
b
-要写入的数据
IOException
如果发生I/O错误。
void write(byte[] b, int off, int len) throws IOException
write
接口
DataOutput
b
-将被写入的数据
off
的起始偏移量的数据
len
-字节写数
IOException
如果发生I/O错误。
void flush() throws IOException
IOException
如果发生I/O错误。
void close() throws IOException
close
接口
AutoCloseable
IOException
如果发生I/O错误。
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.