|
Web Application 1.0 | |||||||||
前のクラス 次のクラス | フレームあり フレームなし | |||||||||
概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド |
java.lang.Objectjavax.servlet.GenericServlet
javax.servlet.http.HttpServlet
org.koiroha.webapp.file.FileServlet
public class FileServlet
クライアントからのリクエストに応じたファイルを送信するためのサーブレットです。
フィールドの概要 | |
---|---|
protected URI |
docroot
ドキュメントルートの URI です。 |
コンストラクタの概要 | |
---|---|
FileServlet()
コンストラクタは何も行いません。 |
メソッドの概要 | |
---|---|
protected boolean |
acceptGZIPCompression(javax.servlet.http.HttpServletRequest request)
指定されたリクエストが GZIP 圧縮に対応しているかどうかを判定します。 |
protected static void |
close(Closeable closeable)
指定されたストリームを例外なしでクローズします。 |
protected URI |
getLocalFileURI(String path,
boolean dir)
指定されたパスをドキュメントルートからの相対パスとみなして URI を参照します。 |
void |
init()
このサーブレットのインスタンスを初期化します。 |
protected void |
send(File file,
OutputStream out,
boolean compress)
指定されているローカルファイルをストリームに出力します。 |
クラス javax.servlet.http.HttpServlet から継承されたメソッド |
---|
doDelete, doGet, doHead, doOptions, doPost, doPut, doTrace, getLastModified, service, service |
クラス javax.servlet.GenericServlet から継承されたメソッド |
---|
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log, log |
クラス java.lang.Object から継承されたメソッド |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
フィールドの詳細 |
---|
protected URI docroot
コンストラクタの詳細 |
---|
public FileServlet()
メソッドの詳細 |
---|
public void init() throws javax.servlet.ServletException
javax.servlet.GenericServlet
内の init
javax.servlet.ServletException
- サーブレットの初期化に失敗した場合protected URI getLocalFileURI(String path, boolean dir) throws IOException
path
- URI として参照するパスdir
- ディレクトリを取得する場合 true
IOException
- 変換に失敗した場合protected boolean acceptGZIPCompression(javax.servlet.http.HttpServletRequest request)
request
- 判定するリクエスト
protected void send(File file, OutputStream out, boolean compress) throws IOException
file
- ローカルファイルout
- 出力先のストリームcompress
- 出力時に圧縮を行う場合 true
IOException
- 出力に失敗した場合protected static void close(Closeable closeable)
closeable
- クローズするストリーム
|
koiroha.org by takami torao | |||||||||
前のクラス 次のクラス | フレームあり フレームなし | |||||||||
概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド |