|
|||||||||
| 前のクラス 次のクラス | フレームあり フレームなし | ||||||||
| 概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド | ||||||||
java.lang.Objectjp.go.nict.langrid.repository.file.FileStorage
public class FileStorage
レポジトリ内に格納される各ストレージを実装する。
| コンストラクタの概要 | |
|---|---|
FileStorage(File repositoryPath,
String storageName)
コンストラクタ。 |
|
| メソッドの概要 | |
|---|---|
void |
clearEntities()
ストレージをクリアする。 |
boolean |
create()
ストレージを作成する。 |
boolean |
createEntity(String entityName)
ユニークエンティティを作成する。 |
void |
delete()
ストレージを破棄する。 |
void |
deleteEntity(String entityName)
ストレージ内のエンティティを削除する。 |
boolean |
entityExists(String entityName)
ストレージ内にエンティティが存在するかどうかを返す。 |
boolean |
exists()
ストレージが存在するかどうかを返す。 |
protected File |
getEntityFile(String entityName)
エンティティ名からファイルを取得する。 |
InputStream |
getInputStream(String aFileName)
ストレージ内のエンティティへの読み込みストリームを作成して返す。 |
String |
getName()
ストレージの名前を取得する。 |
OutputStream |
getOutputStream(String entityName)
ストレージ内のエンティティへの書き出しストリームを作成して返す。 |
protected File |
getStorageFile(File repositoryPath,
String storageName)
|
String[] |
listEntityNames()
エンティティ名を列挙する。 |
| クラス java.lang.Object から継承されたメソッド |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| コンストラクタの詳細 |
|---|
public FileStorage(File repositoryPath,
String storageName)
repositoryPath - レポジトリのパスstorageName - このストレージの名前| メソッドの詳細 |
|---|
public String getName()
Storage 内の getNamepublic boolean exists()
Storage 内の existspublic boolean create()
Storage 内の create
public void delete()
throws IOException
Storage 内の deleteIOException - 削除に失敗したpublic String[] listEntityNames()
Storage 内の listEntityNames
public void clearEntities()
throws IOException
Storage 内の clearEntitiesFileNotFoundException - ストレージが見つからない
IOException - 削除に失敗したpublic boolean entityExists(String entityName)
Storage 内の entityExistsentityName - 存在を確認するファイル名
public InputStream getInputStream(String aFileName)
throws IOException
Storage 内の getInputStreamaFileName - ストリームを作成するエンティティ名
FileNotFoundException - 情報を読み込むファイルを開けない
IOException - 入力ストリームの取得に失敗した
public OutputStream getOutputStream(String entityName)
throws IOException
Storage 内の getOutputStreamentityName - ストリームを作成するエンティティ名
FileNotFoundException - 情報を書き出すファイルを開けない
IOException - 出力ストリームの取得に失敗した
public boolean createEntity(String entityName)
throws IOException
Storage 内の createEntityentityName - エンティティ名
IOException - エンティティの作成に失敗した
public void deleteEntity(String entityName)
throws IOException
Storage 内の deleteEntityentityName - エンティティ名
IOException - 削除に失敗した
protected File getStorageFile(File repositoryPath,
String storageName)
protected File getEntityFile(String entityName)
entityName - ファイルを取得するエンティティ名
|
|||||||||
| 前のクラス 次のクラス | フレームあり フレームなし | ||||||||
| 概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド | ||||||||