T - Storageインタフェースを継承したクラスpublic interface Storage<T extends Storage<T>> extends Serializable, Comparable<T>
| 修飾子とタイプ | フィールドと説明 |
|---|---|
static Charset |
CHARSET
キャラセット
|
static String |
FILE_SEPARATOR
ファイルセパレータ
|
static char |
FILE_SEPARATOR_CHAR
ファイルセパレータ
|
| 修飾子とタイプ | メソッドと説明 |
|---|---|
OutputStream |
append()
このストレージの出力ストリームを追記モードで取得します。
|
void |
append(CharSequence src)
文字列を標準のキャラセットでこのストレージに追記します。
|
void |
append(CharSequence src,
Charset charset)
文字列を指定されたキャラセットで変換しこのストレージに追記します。
|
void |
append(CharSequence src,
String charsetName)
文字列を指定されたキャラセット名で変換しこのストレージに追記します。
|
int |
compareTo(T storage)
2 つのストレージを語彙的に比較します。
|
void |
copy(T to,
boolean overwrite)
このファイル、またはディレクトリを引数で指定された対象にコピーします。
|
OutputStream |
create()
このストレージの出力ストリームを取得します。
|
Collection<String> |
directories()
このストレージが示すディレクトリの配下にあるディレクトリのパスのコレクションを返します。
|
Collection<String> |
directories(boolean recursive)
このストレージが示すディレクトリの配下にあるディレクトリのパスのコレクションを返します。
|
Collection<T> |
directoriesStorages()
このストレージが示すディレクトリ内のディレクトリを示すストレージのコレクションを返します。
|
Collection<T> |
directoriesStorages(boolean recursive)
このストレージが示すディレクトリ内のディレクトリを示すストレージのコレクションを返します。
|
boolean |
equals(Object obj)
このオブジェクトと「等価」になるオブジェクトがあるかどうかを示します。
|
boolean |
exists()
このストレージが示すファイルまたはディレクトリが存在するかどうかを判定します。
|
Collection<String> |
files()
このストレージが示すディレクトリの配下にあるファイルのパスのコレクションを返します。
|
Collection<String> |
files(boolean recursive)
このストレージが示すディレクトリの配下にあるファイルのパスのコレクションを返します。
|
Collection<T> |
filesStorages()
このストレージが示すディレクトリ内のファイルを示すストレージのコレクションを返します。
|
Collection<T> |
filesStorages(boolean recursive)
このストレージが示すディレクトリ内のファイルを示すストレージのコレクションを返します。
|
String |
getCanonicalPath()
正規化したパスを返します。
|
String |
getName()
このストレージが示すファイルまたはディレクトリの名前を返します。
|
String |
getParent()
親パスを返します。
|
T |
getParentStorage()
親ストレージを返します。
|
String |
getPath()
パス名文字列を返します。
|
String |
getRelativePath(T target)
このストレージとの相対パスを返します。
|
T |
getRootStorage()
ルートストレージを返します。
|
int |
hashCode()
オブジェクトのハッシュコード値を返します。
|
boolean |
isDirectory()
このストレージが示すファイルがディレクトリであるかどうかを判定します。
|
boolean |
isFile()
このストレージが示すファイルが普通のファイルかどうかを判定します。
|
long |
lastModified()
このストレージが示すファイルが最後に変更された時刻を返します。
|
long |
length()
このストレージが指定されているファイルの長さを返します。
|
Collection<String> |
list()
このストレージが示すディレクトリの配下にあるファイル、および、ディレクトリのパスのコレクションを返します。
|
Collection<String> |
list(boolean recursive)
このストレージが示すディレクトリの配下にあるファイル、および、ディレクトリのパスのコレクションを返します。
|
Collection<String> |
list(StoragenameFilter<T> filter)
このストレージが示すディレクトリにあるファイルおよびディレクトリの中で、指定されたフィルタの基準を満たすもののパスのコレクションを返します。
|
Collection<T> |
listStorages()
このストレージが示すディレクトリ内のファイルおよびディレクトリを示すストレージのコレクションを返します。
|
Collection<T> |
listStorages(boolean recursive)
このストレージが示すディレクトリ内のファイルおよびディレクトリを示すストレージのコレクションを返します。
|
Collection<T> |
listStorages(StorageFilter<T> filter)
このストレージが示すディレクトリにあるファイルおよびディレクトリの中で、指定されたフィルタの基準を満たすもののストレージのコレクションを返します。
|
Collection<T> |
listStorages(StoragenameFilter<T> filter)
このストレージが示すディレクトリにあるファイルおよびディレクトリの中で、指定されたフィルタの基準を満たすもののストレージのコレクションを返します。
|
byte[] |
load()
このストレージの内容をバイト配列で取得します。
|
boolean |
makeDirectories()
このストレージが示すディレクトリを生成します。
|
boolean |
move(CharSequence newPath)
このストレージが示すファイルを移動します。
|
InputStream |
open()
このストレージの入力ストリームを取得します。
|
String |
read()
このストレージの内容を標準のキャラセットで変換し文字列で取得します。
|
String |
read(Charset charset)
このストレージの内容を指定されたキャラセットで変換し文字列で取得します。
|
String |
read(String charsetName)
このストレージの内容を指定されたキャラセット名で変換し文字列で取得します。
|
boolean |
remove()
このストレージが示すファイルまたはディレクトリを削除します。
|
boolean |
remove(boolean recursive)
このストレージが示すファイルまたはディレクトリを削除します。
|
T |
resolve(CharSequence other)
このストレージから相対ストレージを返します。
|
void |
save(byte[] byteArray)
バイト配列をこのストレージに書き込みます。
|
void |
write(CharSequence src)
文字列を標準のキャラセットでこのストレージに書き込みます。
|
void |
write(CharSequence src,
Charset charset)
文字列を指定されたキャラセットでこのストレージに書き込みます。
|
void |
write(CharSequence src,
String charsetName)
文字列を指定されたキャラセット名でこのストレージに書き込みます。
|
static final char FILE_SEPARATOR_CHAR
static final String FILE_SEPARATOR
static final Charset CHARSET
String getName()
T getRootStorage() throws IOException
IOException - ルートストレージの取得に失敗した場合String getParent()
T getParentStorage() throws IOException
IOException - 親ストレージの取得に失敗した場合T resolve(CharSequence other) throws IOException
other - このストレージからの相対パスIOException - 相対ストレージの取得に失敗した場合String getPath()
String getCanonicalPath() throws IOException
IOException - 正規化したパスの取得に失敗した場合String getRelativePath(T target) throws IOException
target - 比較対象ストレージIOException - 相対パスの取得に失敗した場合boolean exists()
throws IOException
IOException - 判定に失敗した場合boolean isDirectory()
throws IOException
IOException - 判定に失敗した場合boolean isFile()
throws IOException
IOException - 判定に失敗した場合long lastModified()
throws IOException
IOException - 取得に失敗した場合long length()
throws IOException
IOException - 取得に失敗した場合Collection<String> list() throws IOException
list(false)と動作は一緒です。IOException - 取得に失敗した場合Collection<String> list(boolean recursive) throws IOException
ROOT
┗directory-1
┗directory-1-1
┣directory-1-1-1
┃┣directory-1-1-1-1
┃┗file-1-1-1-2
┣directory-1-1-2
┣file-1-1-3
┗file-1-1-4
上記のようなファイル構成である場合、recursive - ディレクトリを再帰的に探索する場合は true、そうでない場合は falseIOException - 取得に失敗した場合Collection<String> list(StoragenameFilter<T> filter) throws IOException
filter - パスフィルタIOException - 取得に失敗した場合Collection<T> listStorages() throws IOException
IOException - 取得に失敗した場合Collection<T> listStorages(boolean recursive) throws IOException
recursive - ディレクトリを再帰的に探索する場合は true、そうでない場合は falseIOException - 取得に失敗した場合Collection<T> listStorages(StoragenameFilter<T> filter) throws IOException
filter - ストレージフィルタIOException - 取得に失敗した場合Collection<T> listStorages(StorageFilter<T> filter) throws IOException
filter - ストレージフィルタIOException - 取得に失敗した場合int compareTo(T storage)
compareTo インタフェース内 Comparable<T extends Storage<T>>storage - このストレージと比較されるストレージComparable.compareTo(java.lang.Object)boolean equals(Object obj)
void append(CharSequence src) throws IOException
src - 文字列IOException - 追記に失敗した場合void append(CharSequence src, String charsetName) throws IOException
src - 文字列charsetName - キャラセット名IOException - 追記に失敗した場合void append(CharSequence src, Charset charset) throws IOException
src - 文字列charset - キャラセットIOException - 追記に失敗した場合Collection<String> directories() throws IOException
directories(false)と動作は一緒です。IOException - 取得に失敗した場合Collection<String> directories(boolean recursive) throws IOException
ROOT
┗directory-1
┗directory-1-1
┣directory-1-1-1
┃┣directory-1-1-1-1
┃┗file-1-1-1-2
┣directory-1-1-2
┣file-1-1-3
┗file-1-1-4
上記のようなファイル構成である場合、recursive - ディレクトリを再帰的に探索する場合は true、そうでない場合は falseIOException - 取得に失敗した場合Collection<String> files() throws IOException
IOException - 取得に失敗した場合Collection<String> files(boolean recursive) throws IOException
ROOT
┗directory-1
┗directory-1-1
┣directory-1-1-1
┃┣directory-1-1-1-1
┃┗file-1-1-1-2
┣directory-1-1-2
┣file-1-1-3
┗file-1-1-4
上記のようなファイル構成である場合、recursive - ディレクトリを再帰的に探索する場合は true、そうでない場合は falseIOException - 取得に失敗した場合Collection<T> directoriesStorages() throws IOException
IOException - 取得に失敗した場合Collection<T> directoriesStorages(boolean recursive) throws IOException
recursive - ディレクトリを再帰的に探索する場合は true、そうでない場合は falseIOException - 取得に失敗した場合Collection<T> filesStorages() throws IOException
IOException - 取得に失敗した場合Collection<T> filesStorages(boolean recursive) throws IOException
recursive - ディレクトリを再帰的に探索する場合は true、そうでない場合は falseIOException - 取得に失敗した場合byte[] load()
throws IOException
IOException - 取得に失敗した場合boolean makeDirectories()
throws IOException
IOException - 作成に失敗した場合boolean move(CharSequence newPath) throws IOException
newPath - このストレージの新しいパスIOException - 移動に失敗した場合String read() throws IOException
IOException - 取得に失敗した場合String read(String charsetName) throws IOException
charsetName - キャラセット名IOException - 取得に失敗した場合String read(Charset charset) throws IOException
charset - キャラセットIOException - 取得に失敗した場合boolean remove()
throws IOException
IOException - 削除に失敗した場合boolean remove(boolean recursive)
throws IOException
recursive - 再帰的に削除する場合はtrueを指定してくださいIOException - 削除に失敗した場合void save(byte[] byteArray) throws IOException
byteArray - バイト配列IOException - 書き込みに失敗した場合void write(CharSequence src) throws IOException
src - 文字列IOException - 書き込みに失敗した場合void write(CharSequence src, String charsetName) throws IOException
src - 文字列charsetName - キャラセット名IOException - 書き込みに失敗した場合void write(CharSequence src, Charset charset) throws IOException
src - 文字列charset - キャラセットIOException - 書き込みに失敗した場合InputStream open() throws IOException
IOException - 入力ストリームの取得に失敗した場合OutputStream create() throws IOException
IOException - 出力ストリームの取得に失敗した場合OutputStream append() throws IOException
IOException - 出力ストリームの取得に失敗した場合void copy(T to, boolean overwrite) throws IOException
remove(boolean)を呼び出した後このメソッドを実行して下さい)to - コピー先overwrite - trueの場合上書きしますIOException - コピーに失敗した場合Copyright © 2012 NTT DATA INTRAMART CORPORATION