com.JRcServer.commons.resource
インタフェース BinResource

既知の実装クラスの一覧:
BinCacheResource, BinFileResource, BinMemoryResource

public interface BinResource

バイナリリソースインターフェイス.

バイナリリソース情報を扱うインターフェイスを提供します.

導入されたバージョン:
JRcCommons 1.00
バージョン:
1.00, 2005/04/01
作成者:
Masahito Suzuki

フィールドの概要
static int BIN_RESOURCE_TYPE_CACHE
          バイナリリソースタイプ : キャッシュファイル.
static int BIN_RESOURCE_TYPE_FILE
          バイナリリソースタイプ : ファイル.
static int BIN_RESOURCE_TYPE_MEMORY
          バイナリリソースタイプ : メモリー.
 
メソッドの概要
 void clear()
          情報クリア.
 int get(int no)
          情報取得.
 int getAllSize()
          現在のバイナリ長を取得.
 byte[] getBinary()
          バイナリ情報を取得.
 int getBinary(BinResource out)
          バイナリ情報を取得.
 int getBinary(BinResource out, int no)
          バイナリ情報を取得.
 int getBinary(BinResource out, int no, int off, int len)
          バイナリ情報を取得.
 int getBinary(byte[] out)
          バイナリ情報を取得.
 int getBinary(byte[] out, int no)
          バイナリ情報を取得.
 int getBinary(byte[] out, int no, int off, int len)
          バイナリ情報を取得.
 byte[] getBinary(int no)
          バイナリ情報を取得.
 byte[] getBinary(int no, int len)
          バイナリ情報を取得.
 int getType()
          オブジェクトタイプを取得.
 boolean isUse()
          オブジェクト有効チェック.
 void reset()
          リセット処理.
 void set(int no, int b)
          情報設定.
 int setBinary(int no, BinResource bin)
          バイナリ情報設定.
 int setBinary(int no, BinResource bin, int off, int len)
          バイナリ情報設定.
 int setBinary(int no, byte[] bin)
          バイナリ情報設定.
 int setBinary(int no, byte[] bin, int off, int len)
          バイナリ情報設定.
 int size()
          現在の有効バイナリ長を取得.
 

フィールドの詳細

BIN_RESOURCE_TYPE_MEMORY

static final int BIN_RESOURCE_TYPE_MEMORY
バイナリリソースタイプ : メモリー.

関連項目:
定数フィールド値

BIN_RESOURCE_TYPE_FILE

static final int BIN_RESOURCE_TYPE_FILE
バイナリリソースタイプ : ファイル.

関連項目:
定数フィールド値

BIN_RESOURCE_TYPE_CACHE

static final int BIN_RESOURCE_TYPE_CACHE
バイナリリソースタイプ : キャッシュファイル.

関連項目:
定数フィールド値
メソッドの詳細

clear

void clear()
情報クリア.

情報をクリアします.


reset

void reset()
リセット処理.

有効データ長をリセットします.


set

void set(int no,
         int b)
情報設定.

対象条件に情報を設定します.

パラメータ:
no - 設定対象項番を設定します.
b - 設定対象のバイト情報を設定します.

setBinary

int setBinary(int no,
              byte[] bin)
              throws java.lang.ArrayIndexOutOfBoundsException
バイナリ情報設定.

対象のバイナリ情報を設定します.

パラメータ:
no - 設定開始位置となる項番を設定します.
bin - 設定対象のバイナリ情報を設定します.
戻り値:
int 設定されたバイナリ長が返されます.
例外:
java.lang.ArrayIndexOutOfBoundsException - 不正インデックス例外.

setBinary

int setBinary(int no,
              byte[] bin,
              int off,
              int len)
              throws java.lang.ArrayIndexOutOfBoundsException
バイナリ情報設定.

対象のバイナリ情報を設定します.

パラメータ:
no - 設定開始位置となる項番を設定します.
bin - 設定対象のバイナリ情報を設定します.
off - 設定対象のオフセット値を設定します.
len - 設定対象のバイナリ長を設定します.
戻り値:
int 設定されたバイナリ長が返されます.
例外:
java.lang.ArrayIndexOutOfBoundsException - 不正インデックス例外.

setBinary

int setBinary(int no,
              BinResource bin)
              throws java.lang.ArrayIndexOutOfBoundsException
バイナリ情報設定.

対象のバイナリ情報を設定します.

パラメータ:
no - 設定開始位置となる項番を設定します.
bin - 設定対象のバイナリオブジェクトを設定します.
戻り値:
int 設定されたバイナリ長が返されます.
例外:
java.lang.ArrayIndexOutOfBoundsException - 不正インデックス例外.

setBinary

int setBinary(int no,
              BinResource bin,
              int off,
              int len)
              throws java.lang.ArrayIndexOutOfBoundsException
バイナリ情報設定.

対象のバイナリ情報を設定します.

パラメータ:
no - 設定開始位置となる項番を設定します.
bin - 設定対象のバイナリオブジェクトを設定します.
off - 設定対象のオフセット値を設定します.
len - 設定対象のバイナリ長を設定します.
戻り値:
int 設定されたバイナリ長が返されます.
例外:
java.lang.ArrayIndexOutOfBoundsException - 不正インデックス例外.

