public class PipedWriter extends Writer
| Constructor and Description |
|---|
PipedWriter()
创建一个尚未连接到管道阅读器的管道作家。
|
PipedWriter(PipedReader snk)
创建一个连接到指定的管道阅读器的管道连接器。
|
public PipedWriter(PipedReader snk) throws IOException
snk。
snk读者的管道连接。
IOException如果I/O错误发生。
public PipedWriter()
public void connect(PipedReader snk) throws IOException
IOException抛出。
如果snk是悬空管道的读者和src是悬空管道的作家,他们可以通过电话连接:
或电话:src.connect(snk)
两电话有相同的效果。snk.connect(src)
snk读者的管道连接。
IOException如果I/O错误发生。
public void write(int c)
throws IOException
char。如果一个线程从连接管道输入流读取数据的特点,但是线程不再活着,那么
IOException抛出。
实现的方法Writer write。
write 方法重写,继承类
Writer
c -
char要写。
IOException如果管
broken,
unconnected,关闭或发生I/O错误。
public void write(char[] cbuf,
int off,
int len)
throws IOException
len字符从指定的字符数组起点偏移
off这个管道输出流。此方法块,直到将所有的字符写入输出流为止。如果一个线程从连接管道输入流读取数据的特点,但是线程不再活着,那么
IOException抛出。
write 方法重写,继承类
Writer
cbuf -数据。
off的起始偏移量的数据。
len -字符数。
IOException如果管
broken,
unconnected,关闭或发生I/O错误。
public void flush()
throws IOException
flush 接口
Flushable
flush 方法重写,继承类
Writer
IOException如果管道是封闭的,或发生I/O错误。
public void close()
throws IOException
close 接口
Closeable
close 接口
AutoCloseable
close 方法重写,继承类
Writer
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.