Examples of IORuntimeException


Examples of org.apache.aries.util.IORuntimeException

    } else {
      try{
        z.close();
      }
      catch (IOException e) {
        throw new IORuntimeException("IOException in ZipFileImpl.closeZipFile", e);
      }
    }
  }
View Full Code Here

Examples of org.apache.aries.util.IORuntimeException

      try{
      this.zipFile = openZipFile();
      this.is = zipFile.getInputStream(anEntry);
      }
      catch (ZipException e) {
        throw new IORuntimeException("ZipException in SpecialZipInputStream()", e);
      } catch (IOException e) {
        throw new IORuntimeException("IOException in SpecialZipInputStream()", e);
      }
    }
View Full Code Here

Examples of org.apache.aries.util.IORuntimeException

        dir = new DirectoryImpl(fs, fs);
      } else if (fs.isFile() && isValidZip(fs)) {
        try {
          dir = new ZipDirectory(fs, parent);
        } catch (IOException e) {
          throw new IORuntimeException("IOException in IDirectory.getFSRoot", e);
        }
      }
    }
    else {
      throw new IORuntimeException("File not found in IDirectory.getFSRoot", new FileNotFoundException(fs.getPath()));
    }
    return dir;
  }
View Full Code Here

Examples of org.apache.aries.util.IORuntimeException

    try {
      ZipFile zf = new ZipFile(zip);
      zf.close();
      return true;
    } catch (IOException e) {
      throw new IORuntimeException("Not a valid zip: "+zip, e);
    }
  }
View Full Code Here

Examples of org.apache.aries.util.IORuntimeException

    try {
      // just opening the stream ain't enough, we have to check the first entry
      zis = new ZipInputStream(zip.open());
      return zis.getNextEntry() != null;
    } catch (IOException e) {
      throw new IORuntimeException("Not a valid zip: "+zip, e);
    } finally {
      IOUtils.close(zis);
    }
  }
View Full Code Here

Examples of org.apache.aries.util.IORuntimeException

  public static ICloseableDirectory getFSRoot(InputStream is) {
    File tempFile = null;
    try {
      tempFile = File.createTempFile("inputStreamExtract", ".zip");
    } catch (IOException e1) {
      throw new IORuntimeException("IOException in IDirectory.getFSRoot", e1);
    }
    FileOutputStream fos = null;
    try {
      fos = new FileOutputStream(tempFile);
      IOUtils.copy(is, fos);
View Full Code Here

Examples of org.apache.aries.util.IORuntimeException

        return null;
      }
    }
    catch (IOException e) {
      throw new IORuntimeException("IOException in BundleManifest()", e);
    }
    finally {
      IOUtils.close(jarIs);
    }
  }
View Full Code Here

Examples of org.apache.aries.util.IORuntimeException

      } else {
        is = f.open();
        return fromBundle(is);
      }
    } catch (IOException e) {
      throw new IORuntimeException("IOException in BundleManifest.fromBundle(IFile)", e);
    }
    finally {
      IOUtils.close(is);
    }
  }
View Full Code Here

Examples of org.apache.aries.util.IORuntimeException

      if (manifestFile.isFile())
        try {
          return new BundleManifest(new FileInputStream(manifestFile));
        }
        catch (IOException e) {
          throw new IORuntimeException("IOException in BundleManifest.fromBundle(File)", e);
        }
      else
        return null;
    }
    else  if (f.isFile()) {
      try {
        return fromBundle(new FileInputStream(f));
      }
      catch (IOException e) {
        throw new IORuntimeException("IOException in BundleManifest.fromBundle(File)", e);
      }
    }
    else {
      throw new IllegalArgumentException(MessageUtil.getMessage("UTIL0016E", f.getAbsolutePath()));
    }
View Full Code Here

Examples of org.apache.aries.util.IORuntimeException

        return null;
      }
    }
    catch (IOException e) {
      throw new IORuntimeException("IOException in BundleManifest()", e);
    }
    finally {
      IOUtils.close(jarIs);
    }
  }
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.