Package org.apache.aries.util

Examples of org.apache.aries.util.IORuntimeException


          entry = zis.getNextEntry();
        }

        return result;
      } catch (IOException e) {
        throw new IORuntimeException("IOException reading nested ZipFile", e);
      } finally {
        IOUtils.close(zis);
      }
    }
  }
View Full Code Here


          if (name.startsWith(ze.getName())) entries.put(ze.getName(), ze);

          ze = zis.getNextEntry();
        }
      } catch (IOException e) {
        throw new IORuntimeException("IOException reading nested ZipFile", e);
      } finally {
        IOUtils.close(zis);
      }
    }
View Full Code Here

  public ICloseableDirectory toCloseable() {
    try {
      return new NestedCloseableDirectory(archive, this);
    } catch (IOException e) {
      throw new IORuntimeException("Exception while creating extracted version of nested zip file", e);
    }
  }
View Full Code Here

  public ICloseableDirectory toCloseable() {
    try {
      return new ZipCloseableDirectory(zip, this);
    } catch (IOException e) {
      throw new IORuntimeException("IOException opening zip file: " + this, e);
    }
  }
View Full Code Here

      z = cache.getZipFile();
    } else {
      try {
        z = new ZipFile(zip);
      } catch (IOException e) {
        throw new IORuntimeException("IOException in ZipFileImpl.openZipFile", e);
      }
    }
    return z;
  }
View Full Code Here

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

      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

        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

    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

    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

TOP

Related Classes of org.apache.aries.util.IORuntimeException

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.