xref: /aosp_15_r20/external/jsilver/src/org/clearsilver/CSFileLoader.java (revision 650b9f7487be23191c9a5c1efcd9aa92af8ddcb8)
1*650b9f74SAndroid Build Coastguard Worker /*
2*650b9f74SAndroid Build Coastguard Worker  * Copyright (C) 2010 Google Inc.
3*650b9f74SAndroid Build Coastguard Worker  *
4*650b9f74SAndroid Build Coastguard Worker  * Licensed under the Apache License, Version 2.0 (the "License");
5*650b9f74SAndroid Build Coastguard Worker  * you may not use this file except in compliance with the License.
6*650b9f74SAndroid Build Coastguard Worker  * You may obtain a copy of the License at
7*650b9f74SAndroid Build Coastguard Worker  *
8*650b9f74SAndroid Build Coastguard Worker  * http://www.apache.org/licenses/LICENSE-2.0
9*650b9f74SAndroid Build Coastguard Worker  *
10*650b9f74SAndroid Build Coastguard Worker  * Unless required by applicable law or agreed to in writing, software
11*650b9f74SAndroid Build Coastguard Worker  * distributed under the License is distributed on an "AS IS" BASIS,
12*650b9f74SAndroid Build Coastguard Worker  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13*650b9f74SAndroid Build Coastguard Worker  * See the License for the specific language governing permissions and
14*650b9f74SAndroid Build Coastguard Worker  * limitations under the License.
15*650b9f74SAndroid Build Coastguard Worker  */
16*650b9f74SAndroid Build Coastguard Worker 
17*650b9f74SAndroid Build Coastguard Worker package org.clearsilver;
18*650b9f74SAndroid Build Coastguard Worker 
19*650b9f74SAndroid Build Coastguard Worker import java.io.IOException;
20*650b9f74SAndroid Build Coastguard Worker 
21*650b9f74SAndroid Build Coastguard Worker /**
22*650b9f74SAndroid Build Coastguard Worker  * Interface for CS file hook
23*650b9f74SAndroid Build Coastguard Worker  */
24*650b9f74SAndroid Build Coastguard Worker public interface CSFileLoader {
25*650b9f74SAndroid Build Coastguard Worker 
26*650b9f74SAndroid Build Coastguard Worker   /**
27*650b9f74SAndroid Build Coastguard Worker    * Callback method that is expected to return the contents of the specified
28*650b9f74SAndroid Build Coastguard Worker    * file as a string.
29*650b9f74SAndroid Build Coastguard Worker    * @param hdf the HDF structure associated with HDF or CS object making the
30*650b9f74SAndroid Build Coastguard Worker    * callback.
31*650b9f74SAndroid Build Coastguard Worker    * @param filename the name of the file that should be loaded.
32*650b9f74SAndroid Build Coastguard Worker    * @return a string containing the contents of the file.
33*650b9f74SAndroid Build Coastguard Worker    */
load(HDF hdf, String filename)34*650b9f74SAndroid Build Coastguard Worker   public String load(HDF hdf, String filename) throws IOException;
35*650b9f74SAndroid Build Coastguard Worker 
36*650b9f74SAndroid Build Coastguard Worker }
37