org.seasar.extension.jdbc.gen.internal.util
クラス DeleteEmptyFileWriter

java.lang.Object
  上位を拡張 java.io.Writer
      上位を拡張 java.io.FilterWriter
          上位を拡張 org.seasar.extension.jdbc.gen.internal.util.DeleteEmptyFileWriter
すべての実装されたインタフェース:
java.io.Closeable, java.io.Flushable, java.lang.Appendable

public class DeleteEmptyFileWriter
extends java.io.FilterWriter

空のファイルを削除するWriterの実装です。

作成者:
taedium

フィールドの概要
protected  boolean deleted
          削除された場合true
protected  java.io.File file
          書き込み先のファイル
protected  boolean written
          書き込みが行われた場合true
 
クラス java.io.FilterWriter から継承されたフィールド
out
 
クラス java.io.Writer から継承されたフィールド
lock
 
コンストラクタの概要
DeleteEmptyFileWriter(java.io.Writer writer, java.io.File file)
          コンストラクタを構築します。
 
メソッドの概要
 void close()
           
 boolean isDeleted()
          ファイルが削除された場合trueを返します。
protected  boolean isEmpty()
          ファイルが空の場合にtrueを返します。
 void write(char[] cbuf, int off, int len)
           
 void write(int c)
           
 void write(java.lang.String str, int off, int len)
           
 
クラス java.io.FilterWriter から継承されたメソッド
flush
 
クラス java.io.Writer から継承されたメソッド
append, append, append, write, write
 
クラス java.lang.Object から継承されたメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

フィールドの詳細

written

protected boolean written
書き込みが行われた場合true


deleted

protected boolean deleted
削除された場合true


file

protected java.io.File file
書き込み先のファイル

コンストラクタの詳細

DeleteEmptyFileWriter

public DeleteEmptyFileWriter(java.io.Writer writer,
                             java.io.File file)
コンストラクタを構築します。

パラメータ:
writer - ライタ
file - 書き込み先のファイル
メソッドの詳細

close

public void close()
           throws java.io.IOException
定義:
インタフェース java.io.Closeable 内の close
オーバーライド:
クラス java.io.FilterWriter 内の close
例外:
java.io.IOException

write

public void write(char[] cbuf,
                  int off,
                  int len)
           throws java.io.IOException
オーバーライド:
クラス java.io.FilterWriter 内の write
例外:
java.io.IOException

write

public void write(int c)
           throws java.io.IOException
オーバーライド:
クラス java.io.FilterWriter 内の write
例外:
java.io.IOException

write

public void write(java.lang.String str,
                  int off,
                  int len)
           throws java.io.IOException
オーバーライド:
クラス java.io.FilterWriter 内の write
例外:
java.io.IOException

isEmpty

protected boolean isEmpty()
ファイルが空の場合にtrueを返します。

戻り値:
ファイルが空の場合はtrue、そうでない場合false

isDeleted

public boolean isDeleted()
ファイルが削除された場合trueを返します。

戻り値:
削除された場合true、そうでない場合false


Copyright © 2004-2014 The Seasar Foundation. All Rights Reserved.