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