|
JavaTM Platform Standard Ed. 6 |
|||||||||
��һ���� ��һ���� | ��� ��� ������ | |||||||||
ժҪ�� Ƕ�� | �ֶ� | ���췽�� | ���� | ��ϸ��Ϣ�� �ֶ� | ���췽�� | ���� |
java.lang.Objectjava.io.OutputStream
java.io.PipedOutputStream
public class PipedOutputStream
���Խ��ܵ���������ӵ��ܵ�������������ͨ�Źܵ����ܵ�������ǹܵ��ķ��Ͷˡ�ͨ����������ij���߳�д�� PipedOutputStream
�����������̴߳����ӵ� PipedInputStream
��ȡ���������������������ʹ�õ����̣߳���Ϊ�������ܻ���ɸ��߳����������ij���߳��������ӵĹܵ��������ж�ȡ�����ֽڣ������̲߳��ٴ��ڻ״̬����ùܵ�����Ϊ���� �ٻ� ״̬��
PipedInputStream
���췽��ժҪ | |
---|---|
PipedOutputStream()
������δ���ӵ��ܵ��������Ĺܵ�������� |
|
PipedOutputStream(PipedInputStream snk)
�������ӵ�ָ���ܵ��������Ĺܵ�������� |
����ժҪ | |
---|---|
void |
close()
�رմ˹ܵ���������ͷ�������йص�����ϵͳ��Դ�� |
void |
connect(PipedInputStream snk)
���˹ܵ���������ӵ������ߡ� |
void |
flush()
ˢ�´��������ǿ��д�����л��������ֽڡ� |
void |
write(byte[] b,
int off,
int len)
�� len �ֽڴӳ�ʼƫ����Ϊ off ��ָ�� byte ����д��ùܵ�������� |
void |
write(int b)
��ָ�� byte д�봫�͵�������� |
���� java.io.OutputStream �̳еķ��� |
---|
write |
���� java.lang.Object �̳еķ��� |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
���췽����ϸ��Ϣ |
---|
public PipedOutputStream(PipedInputStream snk) throws IOException
snk
�����롣
snk
- Ҫ���ӵĹܵ���������
IOException
- ������� I/O ����public PipedOutputStream()
PipedInputStream.connect(java.io.PipedOutputStream)
,
connect(java.io.PipedInputStream)
������ϸ��Ϣ |
---|
public void connect(PipedInputStream snk) throws IOException
IOException
��
��� snk
��δ���ӵĹܵ����������� src
��δ���ӵĹܵ�������������ͨ�����µ���֮һ�������ǣ�
��src.connect(snk)
���������õ�Ч����ͬ��snk.connect(src)
snk
- Ҫ���ӵĹܵ���������
IOException
- ������� I/O ����public void write(int b) throws IOException
byte
д�봫�͵��������
ʵ�� OutputStream
�� write
������
OutputStream
�е� write
b
- Ҫд��� byte
��
IOException
- ����ܵ������ٻ���δ����
״̬�����߷��� I/O ����public void write(byte[] b, int off, int len) throws IOException
len
�ֽڴӳ�ʼƫ����Ϊ off
��ָ�� byte ����д��ùܵ���������ڽ������ֽ�д�������֮ǰ���˷���һֱ��������״̬��
OutputStream
�е� write
b
- ���ݡ�off
- �����еij�ʼƫ������len
- Ҫд����ֽ�����
IOException
- ����ܵ����� �ٻ���δ����
״̬�����߷��� I/O ����public void flush() throws IOException
Flushable
�е� flush
OutputStream
�е� flush
IOException
- ������� I/O ����public void close() throws IOException
Closeable
�е� close
OutputStream
�е� close
IOException
- ������� I/O ����
|
JavaTM Platform Standard Ed. 6 |
|||||||||
��һ���� ��һ���� | ��� ��� ������ | |||||||||
ժҪ�� Ƕ�� | �ֶ� | ���췽�� | ���� | ��ϸ��Ϣ�� �ֶ� | ���췽�� | ���� |
��Ȩ���� 2007 Sun Microsystems, Inc. ��������Ȩ���� ����������֤��������������ĵ����·ַ�������