1 /* 2 * Copyright 2004-2008 the Seasar Foundation and the Others. 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, 13 * either express or implied. See the License for the specific language 14 * governing permissions and limitations under the License. 15 */ 16 package org.seasar.uruma.util.resource; 17 18 import java.io.InputStream; 19 import java.net.URL; 20 21 /** 22 * リソースを処理するクラスのためのインターフェースです。<br /> 23 * 24 * @author y-komori 25 * @see ResourceTraverser 26 */ 27 public interface ResourceHandler { 28 /** 29 * リソースを処理します。<br /> 30 * 本メソッドは、 {@link ResourceTraverser#traverse(URL, URL, ResourceHandler)} 31 * メソッドを呼び出したとき、発見した各々のリソースに対して呼び出されます。<br /> 32 * 33 * @param rootPath 34 * クラスパス上のルートを表す絶対パス 35 * @param path 36 * クラスパス上のリソースのパス 37 * @param is 38 * リソースを読み込むための {@link InputStream} 39 */ 40 public void handle(String rootPath, String path, InputStream is); 41 }