|
|||||||||
| 前のクラス 次のクラス | フレームあり フレームなし | ||||||||
| 概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド | ||||||||
java.lang.Objectjp.go.nict.langrid.repository.StorageUtil
public class StorageUtil
Storageクラスに関するユーティリティメソッドを集めたクラス。
| コンストラクタの概要 | |
|---|---|
StorageUtil()
|
|
| メソッドの概要 | |
|---|---|
static String |
createUniqueEntity(Storage storage,
String prefix)
指定されたプリフィクスを使い、ユニークな名前を作成してストレージを作成する。 |
static byte[] |
loadBytes(Storage storage,
String entityName)
エンティティの内容を読み込む。 |
static String |
loadString(Storage storage,
String entityName,
CharsetDecoder decoder)
エンティティの内容を文字列として読み込む。 |
static void |
storeBytes(Storage storage,
String entityName,
byte[] data)
ストレージ内のエンティティに文字列を書き出す。 |
static void |
storeString(Storage storage,
String entityName,
String data,
CharsetEncoder encoder)
ストレージ内のエンティティに文字列を書き出す。 |
| クラス java.lang.Object から継承されたメソッド |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| コンストラクタの詳細 |
|---|
public StorageUtil()
| メソッドの詳細 |
|---|
public static String createUniqueEntity(Storage storage,
String prefix)
throws IOException
storage - ストレージprefix - ストレージ名の先頭に付加する文字列
IOException - ストレージの作成に失敗した
public static byte[] loadBytes(Storage storage,
String entityName)
throws IOException
storage - エンティティを保持するストレージentityName - エンティティの名前
IOException - 情報の読み込みに失敗した
public static String loadString(Storage storage,
String entityName,
CharsetDecoder decoder)
throws IOException
storage - エンティティを保持するストレージentityName - エンティティの名前decoder - 読み込み時に使用するデコーダ
IOException - 情報の読み込みに失敗した
public static void storeBytes(Storage storage,
String entityName,
byte[] data)
throws IOException
storage - エンティティを保持するストレージentityName - エンティティの名前data - 書き出す文字列
IOException - 情報の書き出しに失敗した
public static void storeString(Storage storage,
String entityName,
String data,
CharsetEncoder encoder)
throws IOException
storage - エンティティを保持するストレージentityName - エンティティの名前data - 書き出す文字列encoder - 文字列のエンコーダ
IOException - 情報の書き出しに失敗した
|
|||||||||
| 前のクラス 次のクラス | フレームあり フレームなし | ||||||||
| 概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド | ||||||||