1 /*** 2 * 3 */ 4 package com.fernsroth.squashfs; 5 6 import java.io.IOException; 7 8 import com.fernsroth.easyio.IRandomAccessSource; 9 import com.fernsroth.squashfs.model.BaseFile; 10 import com.fernsroth.squashfs.model.Manifest; 11 12 /*** 13 * 14 * @author Joseph M. Ferner (Near Infinity Corporation) 15 */ 16 public interface DataProvider { 17 18 /*** 19 * @param source source manifest. 20 * @param bf the file to get the length from. 21 * @return the length of the file. 22 * @throws IOException 23 */ 24 long getLength(Manifest source, BaseFile bf) throws IOException; 25 26 /*** 27 * @param source source manifest. 28 * @param bf the file to get the ino from. 29 * @return the ino. 30 */ 31 int getIno(Manifest source, BaseFile bf); 32 33 /*** 34 * @param source source manifest. 35 * @param bf the file name. 36 * @return the random access source. 37 * @throws IOException 38 */ 39 IRandomAccessSource getData(Manifest source, BaseFile bf) 40 throws IOException; 41 42 }