Package isi.pasco2.util

Examples of isi.pasco2.util.StructConverter


  }

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

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


  }

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

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

  }

  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

          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

  }

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

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

  }

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

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

TOP

Related Classes of isi.pasco2.util.StructConverter

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.