get

int get(int no)
        throws java.lang.ArrayIndexOutOfBoundsException
情報取得.

対象条件の情報を取得します.

パラメータ:
no - 取得対象項番を設定します.
戻り値:
int 対象のバイナリ情報が返されます.
例外:
java.lang.ArrayIndexOutOfBoundsException - 不正インデックス例外.

getBinary

byte[] getBinary()
バイナリ情報を取得.

格納されているバイナリ情報を取得します.

戻り値:
byte[] 設定されているバイナリ情報が返されます.

getBinary

byte[] getBinary(int no)
                 throws java.lang.ArrayIndexOutOfBoundsException
バイナリ情報を取得.

対象のバイナリ情報を取得します.

パラメータ:
no - 取得開始位置となる項番を設定します.
戻り値:
byte[] 取得されたバイナリ情報が返されます.
例外:
java.lang.ArrayIndexOutOfBoundsException - 不正インデックス例外.

getBinary

byte[] getBinary(int no,
                 int len)
                 throws java.lang.ArrayIndexOutOfBoundsException
バイナリ情報を取得.

対象のバイナリ情報を取得します.

パラメータ:
no - 取得開始位置となる項番を設定します.
len - 取得対象のバイナリ長を設定します.
戻り値:
byte[] 取得されたバイナリ情報が返されます.
例外:
java.lang.ArrayIndexOutOfBoundsException - 不正インデックス例外.

getBinary

int getBinary(byte[] out)
バイナリ情報を取得.

格納されているバイナリ情報を取得します.

パラメータ:
out - 取得対象のバイナリ情報が返されます.
戻り値:
int 取得されたバイナリ長が返されます.

getBinary

int getBinary(byte[] out,
              int no)
              throws java.lang.ArrayIndexOutOfBoundsException
バイナリ情報を取得.

対象のバイナリ情報を取得します.

パラメータ:
out - 取得対象のバイナリ情報が返されます.
no - 取得開始位置となる項番を設定します.
戻り値:
int 取得されたバイナリ長が返されます.
例外:
java.lang.ArrayIndexOutOfBoundsException - 不正インデックス例外.

getBinary

int getBinary(byte[] out,
              int no,
              int off,
              int len)
              throws java.lang.ArrayIndexOutOfBoundsException
バイナリ情報を取得.

対象のバイナリ情報を取得します.

パラメータ:
out - 取得対象のバイナリ情報が返されます.
no - 取得開始位置となる項番を設定します.
off - 取得対象のバイナリオフセット値を設定します.
len - 取得対象のバイナリ長を設定します.
戻り値:
int 取得されたバイナリ長が返されます.
例外:
java.lang.ArrayIndexOutOfBoundsException - 不正インデックス例外.

getBinary

int getBinary(BinResource out)
バイナリ情報を取得.

格納されているバイナリ情報を取得します.

パラメータ:
out - 取得対象のバイナリ情報が返されます.
戻り値:
int 取得されたバイナリ長が返されます.

getBinary

int getBinary(BinResource out,
              int no)
              throws java.lang.ArrayIndexOutOfBoundsException
バイナリ情報を取得.

対象のバイナリ情報を取得します.

パラメータ:
out - 取得対象のバイナリ情報が返されます.
no - 取得開始位置となる項番を設定します.
戻り値:
int 取得されたバイナリ長が返されます.
例外:
java.lang.ArrayIndexOutOfBoundsException - 不正インデックス例外.

getBinary

int getBinary(BinResource out,
              int no,
              int off,
              int len)
              throws java.lang.ArrayIndexOutOfBoundsException
バイナリ情報を取得.

対象のバイナリ情報を取得します.

パラメータ:
out - 取得対象のバイナリ情報が返されます.
no - 取得開始位置となる項番を設定します.
off - 取得対象のバイナリオフセット値を設定します.
len - 取得対象のバイナリ長を設定します.
戻り値:
int 取得されたバイナリ長が返されます.
例外:
java.lang.ArrayIndexOutOfBoundsException - 不正インデックス例外.

size

int size()
現在の有効バイナリ長を取得.

現在の有効なバイナリ長を取得します.

戻り値:
int 現在の有効なバイナリ長が返されます.

getAllSize

int getAllSize()
現在のバイナリ長を取得.

現在のバイナリ長を取得します.

戻り値:
int 現在のバイナリ長が返されます.

getType

int getType()
オブジェクトタイプを取得.

オブジェクトタイプを取得します.

戻り値:
int オブジェクトタイプが返されます.
[BinResource#BIN_RESOURCE_TYPE_MEMORY]が返された場合、 [com.JRcServer.commons.resource.BinMemoryResource]オブジェクトです.
[BinResource#BIN_RESOURCE_TYPE_FILE]が返された場合、 [com.JRcServer.commons.resource.BinFileResource]オブジェクトです.
[BinResource#BIN_RESOURCE_TYPE_CACHE]が返された場合、 [com.JRcServer.commons.resource.BinCacheResource]オブジェクトです.

isUse

boolean isUse()
オブジェクト有効チェック.

オブジェクトが有効であるかチェックします.

戻り値:
boolean チェック結果が返されます.
[true]が返された場合有効です.
[false]が返された場合無効です.