Package org.apache.kato.common

Examples of org.apache.kato.common.SubsetDataProvider


    }
    sizes = new HProfDataTypeSizes(idSize);

    recordsOffset = mainProvider.getCurrentLocation();
    long maxOffsetLength = mainProvider.getDataLength() - recordsOffset;
    SubsetDataProvider subset = new SubsetDataProvider(mainProvider,
        maxOffsetLength);
    array = new BitMaskMappingArray(1000, 25, new HPROFRecordProvider(
        subset));

  }
View Full Code Here


        long index = DataReader.readNumber(dumpRecordProvider, idSize);
        short type = dumpRecordProvider.readByte();
      }

      long datalength = dumpRecordProvider.getCurrentLocation() - loc;
      SubsetDataProvider p = new SubsetDataProvider(dumpRecordProvider,
          loc, datalength);

      // Pass indices of static and instance fields - they are variable length.
      return new GCClassHeapDumpRecord((byte) tag, p, staticFieldsIndex, instFieldsIndex );
View Full Code Here

      short elementType = arrayProvider.readByte();

      int elementLength = sizes.getLengthFromType(elementType);
      int datalength = idSize + 9 + (elementLength * elements);
      arrayProvider.moveTo(loc);
      SubsetDataProvider p = new SubsetDataProvider(arrayProvider,
          datalength);
      arrayProvider.moveTo(loc + datalength);
      return new GCPrimitiveArrayHeapDumpRecord(tag, p);
    }
View Full Code Here

      long loc = arrayProvider.getCurrentLocation();
      arrayProvider.moveBy(idSize + 4);
      int elements = arrayProvider.readU4();
      int datalength = (idSize * 2) + 8 + (idSize * elements);
      arrayProvider.moveTo(loc);
      SubsetDataProvider p = new SubsetDataProvider(arrayProvider,
          datalength);
      arrayProvider.moveTo(loc + datalength);
      return new GCObjectArrayHeapDumpRecord(tag, p);
    }
View Full Code Here

      long loc = arrayProvider.getCurrentLocation();
      arrayProvider.moveBy((idSize * 2) + 4);
      int byteCount = arrayProvider.readU4();
      int datalength = (idSize * 2) + 8 + byteCount;
      arrayProvider.moveTo(loc);
      SubsetDataProvider p = new SubsetDataProvider(arrayProvider,
          datalength);
      arrayProvider.moveTo(loc + datalength);
      return new GCInstanceHeapDumpRecord(tag, p);
    }
View Full Code Here

        case 0x0b:
          return new EndThreadHProfRecord(tag, data);

        case 0x0c:
          IHeapDumpHProfRecord rec = new HeapDumpHProfRecord(tag,
              new SubsetDataProvider(recordProvider, left));
          recordProvider.moveBy(left);
          return rec;
        default:
          // don't know what the thing is - return an unknown
          // type.
View Full Code Here

 
  public void testCreationNullProvider() throws IOException {
   
    try {
      new SubsetDataProvider(null,0);
    fail("Expected illegal arguement exception");
    }
    catch (IllegalArgumentException e) {
      ; // ok
    }
View Full Code Here

   
  }
  public void testCreationNegativeRange() throws IOException {
   
    try {
      new SubsetDataProvider(new MockDataProvider(),-1);
    fail("Expected illegal arguement exception");
    }
    catch (IllegalArgumentException e) {
      ; // ok
    }
View Full Code Here

    }
   
  }
  public void testGetDataAt00() throws IOException {
   
    SubsetDataProvider provider=new SubsetDataProvider(new MockDataProvider(),10);
    short b=provider.readByte();
    assertEquals(0,b);
   
  }
View Full Code Here

  }
  public void testGetDataAt01() throws IOException {
   
    MockDataProvider p=new MockDataProvider();
    p.moveTo(1);
    SubsetDataProvider provider=new SubsetDataProvider(p,10);
    short b=provider.readByte();
    assertEquals(1,b);
   
  }
View Full Code Here

TOP

Related Classes of org.apache.kato.common.SubsetDataProvider

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.