com.google.caja.plugin
Class FileSystemUriFetcher

java.lang.Object
  extended by com.google.caja.plugin.FileSystemUriFetcher
All Implemented Interfaces:
UriFetcher
Direct Known Subclasses:
PluginCompilerMain.CachingUriFetcher

abstract class FileSystemUriFetcher
extends java.lang.Object
implements UriFetcher

Author:
mikesamuel@gmail.com

Nested Class Summary
 
Nested classes/interfaces inherited from interface com.google.caja.plugin.UriFetcher
UriFetcher.ChainingUriFetcher, UriFetcher.UriFetchException
 
Field Summary
private  UriToFile uriToFile
           
 
Fields inherited from interface com.google.caja.plugin.UriFetcher
NULL_NETWORK
 
Constructor Summary
FileSystemUriFetcher(UriToFile uriToFile)
           
 
Method Summary
 FetchedData fetch(ExternalReference ref, java.lang.String mimeType)
          Loads an external resource such as the src of a script tag or a stylesheet.
 byte[] fetchBinary(ExternalReference ref, java.lang.String mimeType)
           
protected abstract  java.io.InputStream newInputStream(java.io.File f)
           
protected abstract  java.io.Reader newReader(java.io.File f)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

uriToFile

private final UriToFile uriToFile
Constructor Detail

FileSystemUriFetcher

FileSystemUriFetcher(UriToFile uriToFile)
Method Detail

fetch

public final FetchedData fetch(ExternalReference ref,
                               java.lang.String mimeType)
                        throws UriFetcher.UriFetchException
Description copied from interface: UriFetcher
Loads an external resource such as the src of a script tag or a stylesheet.

Specified by:
fetch in interface UriFetcher
Returns:
non-null resource
Throws:
UriFetcher.UriFetchException - if the resource could not be loaded

fetchBinary

public final byte[] fetchBinary(ExternalReference ref,
                                java.lang.String mimeType)
                         throws UriFetcher.UriFetchException
Throws:
UriFetcher.UriFetchException

newReader

protected abstract java.io.Reader newReader(java.io.File f)
                                     throws java.io.FileNotFoundException
Throws:
java.io.FileNotFoundException

newInputStream

protected abstract java.io.InputStream newInputStream(java.io.File f)
                                               throws java.io.FileNotFoundException
Throws:
java.io.FileNotFoundException


Copyright (C) 2008 Google Inc.
Licensed under the Apache License, Version 2.0