/[alph]/alph/org/nongnu/alph/Alph.java
ViewVC logotype

Diff of /alph/org/nongnu/alph/Alph.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.1 by tjl, Mon Apr 21 16:31:23 2003 UTC revision 1.2 by tjl, Mon Apr 21 19:33:30 2003 UTC
# Line 8  import java.io.File; Line 8  import java.io.File;
8   */   */
9  public abstract class Alph {  public abstract class Alph {
10      public abstract ScrollBlock getScrollBlock(String uri);      public abstract ScrollBlock getScrollBlock(String uri);
11    
12      public abstract BlockFile getBlockFile(ScrollBlock block);      public abstract BlockFile getBlockFile(ScrollBlock block);
13      public abstract java.io.InputStream getBlockInputStream(ScrollBlock block) ;      public abstract java.io.InputStream getBlockInputStream(ScrollBlock block) ;
14    
15        /** Add a file to this Alph.
16         * This is an optional method, and may be missing from some implementations.
17         * <p>
18         * This method is final because it fixes the implementation
19         * to call addFile_id and then getScrollBlock. This is done
20         * to obtain a certain fuzzy feeling of security about
21         * the file being there also the <b>next</b> time the program
22         * is started by avoiding certain kinds of optimizations.
23         */
24        public final ScrollBlock addFile(File f, String contentType) {
25            String id = addFile_id(f, contentType);
26            return getScrollBlock(id);
27        }
28    
29        /** Implement adding a file to this Alph.
30         * @return The id; passing the id to getScrollBlock() shall return the file.
31         */
32        protected String addFile_id(File f, String contentType) {
33            throw new UnsupportedOperationException();
34        }
35    
36        /** The directory in which SMALL items pertaining to blocks may be cached.
37         * Currently intended for postscript/PDF DSC files for page sizes.
38         */
39      protected File cacheDir;      protected File cacheDir;
40    
41    
42      /** Get the cache dir for small items.      /** Get the cache dir for small items.
43       * Nothing larger than 1kb/block should be stored there.       * Nothing larger than 1kb/block should be stored there.
44       */       */

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26