Package java.util.jar

Examples of java.util.jar.JarException


      }
    catch (IndexOutOfBoundsException ignored)
      {
      }
    // If we arrive here, something went wrong
    throw new JarException("unexpected '" + s + "'");
  }
View Full Code Here


      throws IOException
  {
    String name = entry.getKey().toString();
    String value = entry.getValue().toString();
    if (name.equalsIgnoreCase(NAME))
      throw new JarException("Attributes cannot be called 'Name'");

    if (name.startsWith("From"))
      throw new JarException("Header cannot start with the four letters 'From'"
                             + name);

    writeHeader(name, value, out);
  }
View Full Code Here

     * @throws IllegalArgumentException If entry is not present in the jar.
     */
    private void extractEntry(String name, File file)
            throws IOException, IllegalArgumentException {
        if (_jar == null) {
            throw new JarException("Jar file is closed.");
        }

        JarEntry jarEntry = _jar.getJarEntry(name);
        if (jarEntry == null) {
        String msg = _strings.get("invalidArchiveEntry", name, _jar.getName());
View Full Code Here

                _logger.log(Level.FINER, _strings.get("noArchiveEntryToUpdate", _archive.getName()));           
          }
            return;
        }
        if (_jar == null) {
            throw new JarException("Jar file is not in open state, jar path.");
        }
        File tempJarFile = null, jarFile = null;
        FileOutputStream fos = null;
        JarOutputStream jos = null;
        boolean success = false;
View Full Code Here

TOP

Related Classes of java.util.jar.JarException

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.