JavaTM Platform
Standard Ed. 6

java.io
�� FilterWriter

java.lang.Object
  �̳��� java.io.Writer
      �̳��� java.io.FilterWriter
������ʵ�ֵĽӿڣ�
Closeable, Flushable, Appendable

public abstract class FilterWriter
extends Writer

����д���ѹ��˵��ַ����ij����ࡣ������ FilterWriter �����ṩ��һЩ���������󴫵ݸ�������������Ĭ�Ϸ�����FilterWriter ������Ӧ��д��Щ�����е�һЩ���������һ������ṩһЩ����ķ������ֶΡ�

�����°汾��ʼ��
JDK1.1

�ֶ�ժҪ
protected  Writer out
          �ײ��ַ��������
 
���� java.io.Writer �̳е��ֶ�
lock
 
���췽��ժҪ
protected FilterWriter(Writer out)
          ����һ���µ� filtered writer��
 
����ժҪ
 void close()
          �رմ�������Ҫ��ˢ������
 void flush()
          ˢ�¸����Ļ��塣
 void write(char[] cbuf, int off, int len)
          ���ַ�д�������ijһ���֡�
 void write(int c)
          д�뵥���ַ���
 void write(String str, int off, int len)
          д��һ�����ַ�����
 
���� java.io.Writer �̳еķ���
append, append, append, write, write
 
���� java.lang.Object �̳еķ���
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

�ֶ���ϸ��Ϣ

out

protected Writer out
�ײ��ַ��������

���췽����ϸ��Ϣ

FilterWriter

protected FilterWriter(Writer out)
����һ���µ� filtered writer��

������
out - �ṩ�ײ����� Writer ����
�׳���
NullPointerException - ��� out Ϊ null
������ϸ��Ϣ

write

public void write(int c)
           throws IOException
д�뵥���ַ���

���ǣ�
�� Writer �е� write
������
c - ָ��Ҫд���ַ��� int��
�׳���
IOException - ������� I/O ����

write

public void write(char[] cbuf,
                  int off,
                  int len)
           throws IOException
���ַ�д�������ijһ���֡�

ָ���ߣ�
�� Writer �е� write
������
cbuf - Ҫд����ַ�������
off - ƫ�������Ӹô���ʼ��ȡ�ַ�
len - Ҫд���ַ�������
�׳���
IOException - ������� I/O ����

write

public void write(String str,
                  int off,
                  int len)
           throws IOException
д��һ�����ַ�����

���ǣ�
�� Writer �е� write
������
str - Ҫд����ַ���
off - ƫ�������Ӹô���ʼ��ȡ�ַ�
len - Ҫд���ַ�������
�׳���
IOException - ������� I/O ����

flush

public void flush()
           throws IOException
ˢ�¸����Ļ��塣

ָ���ߣ�
�ӿ� Flushable �е� flush
ָ���ߣ�
�� Writer �е� flush
�׳���
IOException - ������� I/O ����

close

public void close()
           throws IOException
���� Writer ���Ƶ�����
�رմ�������Ҫ��ˢ�������ڹرո���֮���ٵ��� write() �� flush() �������׳� IOException���ر���ǰ�رյ�����Ч��

ָ���ߣ�
�ӿ� Closeable �е� close
ָ���ߣ�
�� Writer �е� close
�׳���
IOException - ������� I/O ����

JavaTM Platform
Standard Ed. 6

�ύ��������
�йظ���� API �ο����ϺͿ�����Ա�ĵ�������� Java SE ������Ա�ĵ������ĵ���������ϸ�ġ����򿪷���Ա���������Լ�������������ﶨ�塢ʹ�ü��ɺ͹�������ʾ����

��Ȩ���� 2007 Sun Microsystems, Inc. ��������Ȩ���� ����������֤��������������ĵ����·ַ�������