public abstract class AbstractRandomAccessFileBuilder extends Object implements RandomBuilder
| 修飾子とタイプ | クラスと説明 | 
|---|---|
| protected class  | AbstractRandomAccessFileBuilder.Block | 
RandomBuilder.PositionInfo| 修飾子とタイプ | フィールドと説明 | 
|---|---|
| protected File | file | 
| protected AbstractRandomAccessFileBuilder.Block | first | 
| protected List<AbstractRandomAccessFileBuilder.Block> | 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)断片にデータを追加します。 | 
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitfinishprotected RandomAccessFile raf
protected File file
protected List<AbstractRandomAccessFileBuilder.Block> frgs
protected AbstractRandomAccessFileBuilder.Block first
protected AbstractRandomAccessFileBuilder.Block last
protected long length
protected long onMemory
protected int segment
public AbstractRandomAccessFileBuilder(int fragmentBufferSize,
                                       int totalBufferSize,
                                       int threshold)
public AbstractRandomAccessFileBuilder()
protected int nextId()
              throws IOException
IOExceptionprotected AbstractRandomAccessFileBuilder.Block getBlock(int id) throws IOException
IOExceptionprotected void putBlock(int id,
                        AbstractRandomAccessFileBuilder.Block frg)
public RandomBuilder.PositionInfo getPositionInfo()
RandomBuildergetPositionInfo インタフェース内 RandomBuilderpublic boolean supportsPositionInfo()
RandomBuildersupportsPositionInfo インタフェース内 RandomBuilderpublic void addBlock()
              throws IOException
RandomBuilderaddBlock インタフェース内 RandomBuilderIOExceptionpublic void insertBlockBefore(int anchorId)
                       throws IOException
RandomBuilderinsertBlockBefore インタフェース内 RandomBuilderanchorId - 断片のID。IOExceptionpublic void write(int id,
                  byte[] b,
                  int off,
                  int len)
           throws IOException
RandomBuilderwrite インタフェース内 RandomBuilderid - 断片のID。b - バイト列。off - バイト列中のデータの開始位置。len - バイト列中のデータの長さ。IOExceptionpublic void closeBlock(int id)
                throws IOException
RandomBuildercloseBlock インタフェース内 RandomBuilderid - 断片のID。IOExceptionprotected void finish(OutputStream out) throws IOException
IOExceptionpublic long getLength()
public void dispose()
RandomBuilder構築のためのリソースを破棄します。
RandomBuilder は処理のために一時ファイルなどのリソースを使用するため、 不要となったオブジェクトに対しては必ずdispose()を呼び出してください。
dispose インタフェース内 RandomBuilderprotected void finalize()
                 throws IOException
finalize クラス内 ObjectIOExceptionCopyright © 2024 座間ソフト. All rights reserved.