Home Package Class Method

Examples of FileHandler


Examples of altn8.filechooser.FileHandler

                if (editor != null) { // fix issue 9: can only display hint if there is a editor instance
                    HintManager.getInstance().showInformationHint(editor, "No corresponding file(s) found");
                }
            } else {
                // open these...
                AlternateFilePopupChooser.prompt("Select the file(s) to open", fileGroups, currentProject, new FileHandler() {
                    public void processFile(@NotNull PsiFile psiFile) {
                        psiFile.navigate(true);
                    }
                });
            }
View Full Code Here

Examples of de.axxeed.animosy.tools.FileHandler

   
    /**This method reads the text file which contains the map*/
    private static void readFile()
    {
        try {
      FileHandler map = new FileHandler("de/axxeed/animosy/scotmap.txt");
      log.info("Reading map network list <"+map.getInfo()+">");
      // RandomAccessFile map=new RandomAccessFile(f,"r");
      String buffer=map.readLine();
      StringTokenizer token;
      token=new StringTokenizer(buffer);
      noOfNodes=Integer.parseInt(token.nextToken());
      nodes=new Node[noOfNodes];
      for(int i=0;i<nodes.length;i++)
          nodes[i]=new Node(i);
      buffer=map.readLine();
      while(buffer!=null && buffer.trim().length()>0) {
        // System.out.println(i+": "+buffer);
        token=new StringTokenizer(buffer);
        int node1=Integer.parseInt(token.nextToken());
        int node2=Integer.parseInt(token.nextToken());
        String strType=token.nextToken();
        int type=INF;
        if(strType.equals("T")) type=TAXI;
        if(strType.equals("B")) type=BUS;
        if(strType.equals("U")) type=UG;
        if(strType.equals("X")) type=BLACK;
        nodes[node1].addLink(nodes[node2],type);
        nodes[node2].addLink(nodes[node1],type);
        buffer=map.readLine();
      }
      map.close();
      }
        catch(Exception e) {
      e.printStackTrace();
          System.out.println("Error in file reading. Exitting!!! "+e);
      System.exit(1);
View Full Code Here

Examples of de.innovationgate.wgpublisher.lucene.analysis.FileHandler

    }
   
    public void addFileHandlerMapping(String extension, String handlerClassName) throws ClassNotFoundException, InstantiationException, IllegalAccessException {
      log.info("Registering filehandler for extension '" + extension + "' - '" + handlerClassName + "'.");
      Class fileHandlerClass = getLibraryLoader().loadClass(handlerClassName);
        FileHandler handler = (FileHandler) fileHandlerClass.newInstance();
        fileHandlerMappings.put(extension.toLowerCase(), handler);
  }
View Full Code Here

Examples of de.uniol.informatik.vlba.prototype.packaging.FileHandler

    }

    // TODO hardcoded, move to config file
    refreshAvailableNeighbors(config, true);

    fh = new FileHandler(po, conn, "agent_file_", ".tmp");
    // TODO Do the neighbors have to be online?
    // // Remove all offline buddies from the list
    // for (Integer buddy : buddies) {
    // if (po.PurpleBuddyIsOnline(buddy.intValue()) == 0) {
    // buddies.remove(buddy);
View Full Code Here

Examples of de.uniol.informatik.vlba.purplebee.p2p.FileHandler

    //ReceivingImMsg_Handler ringh = new ReceivingImMsg_Handler();
    //ReceivedImMsg_Handler rdh = new ReceivedImMsg_Handler();
   
    DBusConnection conn = DBusConnection.getConnection(DBusConnection.SESSION);
    PurpleInterface po = (PurpleInterface)conn.getRemoteObject("im.pidgin.purple.PurpleService", "/im/pidgin/purple/PurpleObject");
    FileHandler fh = new FileHandler(po,conn, "agent_file_", ".tmp");
    //conn.addSigHandler(im.pidgin.purple.PurpleInterface.FileSendStart.class, fh);
    //conn.addSigHandler(im.pidgin.purple.PurpleInterface.FileSendComplete.class, fh);
   
    byte[] orgArr = new byte[]{'c','d','w','h','d','l'};
    String path = fh.packInFile(orgArr);
    byte[] bar = fh.unpackFromFile(path);
   
    for (int i=0;i<bar.length;i++)
    {
      assert(bar[i]==orgArr[i]);
    }
View Full Code Here

Examples of eu.planets_project.ifr.core.storage.common.FileHandler

  @Deprecated
  public String read(URI pdURI) throws SOAPException {
    log.fine("DataManager::read(URI pdURI)");
    try{
      PDURI _parsedURI = new PDURI(pdURI);
      FileHandler _encoder = new FileHandler(jcrManager.readContent(_parsedURI.getDataRegistryPath()));
      log.fine("DataManager::read() getting XML document");
      return _encoder.getXmlDocument();
    } catch (ParserConfigurationException _exp) {
      String _message = "DataManager.read() Encoding exception for UTF8??";
      log.fine(_message+": "+_exp.getMessage());
      throw new SOAPException(_message, _exp);
    } catch (PathNotFoundException _exp) {
View Full Code Here

Examples of java.util.logging.FileHandler

  }

  public static void initLogger(Logger logger, String outputLogPath) {
    try {
      logger.setUseParentHandlers(false);
      FileHandler fh = new FileHandler(outputLogPath);
      fh.setFormatter(new TextFormatter());
      fh.setLevel(Level.INFO);
      logger.addHandler(fh);
    }
    catch (SecurityException se) {
      se.printStackTrace();
    }
View Full Code Here

Examples of java.util.logging.FileHandler

  }

  public static void initLogger(Logger logger, String outputLogPath) {
    try {
      logger.setUseParentHandlers(false);
      FileHandler fh = new FileHandler(outputLogPath);
      fh.setFormatter(new TextFormatter());
      fh.setLevel(Level.INFO);
      logger.addHandler(fh);
    }
    catch (SecurityException se) {
      se.printStackTrace();
    }
View Full Code Here

Examples of java.util.logging.FileHandler

  }

  public static void initLogger(Logger logger, String outputLogPath) {
    try {
      logger.setUseParentHandlers(false);
      FileHandler fh = new FileHandler(outputLogPath);
      fh.setFormatter(new TextFormatter());
      fh.setLevel(Level.INFO);
      logger.addHandler(fh);
    }
    catch (SecurityException se) {
      se.printStackTrace();
    }
View Full Code Here

Examples of java.util.logging.FileHandler

        try {
            String tmp =
                System.getProperty("java.util.logging.FileHandler.pattern");
                File logFile = new File(logsDir, baseName +
                    ((tmp != null && tmp.length() > 0)? tmp: ".log"));
            FileHandler fh = new FileHandler(logFile.getAbsolutePath(), limit,
                count, true);
            // Manage the formatter to use.
            tmp = System.getProperty("java.util.logging.FileHandler.formatter");
            if (tmp != null && tmp.length() > 0) {
                Constructor<?> co = Class.forName(tmp).
                    getConstructor(new Class[] {});
                Formatter f = (Formatter) co.newInstance(new Object[] {});
                fh.setFormatter(f);
            }
            logger.addHandler(fh);
            logger.setUseParentHandlers(false);
            return fh;
        } catch (Exception e) {
View Full Code Here
TOP
Copyright © 2015 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.