|
JavaTM 2 Platform Standard Ed. 6 |
|||||||||
| 上一個類別 下一個類別 | 框架 無框架 | |||||||||
| 摘要: 巢狀 | 欄位 | 建構子 | 方法 | 詳細資訊: 欄位 | 建構子 | 方法 | |||||||||
java.lang.Objectjava.io.Writer
java.io.FilterWriter
public abstract class FilterWriter
用於寫入已過濾的字元串流的抽象類別。抽象類別 FilterWriter 自身提供了一些將所有請求傳遞給所包含的串流的預設方法。FilterWriter 的子類別應覆寫這些方法中的一些方法,並且還可以提供一些額外的方法和欄位。
| 欄位摘要 | |
|---|---|
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)
將字元寫入陣列的某一部分。 |
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 |
| 欄位詳細資訊 |
|---|
protected Writer out
| 建構子詳細資訊 |
|---|
protected FilterWriter(Writer out)
out - 提供底層串流的 Writer 物件。
NullPointerException - 如果 out 為 null| 方法詳細資訊 |
|---|
public void write(int c)
throws IOException
Writer 中的 writec - 指定要寫入字元的 int。
IOException - 如果發生 I/O 錯誤
public void write(char[] cbuf,
int off,
int len)
throws IOException
Writer 中的 writecbuf - 要寫入的字元緩衝區off - 偏移量,從該處開始讀取字元len - 要寫入字元的數量
IOException - 如果發生 I/O 錯誤
public void write(String str,
int off,
int len)
throws IOException
Writer 中的 writestr - 要寫入的字元串off - 偏移量,從該處開始讀取字元len - 要寫入字元的數量
IOException - 如果發生 I/O 錯誤
public void flush()
throws IOException
Flushable 中的 flushWriter 中的 flushIOException - 如果發生 I/O 錯誤
public void close()
throws IOException
Writer 複製的描述
Closeable 中的 closeWriter 中的 closeIOException - 如果發生 I/O 錯誤
|
JavaTM 2 Platform Standard Ed. 6 |
|||||||||
| 上一個類別 下一個類別 | 框架 無框架 | |||||||||
| 摘要: 巢狀 | 欄位 | 建構子 | 方法 | 詳細資訊: 欄位 | 建構子 | 方法 | |||||||||
版權所有 2008 Sun Microsystems, Inc. 保留所有權利。請遵守GNU General Public License, version 2 only。