Package org.infinispan.util

Examples of org.infinispan.util.FileLookup.lookupFile()


    */
   public ConfigurationBuilderHolder parseFiles(List<String> filenames) {
       FileLookup fileLookup = FileLookupFactory.newInstance();
       List<InputStream> streams = new ArrayList<InputStream>(filenames.size());
       for (String filename : filenames) {
           streams.add(fileLookup.lookupFile(filename, cl));
       }
       return parse(streams);
   }
  
   public ConfigurationBuilderHolder parse(InputStream is) {
View Full Code Here


      //1. resolve given path
      FileLookup fileLookup = new FileLookup();
      InputStream is = null;
      if (localPathToSchema != null) {
         is = fileLookup.lookupFile(localPathToSchema, Thread.currentThread().getContextClassLoader());
         if (is != null) {
            log.debugf("Using schema %s", localPathToSchema);
            return is;
         }
         if (log.isDebugEnabled()) {
View Full Code Here

                       localPathToSchema, SCHEMA_SYSTEM_PROPERTY, schemaPath());
         }
      }

      //2. resolve local schema path in infinispan distro
      is = fileLookup.lookupFile(schemaPath(), Thread.currentThread().getContextClassLoader());
      if (is != null) {
         log.debugf("Using schema %s", schemaPath());
         return is;
      }
      if (log.isDebugEnabled()) {
View Full Code Here

   private static InputStream findInputStream(String fileName, ClassLoader cl) throws FileNotFoundException {
      if (fileName == null)
         throw new NullPointerException("File name cannot be null!");
      FileLookup fileLookup = new FileLookup();
      InputStream is = fileLookup.lookupFile(fileName, cl);
      if (is == null)
         throw new FileNotFoundException("File " + fileName
                 + " could not be found, either on the classpath or on the file system!");
      return is;
   }
View Full Code Here

      this.cl = cl;
   }

   public ConfigurationBuilderHolder parse(String filename) {
      FileLookup fileLookup = FileLookupFactory.newInstance();
      return parse(fileLookup.lookupFile(filename, cl));
   }
  
   public ConfigurationBuilderHolder parse(InputStream is) {
      try {
         try {
View Full Code Here

   }

   public void initialize(String fileName) throws IOException {
      if (fileName == null) throw new NullPointerException("File name cannot be null!");
      FileLookup fileLookup = new FileLookup();
      InputStream is = fileLookup.lookupFile(fileName);
      if (is == null)
         throw new FileNotFoundException("File " + fileName + " could not be found, either on the classpath or on the file system!");
      initialize(is);
   }
View Full Code Here

      boolean validating = !skipSchemaValidation();
      if (!validating)
         return null;

      FileLookup fileLookup = new FileLookup();
      InputStream is = fileLookup.lookupFile(schemaPath());
      if (is != null)
         return is;
      try {
         is = new URL(schemaURL()).openStream();
         return is;
View Full Code Here

   private static InputStream findInputStream(String fileName) throws FileNotFoundException {
      if (fileName == null)
         throw new NullPointerException("File name cannot be null!");
      FileLookup fileLookup = new FileLookup();
      InputStream is = fileLookup.lookupFile(fileName);
      if (is == null)
         throw new FileNotFoundException("File " + fileName
               + " could not be found, either on the classpath or on the file system!");
      return is;
   }
View Full Code Here

      this.hotRodClientProperties.putAll(props);
   }

   public void setHotRodClientPropertiesFile(String hotRodClientProperties) {
      FileLookup fileLookup = new FileLookup();
      InputStream inputStream = fileLookup.lookupFile(hotRodClientProperties);
      try {
         this.hotRodClientProperties.load(inputStream);
      } catch (IOException e) {
         log.error("Issues while loading properties from file", e);
         throw new CacheException(e);
View Full Code Here

   }

   public void initialize(String fileName) throws IOException {
      if (fileName == null) throw new NullPointerException("File name cannot be null!");
      FileLookup fileLookup = new FileLookup();
      InputStream is = fileLookup.lookupFile(fileName);
      if (is == null)
         throw new FileNotFoundException("File " + fileName + " could not be found, either on the classpath or on the file system!");
      initialize(is);
   }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.