|
LHA Library for Java | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjp.gr.java_conf.dangan.util.lha.HashShort
public class HashShort
データパタンの先頭2バイトから 0 〜 4095 のハッシュ値を生成するハッシュ関数。
-- revision history -- $Log: HashShort.java,v $ Revision 1.0 2002/08/05 00:00:00 dangan add to version control [change] HashMethod のインタフェイス変更にあわせてインテフェイス変更。 [maintanance] ソース整備 タブ廃止 ライセンス文の修正
Constructor Summary | |
---|---|
HashShort(byte[] TextBuffer)
データパタンの先頭2バイトから 0x000 〜 0xFFF までの値を生成する ハッシュ関数を構築する。 |
Method Summary | |
---|---|
int |
hash(int position)
ハッシュ関数。 コンストラクタで渡された TextBuffer の position からの データパタンの hash値を生成する。 |
int |
hashRequires()
ハッシュ関数がハッシュ値を生成するために使用するバイト数を得る。 このハッシュ関数はデータパタンの先頭 2 バイトのデータから ハッシュ値を生成するため、このメソッドは常に 2 を返す。 |
int |
tableSize()
ハッシュテーブルのサイズを得る。 このハッシュ関数は 0x000 〜 0xFFF までのハッシュ値を生成するため このメソッドは常に 0x1000(4096) を返す。 |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public HashShort(byte[] TextBuffer)
TextBuffer
- LZSS圧縮用のバッファ。
Hash値生成のため読み込み用に使用する。Method Detail |
---|
public int hash(int position)
hash
in interface HashMethod
position
- データパタンの開始位置
public int hashRequires()
hashRequires
in interface HashMethod
public int tableSize()
tableSize
in interface HashMethod
|
LHA Library for Java | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |