jp.cssj.rsr.impl
クラス AbstractRandomAccessFileBuilder

java.lang.Object
  拡張jp.cssj.rsr.impl.AbstractRandomAccessFileBuilder
すべての実装インタフェース:
RandomBuilder
直系の既知のサブクラス:
FileRandomBuilder, StreamRandomBuilder

public abstract class AbstractRandomAccessFileBuilder
extends Object
implements RandomBuilder

ファイルシステムを使って結果を生成します。

バージョン:
$Id: AbstractRandomAccessFileBuilder.java 324 2009-08-02 05:51:25Z miyabe $
作成者:
MIYABE Tatsuhiko

入れ子クラスの概要
protected  class AbstractRandomAccessFileBuilder.Block
           
 
クラス jp.cssj.rsr.RandomBuilder から継承した入れ子クラス
RandomBuilder.PositionInfo
 
フィールドの概要
protected  File file
           
protected  AbstractRandomAccessFileBuilder.Block first
           
protected  List frgs
           
protected  AbstractRandomAccessFileBuilder.Block last
           
protected  long length
           
protected  long onMemory
           
protected  RandomAccessFile raf
           
protected  int segment
           
 
コンストラクタの概要
AbstractRandomAccessFileBuilder()
           
AbstractRandomAccessFileBuilder(int fragmentBufferSize, int totalBufferSize, int threshold)
           
 
メソッドの概要
 void addBlock()
          断片を追加します。
 void closeBlock(int id)
          断片への書き込みを終了します。
 void dispose()
          構築のためのリソースを破棄して初期状態に戻します。
protected  void finalize()
           
protected  void finish(OutputStream out)
           
protected  AbstractRandomAccessFileBuilder.Block getBlock(int id)
           
 long getLength()
           
 RandomBuilder.PositionInfo getPositionInfo()
          現在の断片の位置情報を返します(任意のオペレーション)。
 void insertBlockBefore(int anchorId)
          断片を挿入します。
protected  int nextId()
           
protected  void putBlock(int id, AbstractRandomAccessFileBuilder.Block frg)
           
 boolean supportsPositionInfo()
          位置情報をサポートしているかどうかを返します。
 void write(int id, byte[] b, int off, int len)
          データを断片に追加します。
 
クラス java.lang.Object から継承したメソッド
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
インタフェース jp.cssj.rsr.RandomBuilder から継承したメソッド
finish
 

フィールドの詳細

raf

protected RandomAccessFile raf

file

protected File file

frgs

protected List frgs

first

protected AbstractRandomAccessFileBuilder.Block first

last

protected AbstractRandomAccessFileBuilder.Block last

length

protected long length

onMemory

protected long onMemory

segment

protected int segment
コンストラクタの詳細

AbstractRandomAccessFileBuilder

public AbstractRandomAccessFileBuilder(int fragmentBufferSize,
                                       int totalBufferSize,
                                       int threshold)

AbstractRandomAccessFileBuilder

public AbstractRandomAccessFileBuilder()
メソッドの詳細

nextId

protected int nextId()
              throws IOException
例外:
IOException

getBlock

protected AbstractRandomAccessFileBuilder.Block getBlock(int id)
                                                  throws IOException
例外:
IOException

putBlock

protected void putBlock(int id,
                        AbstractRandomAccessFileBuilder.Block frg)

getPositionInfo

public RandomBuilder.PositionInfo getPositionInfo()
インタフェース RandomBuilder の記述:
現在の断片の位置情報を返します(任意のオペレーション)。

定義:
インタフェース RandomBuilder 内の getPositionInfo
戻り値:
位置情報。

supportsPositionInfo

public boolean supportsPositionInfo()
インタフェース RandomBuilder の記述:
位置情報をサポートしているかどうかを返します。

定義:
インタフェース RandomBuilder 内の supportsPositionInfo
戻り値:
位置情報をサポートしていればtrue。

addBlock

public void addBlock()
              throws IOException
インタフェース RandomBuilder の記述:
断片を追加します。

定義:
インタフェース RandomBuilder 内の addBlock
例外:
IOException

insertBlockBefore

public void insertBlockBefore(int anchorId)
                       throws IOException
インタフェース RandomBuilder の記述:
断片を挿入します。

定義:
インタフェース RandomBuilder 内の insertBlockBefore
パラメータ:
anchorId - 断片のID。
例外:
IOException

write

public void write(int id,
                  byte[] b,
                  int off,
                  int len)
           throws IOException
インタフェース RandomBuilder の記述:
データを断片に追加します。

定義:
インタフェース RandomBuilder 内の write
パラメータ:
id - 断片のID。
b - バイト列。
off - バイト列中のデータの開始位置。
len - バイト列中のデータの長さ。
例外:
IOException

closeBlock

public void closeBlock(int id)
                throws IOException
インタフェース RandomBuilder の記述:
断片への書き込みを終了します。 この呼び出しは必須ではありませんが、データの構築を効率化する可能性があります。

定義:
インタフェース RandomBuilder 内の closeBlock
パラメータ:
id - 断片のID。
例外:
IOException

finish

protected void finish(OutputStream out)
               throws IOException
例外:
IOException

getLength

public long getLength()

dispose

public void dispose()
インタフェース RandomBuilder の記述:
構築のためのリソースを破棄して初期状態に戻します。

定義:
インタフェース RandomBuilder 内の dispose

finalize

protected void finalize()
                 throws IOException
例外:
IOException


(c)2008-2009 GNN & Co.,Ltd.