Package isi.pasco2.model

Examples of isi.pasco2.model.RecognisedRecord


    this.indexFile = file;
    this.handler = handler;
  }

  public IEIndexFileParser(String fileName, IndexFile file) {
    this(fileName, file, new AbstractPrinterHandler());
  }
View Full Code Here


  protected void parseRecord(IndexFile file, int currrecoff,
      DefaultHandler handler) throws IOException {
    file.seek(currrecoff);
    byte[] rec;
    CacheAccessHandler cacheHandler = (CacheAccessHandler) handler;
    file.seek(currrecoff);
    byte[] type = new byte[4];
    file.read(type, 0, 4);
    String typeStr = new String(type);
    try {
View Full Code Here

        String fileName = line.getArgs()[0];
       
        try {
          IndexFile fr = new FastReadIndexFile(fileName, "r");
          CountingCacheHandler handler = null;
         
          if (fileType == null) {
            handler = new CountingCacheHandler();
          }
          if (fileType == null) {
            handler = new CountingCacheHandler();
          } else if (fileType.equals("cache")) {
            handler = new CountingCacheHandler();
          } else if (fileType.equals("history")) {
            handler = new Pasco2HistoryHandler();
          }
         
          if (format != null) {
            if (format.equals("pasco")) {
              DateFormat regularDateFormat = new SimpleDateFormat("MM/dd/yyyy HH:mm:ss.SSS");
              handler.setDateFormat(regularDateFormat);
              TimeZone tz = TimeZone.getTimeZone("Australia/Brisbane");
              regularDateFormat.setTimeZone(tz);
             
            } else if (format.equals("standard")) {
              DateFormat xsdDateFormat = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'");
              handler.setDateFormat(xsdDateFormat);    
              xsdDateFormat.setTimeZone(TimeZone.getTimeZone("UTC"));
            } else {
              System.err.println("Format not supported.");
              HelpFormatter formatter = new HelpFormatter();
              formatter.printHelp( "pasco2", options );
              System.exit(1);
            }
          }
         
          if (delimeter != null) {
            handler.setDelimeter(delimeter);
          }
         
          IEIndexFileParser logparser = null;
          if (fileType == null) {
            System.err.println("Using cache file parser.");
View Full Code Here

  public void testHistoryFile() {
    try {
      String f = "D:\\Documents and Settings\\bschatz\\Local Settings\\History\\History.IE5\\index.dat";
      IndexFile fr = new FastReadIndexFile(f, "r");
      CountingCacheHandler handler = new CountingCacheHandler();
      IEHistoryFileParser parser = new IEHistoryFileParser(f, fr);
     
      int allocatorBitMapOffset = 0x250;
      int bitMapIndex = 0;
      int storageStart = 0x4000;
View Full Code Here

  public void testCacheFile() {
    try {
      String f = "D:\\mysrc\\squidbro\\IFIP2006\\anon\\source\\minnow.willk.content.index.dat";
      IndexFile fr = new FastReadIndexFile(f, "r");
      CountingCacheHandler handler = new CountingCacheHandler();
      IEHistoryFileParser parser = new IEHistoryFileParser(f, fr);
     
      int allocatorBitMapOffset = 0x250;
      int bitMapIndex = 0;
      int storageStart = 0x5000;
View Full Code Here

  protected void parseRecord(IndexFile file, int currrecoff,
      DefaultHandler handler) throws IOException {
    file.seek(currrecoff);
    byte[] rec;
    HistoryAccessHandler cacheHandler = (HistoryAccessHandler) handler;
    file.seek(currrecoff);
    byte[] type = new byte[4];
    file.read(type, 0, 4);
    String typeStr = new String(type);
    try {
View Full Code Here

    StringBuffer url = readURL(fr, currrecoff);
    //StringBuffer filename = readFileName(fr, currrecoff);
    //String dirname = readDirName(fr, currrecoff);
    //StringBuffer httpheaders = readHTTPHeaders(fr, currrecoff, reclen);

    HistoryAccessHandler h = (HistoryAccessHandler) handler;
    if (type.startsWith("URL")) {
      h.URLRecord(lastAccessTime, accessTime, modTime, url.toString(),
          numberOfAccesses);
    }
   
    // TODO I havent seen a History file with a LEAK record in it yet... but should
    // handle this gracefully
View Full Code Here

          if (fileType == null) {
            handler = new CountingCacheHandler();
          } else if (fileType.equals("cache")) {
            handler = new CountingCacheHandler();
          } else if (fileType.equals("history")) {
            handler = new Pasco2HistoryHandler();
          }
         
          if (format != null) {
            if (format.equals("pasco")) {
              DateFormat regularDateFormat = new SimpleDateFormat("MM/dd/yyyy HH:mm:ss.SSS");
View Full Code Here

          System.exit(1);
        }
        String fileName = line.getArgs()[0];
       
        try {
          IndexFile fr = new FastReadIndexFile(fileName, "r");
          CountingCacheHandler handler = null;
         
          if (fileType == null) {
            handler = new CountingCacheHandler();
View Full Code Here

      try {
        //IndexFile f1 = new FastReadIndexFile(cachePath);
        //cacheparser.parseFile(cachePath, f1, cacheHandler);
        //f1.close();
  
        IndexFile f2 = new FastReadIndexFile(historyPath);
        historyParser = new IEHistoryFileParser(cachePath, f2, historyHandler);
        historyParser.parseFile();
        f2.close();
       
        try {
          Thread.sleep(10000);
        } catch (InterruptedException ex) {
        }
View Full Code Here

TOP

Related Classes of isi.pasco2.model.RecognisedRecord

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.