8182838485868788
{ return new BufferedInputStream(new FileInputStream(file)); } catch (FileNotFoundException e) { throw new ResourceLoadingException("Unable to open Stream: ", e); } }
160161162163164165166167168169
public ResourceData load(final ResourceKey key) throws ResourceLoadingException { if (isSupportedKey(key) == false) { throw new ResourceLoadingException ("Key format is not recognized."); } return new ClassloaderResourceData(key); }
177178179180181182183184185186
public ResourceData load(final ResourceKey key) throws ResourceLoadingException { if (isSupportedKey(key) == false) { throw new ResourceLoadingException ("Key format is not recognized."); } return new FileResourceData(key); }
141142143144145146147148149150
public ResourceData load(final ResourceKey key) throws ResourceLoadingException { if (isSupportedKey(key) == false) { throw new ResourceLoadingException ("Key format is not recognized."); } return new ZipResourceData(key); }
8889909192939495969798
zin.close(); } } catch (IOException e) { throw new ResourceLoadingException ("Reading the zip-file failed.", e); } throw new ResourceLoadingException ("The zip-file did not contain the specified entry"); }
132133134135136137138139140
public ResourceData load(final ResourceKey key) throws ResourceLoadingException { if (isSupportedKey(key) == false) { throw new ResourceLoadingException("The key type is not supported."); } return new RawResourceData(key); }
109110111112113114115116
{ throw new ResourceCreationException("Failed to parse the stylesheet."); } catch (IOException e) { throw new ResourceLoadingException("Failed to load the stylesheet."); } }
106107108109110111112113
808182838485868788
{ return inputRepository.createInputStream(resourceIdentifer); } catch (IOException e) { throw new ResourceLoadingException ("Failed to create input stream for " + resourceIdentifer, e); } }
164165166167168169170171172173
public ResourceData load (final ResourceKey key) throws ResourceLoadingException { if (isSupportedKey(key) == false) { throw new ResourceLoadingException("None of my keys."); } return new InputRepositoryResourceData(key, inputRepository); }