Examples of Archive


Examples of csm.uttils.Archive

                debug("Saving property " + propertyKey);
        properties.put(propertyKey, propertyValue);
    }

    static void loadProperties(String path) {
        csm.uttils.Archive propFile = new Archive(path);
        String propString = propFile.readString();
        Logger.getLogger(ConfigurationManager.class.getName()).debug("File: "
                + propFile.getFile().exists());

        Logger.getLogger(ConfigurationManager.class.getName()).debug("File Path: "
                + propFile.getFile().getAbsolutePath());

        String[] properties = propString.split("\n");
        for (String property : properties) {
            String[] propertyString = property.split("=");
            if (propertyString.length == 2) {
View Full Code Here

Examples of de.chris_soft.nanoarchive.Archive

   * @see de.chris_soft.utilities.swing.TextInputListener#textInputFinished(java.lang.String)
   */
  @Override
  public void textInputFinished(String text) {
    if (text != null && text.trim().length() > 0) {
      Archive archive = nanoDoAMain.archive;
      new FulltextSearchWindows(text, archive);
    }
  }
View Full Code Here

Examples of de.innosystec.unrar.Archive

        EmbeddedDocumentExtractor extractor =
            new EmbeddedDocumentExtractor(context);

        try {
            File file = TikaInputStream.get(stream).getFile();
            Archive archive = new Archive(file);

            metadata.set(Metadata.CONTENT_TYPE, TYPE.toString());
            XHTMLContentHandler xhtml =
                new XHTMLContentHandler(handler, metadata);
            xhtml.startDocument();
            for (FileHeader header : archive.getFileHeaders()) {
                Metadata entrydata = new Metadata();
                entrydata.set(
                        Metadata.RESOURCE_NAME_KEY,
                        header.getFileNameString());
                if (extractor.shouldParseEmbedded(entrydata)) {
View Full Code Here

Examples of net.geco.model.Archive

    archiveDateL.setText(archiveManager().archiveLastModified());
    showRowCount();
  }

  private void refreshTableData() {
    Archive archive = null;
    try {
      archive = archiveManager().archive();
    } catch (IOException e) {
      JOptionPane.showMessageDialog(
          this,
          e.toString(),
          Messages.uiGet("ArchiveViewer.LoadArchiveError"), //$NON-NLS-1$
          JOptionPane.ERROR_MESSAGE);
      try {
        archive = archiveManager().archive();
      } catch (IOException e1) {
        geco.debug(e1.toString());
      }
    }
    tableModel.setData(archive.runners().toArray(new ArchiveRunner[0]));
  }
View Full Code Here

Examples of net.sf.rej.files.Archive

        if (f.getName().endsWith(".class")) {
            return new SingleFile(f);
        } else if (f.isDirectory()) {
            return new Folder(f);
        } else if (f.getName().endsWith(".zip") || f.getName().endsWith(".jar")) {
            return new Archive(f);
        } else {
            throw new RuntimeException("File of wrong type: " + f.getName());
        }
    }
View Full Code Here

Examples of net.sf.rej.files.Archive

                return; // EARLY RETURN
            }
        }
       
        try {
      Archive archive = Archive.createNew(archiveFile);
      Project project = new Project();
      project.setFile(archiveFile);
      project.setFileSet(archive);
      project.save();
      openProject(project);
View Full Code Here

Examples of oracle.toplink.essentials.ejb.cmp3.persistence.Archive

        if(classTransformers!=null) {
            return ;
        } else{
            classTransformers = new ArrayList<ClassTransformer>();
        }
        Archive archive =null;
        try{
           archive = (new ArchiveFactoryImpl()).createArchive(inputArchiveURL);
        }catch(ZipException e){
            throw StaticWeaveException.exceptionOpeningArchive(inputArchiveURL,e);
        }
View Full Code Here

Examples of org.albite.util.archive.Archive

        // Chapter settings
        final String chapterPath = booklet.getChapter().getPath();
        final char[] buffer = booklet.getTextBuffer();
        final int bufferSize;
        final Archive bookFile = booklet.bookArchive;
        final Vector images = ip.images;

        byte style;
        boolean center;
        byte color;

        AlbiteFont font;

        HyphenatedTextRegion lastHyphenatedWord;
        boolean startsNewParagraph;

        TextParser parser = ip.parser;
        int wordPixelWidth; //word width in pixels

        Vector wordsOnThisLine = new Vector(20); //RegionTexts

        boolean firstWord;

        int posX = 0;
        int posY = 0;

        Vector regionsTemp;

        if (images.isEmpty()) {
            //text mode
            regionsTemp = new Vector(300);

            parser.position = end = start = ip.position;
            parser.length = ip.length;

            bufferSize = buffer.length;

            style = ip.style;
            center = ip.center;

            lastHyphenatedWord = ip.lastHyphenatedWord;
            startsNewParagraph = ip.startsNewParagraph;

        } else {
            //image mode
            ImageRegion ri = (ImageRegion) images.firstElement();
            images.removeElementAt(0);

            imageRegion = ri;
            regionsTemp = new Vector(40);

            posY = 0;

            bufferSize = ri.altTextBufferPosition + ri.altTextBufferLength;
            parser.position = end = start = ri.altTextBufferPosition;
            parser.length = 0;

            style = ITALIC;
            center = true;

            lastHyphenatedWord = null;
            startsNewParagraph = true;
        }

        /*
         * Setup font & color, based on style value from previous page.
         */
        font = chooseFont(fontPlain, fontItalic, style);
        color = chooseTextColor(style);

        boolean lastLine = false;
        boolean firstLine = true;
        boolean lineBreak = false;

        page:
            while (true) {

                /*
                 * There is no more space for new lines,
                 * so the page is done.
                 */
                if (posY >= height - fontHeight) {
                    break;
                }

                /*
                 * Check if it is the last line of the page
                 */
                if (posY >= height - (fontHeightX2)) {
                    lastLine = true;
                }

                /*
                 * NB: posX & posY are in pixels, pos is in chars.
                 */
                posX = 0;
                firstWord = true;

                /*
                 * Clear the cache that will hold all the elements on the line
                 */
                wordsOnThisLine.removeAllElements();

                /*
                 * Indent the line, if it starts a new paragraph.
                 */
                if (startsNewParagraph) {
                    posX = fontIndent;
                }

                line:
                    while (true) {

                        /*
                         * Parse on
                         */
                        if (!parser.parseNext(buffer, bufferSize)) {
                            //#ifdef DEBUG_PARSER
//#                             AlbiteMIDlet.LOGGER.log("parser done");
                            //#endif

                            /* No more chars to read */

                            if (imageRegion == null) {
                                ip.bufferRead = true;
                            }

                            lineBreak = true;

                            if (wordsOnThisLine.size() > 0) {
                                positionWordsOnLine(
                                        wordsOnThisLine, regionsTemp, width,
                                        posY, spaceWidth, fontIndent, lineBreak,
                                        startsNewParagraph, center);

                            }

                            break page;
                        }

                        //#ifdef DEBUG_PARSER
//#                         AlbiteMIDlet.LOGGER.log(
//#                                 "parser: _"
//#                                 + new String(
//#                                 buffer, parser.position, parser.length)
//#                                 + "_, "
//#                                 + parser.position + " / "
//#                                 + parser.length
//#                                 + " state: " + parser.state + "\n");
                        //#endif

                        /*
                         * Logic for possible parsing states.
                         */
                        final int state = parser.state;
                        switch (state) {
                            case TextParser.STATE_PASS:
                                continue line;

                            case TextParser.STATE_NEW_SOFT_LINE:
                                if (posX == 0) {
                                    /*
                                     * Only if it's on the next line
                                     */
                                    startsNewParagraph = true;
                                }

                                if (!(posX > (startsNewParagraph ? fontIndent : 0))) {
                                    continue line;
                                }

                            case TextParser.STATE_NEW_LINE: //linebreak
                                if (!firstLine || (posX >
                                        (startsNewParagraph ? fontIndent : 0)
                                        )) {
                                    lineBreak = true;
                                    break line;
                                } else {
                                    /* don't start a page with blank lines */
                                    continue line;
                                }

                            case TextParser.STATE_STYLING:

                                /* enable styling */
                                if (parser.enableBold) {
                                    style |= BOLD;
                                }

                                if (parser.enableItalic) {
                                    style |= ITALIC;
                                }

                                if (parser.enableHeading) {
                                    style |= HEADING;
                                }

                                if (parser.enableCenterAlign) {
                                    center = true;
                                }

                                if (parser.disableCenterAlign) {
                                    center = false;
                                }

                                /* disable styling */
                                if (parser.disableBold) {
                                    style &= ~BOLD;
                                }

                                if (parser.disableItalic) {
                                    style &= ~ITALIC;
                                }

                                if (parser.disableHeading) {
                                    style &= ~HEADING;
                                }

                                /* setup font & color */
                                font = chooseFont(fontPlain,
                                        fontItalic, style);
                                color = chooseTextColor(style);
                                continue line;

                            case TextParser.STATE_IMAGE:

                                if (booklet.renderImages) {
                                    ImageRegion ri = new ImageRegion(
                                            (bookFile == null
                                                ? null
                                                : bookFile.getEntry(
                                                    RandomReadingFile
                                                    .relativeToAbsoluteURL(
                                                    chapterPath +
                                                    new String(buffer,
                                                        parser.imageURLPosition,
View Full Code Here

Examples of org.apache.commons.compress.Archive

  public void executeWorkItem(WorkItem workItem, WorkItemManager manager) {
    String archive = (String) workItem.getParameter("Archive");
    List<File> files = (List<File>) workItem.getParameter("Files");
    try {
      Archive archiver = ArchiverFactory.getInstance("tar");
      if (files != null) {
        for (File file: files) {
          archiver.add(file);
        }
      }
      archiver.save(new File(archive));
      manager.completeWorkItem(workItem.getId(), null);
    } catch (Throwable t) {
      t.printStackTrace();
      manager.abortWorkItem(workItem.getId());
    }
View Full Code Here

Examples of org.apache.commons.jrcs.rcs.Archive

        }
    }

    private History parseFile(File file) throws IOException {
        try {
            Archive archive = new Archive(getRCSFile(file).getPath());
            Version ver = archive.getRevisionVersion();
            Node n = archive.findNode(ver);
            n = n.root();

            ArrayList<HistoryEntry> entries = new ArrayList<HistoryEntry>();
            traverse(n, entries);
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.