Package com.radeonsys.data.querystore.support.loader

Examples of com.radeonsys.data.querystore.support.loader.ResourceNotFoundException


   
    if (optionalResourceUrl.isPresent())
      return optionalResourceUrl.get();
   
    // if still not found, we cannot locate the resource
    throw new ResourceNotFoundException(resourceLocation, buildResourceNotFoundMessage(resourceLocation));
  }
View Full Code Here


    @Override
    public InputSupplier<? extends Reader> getReadableResource(String resourceLocation, Charset charset) {
        final File resourceFile = getResourceFile(resourceLocation);

        if (!isValidFileResource(resourceFile))
            throw new ResourceNotFoundException(resourceLocation, buildResourceNotFoundMessage(resourceLocation));

        return Files.newReaderSupplier(resourceFile, charset);
    }
View Full Code Here

    @Override
    public InputSupplier<? extends InputStream> getBinaryResource(String resourceLocation) {
        final File resourceFile = getResourceFile(resourceLocation);

        if (!isValidFileResource(resourceFile))
            throw new ResourceNotFoundException(resourceLocation, buildResourceNotFoundMessage(resourceLocation));

        return Files.newInputStreamSupplier(resourceFile);
    }
View Full Code Here

      File file = new File(resourceLocation);
      if (!file.isAbsolute()) {
          try {
                  file = file.getCanonicalFile();
          } catch (IOException e) {
              throw new ResourceNotFoundException(resourceLocation, String.format(
                      "Unable to resolve relative path to absolute path: %s", resourceLocation), e);
          }
      }

        return file;
View Full Code Here

TOP

Related Classes of com.radeonsys.data.querystore.support.loader.ResourceNotFoundException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.