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