Package isi.pasco2.model

Examples of isi.pasco2.model.URLLEAKRecord


  }

  public void testEmptyHistoryFile() {
    try {
      String f = "D:\\mysrc\\pasco2\\src\\test\\isrc\\pasco2\\empty.history.index.dat";
      IndexFile fr = new FastReadIndexFile(f, "r");
      IEIndexFileParser parser = new IEHistoryFileParser(f, fr);
      parser.parseFile();

      ValidRecordIterator it = parser.getValidRecords();
      int count = 0;
View Full Code Here


  }

  public void testInitialHistoryFile() {
    try {
      String f = "D:\\mysrc\\pasco2\\src\\test\\isrc\\pasco2\\first.history.index.dat";
      IndexFile fr = new FastReadIndexFile(f, "r");
      IEIndexFileParser parser = new IEHistoryFileParser(f, fr);

      ValidRecordIterator it = parser.getValidRecords();
      int count = 0;
      while (it.hasNext()) {
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;
      parser.primaryHashOffset = storageStart;
      int address = 0;
      while (address != storageStart) {
        fr.seek(allocatorBitMapOffset + bitMapIndex*4);

        int[] bitmap = {fr.readLittleEndianInt()};
        BitArray bits = new BitArray(32, bitmap);
        for (int i = 0 ; i < 32 ; i++ ){
          address = (bitMapIndex*32+i) * 0x80 + storageStart;
          fr.seek(address);
          int dword = fr.readLittleEndianInt();
 
          System.out.println((bitMapIndex*32+i) + " " + Integer.toHexString(dword) + " " + Integer.toHexString(address));
          assertTrue(bits.getBit(i) == parser.getAllocator().isRecordAllocated(address));

        }
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;
      parser.primaryHashOffset = storageStart;
      int address = 0;
      while (address != storageStart) {
        fr.seek(allocatorBitMapOffset + bitMapIndex*4);

        int[] bitmap = {fr.readLittleEndianInt()};
        BitArray bits = new BitArray(32, bitmap);
        for (int i = 0 ; i < 32 ; i++ ){
          address = (bitMapIndex*32+i) * 0x80 + storageStart;
          fr.seek(address);
          int dword = fr.readLittleEndianInt();
 
          System.out.println((bitMapIndex*32+i) + " " + Integer.toHexString(dword) + " " + Integer.toHexString(address));
          assertTrue(bits.getBit(i) == parser.getAllocator().isRecordAllocated(address));

        }
View Full Code Here

      }
    }
  }

  public void REDRRecord(String url) {
    REDRRecord u = new REDRRecord(url, offset);
    if (initialized) {
      if (!newUrlRecords.contains(u)) {
        newUrlRecords.add(u);
      }
    } else {
View Full Code Here

    this.name = name;
  }

  public void URLRecord(DateTime localAccessTime, DateTime accessTime, DateTime modTime, String url,
      String file, String directory, String httpHeaders) {
    URLLEAKRecord u = new URLLEAKRecord("URL", localAccessTime, accessTime, modTime, url, file,
        directory, httpHeaders, offset, rec);
    if (initialized) {
      if (!newUrlRecords.contains(u)) {
        newUrlRecords.add(u);
      }
View Full Code Here

      }
    }
  }
 
  public void URLRecord(DateTime localAccessTime, DateTime accessTime, DateTime modTime, String url, int count) {
    URLLEAKRecord u = new URLLEAKRecord("URL", localAccessTime, accessTime, modTime, url, null, null, null, offset, rec);
    u.accessedCount = count;
    if (initialized) {
      if (!newUrlRecords.contains(u)) {
        newUrlRecords.add(u);
      }
View Full Code Here

      }
    }
  }
 
  public void URLRecord(DateTime localAccessTime, DateTime accessTime, DateTime modTime, String url) {
    URLLEAKRecord u = new URLLEAKRecord("URL", localAccessTime, accessTime, modTime, url, null, null, null, offset, rec);

    if (initialized) {
      if (!newUrlRecords.contains(u)) {
        newUrlRecords.add(u);
      }
View Full Code Here

      }
    }
  }
  public void URLRecord(DateTime accessTime, DateTime modTime, String url,
      String file, String directory, String httpHeaders) {
    URLLEAKRecord u = new URLLEAKRecord("URL", accessTime, modTime, url, file,
        directory, httpHeaders, offset, rec);
    if (initialized) {
      if (!newUrlRecords.contains(u)) {
        newUrlRecords.add(u);
      }
View Full Code Here

  }

  public void LEAKRecord(DateTime accessTime, DateTime modTime, String url,
      String file, String directory, String httpHeaders) {
    URLLEAKRecord u = new URLLEAKRecord("LEAK", accessTime, modTime, url, file,
        directory, httpHeaders, offset, rec);
    if (initialized) {
      if (!newUrlRecords.contains(u)) {
        newUrlRecords.add(u);
      }
View Full Code Here

TOP

Related Classes of isi.pasco2.model.URLLEAKRecord

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.