feat2.config
クラス URLFileLocator

java.lang.Object
  拡張feat2.config.URLFileLocator
すべての実装インタフェース:
FileLocator

public class URLFileLocator
extends java.lang.Object
implements FileLocator

URLを使って実装したFileLocator。

作成者:
SUGIMOTO Ken-ichi

コンストラクタの概要
URLFileLocator(java.net.URL path)
           
 
メソッドの概要
 boolean equals(java.lang.Object o)
           
 boolean exists()
           
 java.lang.String getFilename()
          このオブジェクトが表す場所のファイル名を返す。
 long getLastModified()
           
 java.lang.String getURIString()
          ファイルの場所のURIを文字列にして返す。
 java.lang.String getURL()
           
 FileLocator newLocation(java.lang.String relativePath)
          現在の場所から新しい場所を指し示すオブジェクトを作る。
 java.io.InputStream openInputStream()
          ファイルを開いてInputStreamを返す。
 FileLocator rootLocation()
          このオブジェクトがnewLocationで作られたオブジェクトのとき、一番元になったオブジェクトを返す。
 java.lang.String toString()
           
 
クラス java.lang.Object から継承したメソッド
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

コンストラクタの詳細

URLFileLocator

public URLFileLocator(java.net.URL path)
               throws java.lang.IllegalArgumentException
パラメータ:
path -
例外:
java.lang.IllegalArgumentException - 引数がbullのとき
メソッドの詳細

openInputStream

public java.io.InputStream openInputStream()
                                    throws java.io.IOException
インタフェース FileLocator の記述:
ファイルを開いてInputStreamを返す。

定義:
インタフェース FileLocator 内の openInputStream
戻り値:
InputStream
例外:
java.io.IOException

getURL

public java.lang.String getURL()

getURIString

public java.lang.String getURIString()
インタフェース FileLocator の記述:
ファイルの場所のURIを文字列にして返す。

定義:
インタフェース FileLocator 内の getURIString
戻り値:

exists

public boolean exists()
定義:
インタフェース FileLocator 内の exists

getFilename

public java.lang.String getFilename()
インタフェース FileLocator の記述:
このオブジェクトが表す場所のファイル名を返す。 このオブジェクトがディレクトリを指している場合はnullを返す。

定義:
インタフェース FileLocator 内の getFilename
戻り値:

getLastModified

public long getLastModified()
                     throws java.io.IOException
定義:
インタフェース FileLocator 内の getLastModified
例外:
java.io.IOException

newLocation

public FileLocator newLocation(java.lang.String relativePath)
                        throws java.lang.IllegalArgumentException
インタフェース FileLocator の記述:
現在の場所から新しい場所を指し示すオブジェクトを作る。 現在位置より上位の場所を指定することはできない。

定義:
インタフェース FileLocator 内の newLocation
パラメータ:
relativePath - 新しい場所を現在の場所からの相対位置で表した文字列
戻り値:
FileLocator
例外:
java.lang.IllegalArgumentException

rootLocation

public FileLocator rootLocation()
インタフェース FileLocator の記述:
このオブジェクトがnewLocationで作られたオブジェクトのとき、一番元になったオブジェクトを返す。 自分自身がルートの場合は自分自身を返す。

定義:
インタフェース FileLocator 内の rootLocation
戻り値:
FileLocator

toString

public java.lang.String toString()

equals

public boolean equals(java.lang.Object o)