incubator-kato-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From monte...@apache.org
Subject svn commit: r883384 [17/47] - in /incubator/kato/trunk/org.apache.kato: ./ kato.anttasks/src/main/java/org/apache/kato/anttasks/ kato.anttasks/src/main/java/org/apache/kato/anttasks/sitebuilder/ kato.anttasks/src/main/java/org/apache/kato/anttasks/tck/...
Date Mon, 23 Nov 2009 15:54:15 GMT
Modified: incubator/kato/trunk/org.apache.kato/kato.hprof.reader/src/main/java/org/apache/kato/hprof/datalayer/IGCObjectArrayHeapDumpRecord.java
URL: http://svn.apache.org/viewvc/incubator/kato/trunk/org.apache.kato/kato.hprof.reader/src/main/java/org/apache/kato/hprof/datalayer/IGCObjectArrayHeapDumpRecord.java?rev=883384&r1=883383&r2=883384&view=diff
==============================================================================
--- incubator/kato/trunk/org.apache.kato/kato.hprof.reader/src/main/java/org/apache/kato/hprof/datalayer/IGCObjectArrayHeapDumpRecord.java (original)
+++ incubator/kato/trunk/org.apache.kato/kato.hprof.reader/src/main/java/org/apache/kato/hprof/datalayer/IGCObjectArrayHeapDumpRecord.java Mon Nov 23 15:53:48 2009
@@ -1,29 +1,29 @@
-/*******************************************************************************
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * 
- *   http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- ******************************************************************************/
-package org.apache.kato.hprof.datalayer;
-
-public interface IGCObjectArrayHeapDumpRecord extends IHeapObject {
-
-	public int getNumberOfElements();
-	
-	/**
-	 * Retrieve the object ID at a given index.
-	 * 
-	 * @param index
-	 * @return ID of object at index.
-	 */
-	public long getElement(int index);
-	
-	public long getArrayClassObjectID();
-}
+/*******************************************************************************
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ ******************************************************************************/
+package org.apache.kato.hprof.datalayer;
+
+public interface IGCObjectArrayHeapDumpRecord extends IHeapObject {
+
+	public int getNumberOfElements();
+	
+	/**
+	 * Retrieve the object ID at a given index.
+	 * 
+	 * @param index
+	 * @return ID of object at index.
+	 */
+	public long getElement(int index);
+	
+	public long getArrayClassObjectID();
+}

Propchange: incubator/kato/trunk/org.apache.kato/kato.hprof.reader/src/main/java/org/apache/kato/hprof/datalayer/IGCObjectArrayHeapDumpRecord.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/kato/trunk/org.apache.kato/kato.hprof.reader/src/main/java/org/apache/kato/hprof/datalayer/IGCPrimitiveArrayHeapDumpRecord.java
URL: http://svn.apache.org/viewvc/incubator/kato/trunk/org.apache.kato/kato.hprof.reader/src/main/java/org/apache/kato/hprof/datalayer/IGCPrimitiveArrayHeapDumpRecord.java?rev=883384&r1=883383&r2=883384&view=diff
==============================================================================
--- incubator/kato/trunk/org.apache.kato/kato.hprof.reader/src/main/java/org/apache/kato/hprof/datalayer/IGCPrimitiveArrayHeapDumpRecord.java (original)
+++ incubator/kato/trunk/org.apache.kato/kato.hprof.reader/src/main/java/org/apache/kato/hprof/datalayer/IGCPrimitiveArrayHeapDumpRecord.java Mon Nov 23 15:53:48 2009
@@ -1,27 +1,27 @@
-/*******************************************************************************
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * 
- *   http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- ******************************************************************************/
-package org.apache.kato.hprof.datalayer;
-
-public interface IGCPrimitiveArrayHeapDumpRecord extends IHeapObject {
-	public int getNumberOfElements();
-	public short getElementType();
-	boolean getBooleanElement(int index);
-	short getByteElement(int index);
-	short getShortElement(int index);
-	char getCharElement(int index);
-	int getIntElement(int index);
-	long getLongElement(int index);
-	float getFloatElement(int index);
-	double getDoubleElement(int index);
-}
+/*******************************************************************************
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ ******************************************************************************/
+package org.apache.kato.hprof.datalayer;
+
+public interface IGCPrimitiveArrayHeapDumpRecord extends IHeapObject {
+	public int getNumberOfElements();
+	public short getElementType();
+	boolean getBooleanElement(int index);
+	short getByteElement(int index);
+	short getShortElement(int index);
+	char getCharElement(int index);
+	int getIntElement(int index);
+	long getLongElement(int index);
+	float getFloatElement(int index);
+	double getDoubleElement(int index);
+}

Propchange: incubator/kato/trunk/org.apache.kato/kato.hprof.reader/src/main/java/org/apache/kato/hprof/datalayer/IGCPrimitiveArrayHeapDumpRecord.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/kato/trunk/org.apache.kato/kato.hprof.reader/src/main/java/org/apache/kato/hprof/datalayer/IHProfRecord.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/kato/trunk/org.apache.kato/kato.hprof.reader/src/main/java/org/apache/kato/hprof/datalayer/IHeapDumpHProfRecord.java
URL: http://svn.apache.org/viewvc/incubator/kato/trunk/org.apache.kato/kato.hprof.reader/src/main/java/org/apache/kato/hprof/datalayer/IHeapDumpHProfRecord.java?rev=883384&r1=883383&r2=883384&view=diff
==============================================================================
--- incubator/kato/trunk/org.apache.kato/kato.hprof.reader/src/main/java/org/apache/kato/hprof/datalayer/IHeapDumpHProfRecord.java (original)
+++ incubator/kato/trunk/org.apache.kato/kato.hprof.reader/src/main/java/org/apache/kato/hprof/datalayer/IHeapDumpHProfRecord.java Mon Nov 23 15:53:48 2009
@@ -1,31 +1,31 @@
-/*******************************************************************************
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * 
- *   http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- ******************************************************************************/
-package org.apache.kato.hprof.datalayer;
-
-public interface IHeapDumpHProfRecord  extends IHProfRecord {
-
-	public abstract int getSubRecordCount();
-
-	public abstract IHProfRecord getSubRecord(int index);
-
-	public abstract long getSubRecordLocation(int index);
-
-	/**
-	 * Shortcut that reads a record directly.
-	 * 
-	 * @param fileOffset
-	 * @return IHProfRecord
-	 */
-	public abstract IHProfRecord getSubRecordByLocation(long location);
+/*******************************************************************************
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ ******************************************************************************/
+package org.apache.kato.hprof.datalayer;
+
+public interface IHeapDumpHProfRecord  extends IHProfRecord {
+
+	public abstract int getSubRecordCount();
+
+	public abstract IHProfRecord getSubRecord(int index);
+
+	public abstract long getSubRecordLocation(int index);
+
+	/**
+	 * Shortcut that reads a record directly.
+	 * 
+	 * @param fileOffset
+	 * @return IHProfRecord
+	 */
+	public abstract IHProfRecord getSubRecordByLocation(long location);
 }
\ No newline at end of file

Propchange: incubator/kato/trunk/org.apache.kato/kato.hprof.reader/src/main/java/org/apache/kato/hprof/datalayer/IHeapDumpHProfRecord.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/kato/trunk/org.apache.kato/kato.hprof.reader/src/main/java/org/apache/kato/hprof/datalayer/IHeapObject.java
URL: http://svn.apache.org/viewvc/incubator/kato/trunk/org.apache.kato/kato.hprof.reader/src/main/java/org/apache/kato/hprof/datalayer/IHeapObject.java?rev=883384&r1=883383&r2=883384&view=diff
==============================================================================
--- incubator/kato/trunk/org.apache.kato/kato.hprof.reader/src/main/java/org/apache/kato/hprof/datalayer/IHeapObject.java (original)
+++ incubator/kato/trunk/org.apache.kato/kato.hprof.reader/src/main/java/org/apache/kato/hprof/datalayer/IHeapObject.java Mon Nov 23 15:53:48 2009
@@ -1,36 +1,36 @@
-/*******************************************************************************
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * 
- *   http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- ******************************************************************************/
-package org.apache.kato.hprof.datalayer;
-
-/**
- * Used for IHProfRecords on the heap that can be retrieved
- * by their ID.
- * 
- */
-public interface IHeapObject {
-	/**
-	 * This object's ID
-	 * 
-	 * @return long object ID of this object
-	 */
-	public abstract long getID();
-
-	/**
-	 * Returns the stacktrace serial # where this object
-	 * was instantiated.
-	 * 
-	 * @return int
-	 */
-	public abstract int getStackTraceNumber();
-}
+/*******************************************************************************
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ ******************************************************************************/
+package org.apache.kato.hprof.datalayer;
+
+/**
+ * Used for IHProfRecords on the heap that can be retrieved
+ * by their ID.
+ * 
+ */
+public interface IHeapObject {
+	/**
+	 * This object's ID
+	 * 
+	 * @return long object ID of this object
+	 */
+	public abstract long getID();
+
+	/**
+	 * Returns the stacktrace serial # where this object
+	 * was instantiated.
+	 * 
+	 * @return int
+	 */
+	public abstract int getStackTraceNumber();
+}

Propchange: incubator/kato/trunk/org.apache.kato/kato.hprof.reader/src/main/java/org/apache/kato/hprof/datalayer/IHeapObject.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/kato/trunk/org.apache.kato/kato.hprof.reader/src/main/java/org/apache/kato/hprof/datalayer/IJavaStackFrameHProfRecord.java
URL: http://svn.apache.org/viewvc/incubator/kato/trunk/org.apache.kato/kato.hprof.reader/src/main/java/org/apache/kato/hprof/datalayer/IJavaStackFrameHProfRecord.java?rev=883384&r1=883383&r2=883384&view=diff
==============================================================================
--- incubator/kato/trunk/org.apache.kato/kato.hprof.reader/src/main/java/org/apache/kato/hprof/datalayer/IJavaStackFrameHProfRecord.java (original)
+++ incubator/kato/trunk/org.apache.kato/kato.hprof.reader/src/main/java/org/apache/kato/hprof/datalayer/IJavaStackFrameHProfRecord.java Mon Nov 23 15:53:48 2009
@@ -1,30 +1,30 @@
-/*******************************************************************************
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * 
- *   http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- ******************************************************************************/
-package org.apache.kato.hprof.datalayer;
-
-public interface IJavaStackFrameHProfRecord {
-
-	public abstract long getStackFrameID();
-
-	public abstract long getMethodNameID();
-
-	public abstract long getMethodSignatureID();
-
-	public abstract long getSourceFileNameID();
-
-	public abstract int getClassSerialNumber();
-
-	public abstract int getLineNumber();
-
+/*******************************************************************************
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ ******************************************************************************/
+package org.apache.kato.hprof.datalayer;
+
+public interface IJavaStackFrameHProfRecord {
+
+	public abstract long getStackFrameID();
+
+	public abstract long getMethodNameID();
+
+	public abstract long getMethodSignatureID();
+
+	public abstract long getSourceFileNameID();
+
+	public abstract int getClassSerialNumber();
+
+	public abstract int getLineNumber();
+
 }
\ No newline at end of file

Propchange: incubator/kato/trunk/org.apache.kato/kato.hprof.reader/src/main/java/org/apache/kato/hprof/datalayer/IJavaStackFrameHProfRecord.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/kato/trunk/org.apache.kato/kato.hprof.reader/src/main/java/org/apache/kato/hprof/datalayer/IJavaStackTraceHProfRecord.java
URL: http://svn.apache.org/viewvc/incubator/kato/trunk/org.apache.kato/kato.hprof.reader/src/main/java/org/apache/kato/hprof/datalayer/IJavaStackTraceHProfRecord.java?rev=883384&r1=883383&r2=883384&view=diff
==============================================================================
--- incubator/kato/trunk/org.apache.kato/kato.hprof.reader/src/main/java/org/apache/kato/hprof/datalayer/IJavaStackTraceHProfRecord.java (original)
+++ incubator/kato/trunk/org.apache.kato/kato.hprof.reader/src/main/java/org/apache/kato/hprof/datalayer/IJavaStackTraceHProfRecord.java Mon Nov 23 15:53:48 2009
@@ -1,24 +1,24 @@
-/*******************************************************************************
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * 
- *   http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- ******************************************************************************/
-package org.apache.kato.hprof.datalayer;
-
-public interface IJavaStackTraceHProfRecord {
-
-	public  int getSerialNumber();
-	public int getThreadSerialNumber();
-	public  int getFrameCount();
-
-	public  long getStackFrameID(int elementNo);
-
+/*******************************************************************************
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ ******************************************************************************/
+package org.apache.kato.hprof.datalayer;
+
+public interface IJavaStackTraceHProfRecord {
+
+	public  int getSerialNumber();
+	public int getThreadSerialNumber();
+	public  int getFrameCount();
+
+	public  long getStackFrameID(int elementNo);
+
 }
\ No newline at end of file

Propchange: incubator/kato/trunk/org.apache.kato/kato.hprof.reader/src/main/java/org/apache/kato/hprof/datalayer/IJavaStackTraceHProfRecord.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/kato/trunk/org.apache.kato/kato.hprof.reader/src/main/java/org/apache/kato/hprof/datalayer/ILoadClassHProfRecord.java
URL: http://svn.apache.org/viewvc/incubator/kato/trunk/org.apache.kato/kato.hprof.reader/src/main/java/org/apache/kato/hprof/datalayer/ILoadClassHProfRecord.java?rev=883384&r1=883383&r2=883384&view=diff
==============================================================================
--- incubator/kato/trunk/org.apache.kato/kato.hprof.reader/src/main/java/org/apache/kato/hprof/datalayer/ILoadClassHProfRecord.java (original)
+++ incubator/kato/trunk/org.apache.kato/kato.hprof.reader/src/main/java/org/apache/kato/hprof/datalayer/ILoadClassHProfRecord.java Mon Nov 23 15:53:48 2009
@@ -1,26 +1,26 @@
-/*******************************************************************************
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * 
- *   http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- ******************************************************************************/
-package org.apache.kato.hprof.datalayer;
-
-public interface ILoadClassHProfRecord {
-
-	public abstract int getClassSerialNumber();
-
-	public abstract long getClassObjectID();
-
-	public abstract int getStackTraceSerialNumber();
-
-	public abstract long getClassNameID();
-
+/*******************************************************************************
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ ******************************************************************************/
+package org.apache.kato.hprof.datalayer;
+
+public interface ILoadClassHProfRecord {
+
+	public abstract int getClassSerialNumber();
+
+	public abstract long getClassObjectID();
+
+	public abstract int getStackTraceSerialNumber();
+
+	public abstract long getClassNameID();
+
 }
\ No newline at end of file

Propchange: incubator/kato/trunk/org.apache.kato/kato.hprof.reader/src/main/java/org/apache/kato/hprof/datalayer/ILoadClassHProfRecord.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/kato/trunk/org.apache.kato/kato.hprof.reader/src/main/java/org/apache/kato/hprof/datalayer/IThreadActiveHProfRecord.java
URL: http://svn.apache.org/viewvc/incubator/kato/trunk/org.apache.kato/kato.hprof.reader/src/main/java/org/apache/kato/hprof/datalayer/IThreadActiveHProfRecord.java?rev=883384&r1=883383&r2=883384&view=diff
==============================================================================
--- incubator/kato/trunk/org.apache.kato/kato.hprof.reader/src/main/java/org/apache/kato/hprof/datalayer/IThreadActiveHProfRecord.java (original)
+++ incubator/kato/trunk/org.apache.kato/kato.hprof.reader/src/main/java/org/apache/kato/hprof/datalayer/IThreadActiveHProfRecord.java Mon Nov 23 15:53:48 2009
@@ -1,30 +1,30 @@
-/*******************************************************************************
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * 
- *   http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- ******************************************************************************/
-package org.apache.kato.hprof.datalayer;
-
-public interface IThreadActiveHProfRecord {
-
-	public abstract int getThreadSerialNumber();
-
-	public abstract long getThreadObjectID();
-
-	public abstract int getStackTraceSerialNumber();
-
-	public abstract long getThreadNameID();
-
-	public abstract long getThreadGroupNameID();
-
-	public abstract long getThreadGroupParentNameID();
-
+/*******************************************************************************
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ ******************************************************************************/
+package org.apache.kato.hprof.datalayer;
+
+public interface IThreadActiveHProfRecord {
+
+	public abstract int getThreadSerialNumber();
+
+	public abstract long getThreadObjectID();
+
+	public abstract int getStackTraceSerialNumber();
+
+	public abstract long getThreadNameID();
+
+	public abstract long getThreadGroupNameID();
+
+	public abstract long getThreadGroupParentNameID();
+
 }
\ No newline at end of file

Propchange: incubator/kato/trunk/org.apache.kato/kato.hprof.reader/src/main/java/org/apache/kato/hprof/datalayer/IThreadActiveHProfRecord.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/kato/trunk/org.apache.kato/kato.hprof.reader/src/main/java/org/apache/kato/hprof/datalayer/IThreadEndingHProfRecord.java
URL: http://svn.apache.org/viewvc/incubator/kato/trunk/org.apache.kato/kato.hprof.reader/src/main/java/org/apache/kato/hprof/datalayer/IThreadEndingHProfRecord.java?rev=883384&r1=883383&r2=883384&view=diff
==============================================================================
--- incubator/kato/trunk/org.apache.kato/kato.hprof.reader/src/main/java/org/apache/kato/hprof/datalayer/IThreadEndingHProfRecord.java (original)
+++ incubator/kato/trunk/org.apache.kato/kato.hprof.reader/src/main/java/org/apache/kato/hprof/datalayer/IThreadEndingHProfRecord.java Mon Nov 23 15:53:48 2009
@@ -1,20 +1,20 @@
-/*******************************************************************************
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * 
- *   http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- ******************************************************************************/
-package org.apache.kato.hprof.datalayer;
-
-public interface IThreadEndingHProfRecord {
-
-	public abstract int getThreadSerialNumber();
-
+/*******************************************************************************
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ ******************************************************************************/
+package org.apache.kato.hprof.datalayer;
+
+public interface IThreadEndingHProfRecord {
+
+	public abstract int getThreadSerialNumber();
+
 }
\ No newline at end of file

Propchange: incubator/kato/trunk/org.apache.kato/kato.hprof.reader/src/main/java/org/apache/kato/hprof/datalayer/IThreadEndingHProfRecord.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/kato/trunk/org.apache.kato/kato.hprof.reader/src/main/java/org/apache/kato/hprof/datalayer/IUTF8HProfRecord.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/kato/trunk/org.apache.kato/kato.hprof.reader/src/main/java/org/apache/kato/hprof/datalayer/IUnloadClassHProfRecord.java
URL: http://svn.apache.org/viewvc/incubator/kato/trunk/org.apache.kato/kato.hprof.reader/src/main/java/org/apache/kato/hprof/datalayer/IUnloadClassHProfRecord.java?rev=883384&r1=883383&r2=883384&view=diff
==============================================================================
--- incubator/kato/trunk/org.apache.kato/kato.hprof.reader/src/main/java/org/apache/kato/hprof/datalayer/IUnloadClassHProfRecord.java (original)
+++ incubator/kato/trunk/org.apache.kato/kato.hprof.reader/src/main/java/org/apache/kato/hprof/datalayer/IUnloadClassHProfRecord.java Mon Nov 23 15:53:48 2009
@@ -1,22 +1,22 @@
-/*******************************************************************************
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * 
- *   http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- ******************************************************************************/
-package org.apache.kato.hprof.datalayer;
-
-/**
- * Indicates when a class is unloaded.
- * 
- */
-public interface IUnloadClassHProfRecord {
-	public abstract int getClassSerialNumber();
+/*******************************************************************************
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ ******************************************************************************/
+package org.apache.kato.hprof.datalayer;
+
+/**
+ * Indicates when a class is unloaded.
+ * 
+ */
+public interface IUnloadClassHProfRecord {
+	public abstract int getClassSerialNumber();
 }
\ No newline at end of file

Propchange: incubator/kato/trunk/org.apache.kato/kato.hprof.reader/src/main/java/org/apache/kato/hprof/datalayer/IUnloadClassHProfRecord.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/kato/trunk/org.apache.kato/kato.hprof.reader/src/main/java/org/apache/kato/hprof/datalayer/InstanceFieldEntry.java
URL: http://svn.apache.org/viewvc/incubator/kato/trunk/org.apache.kato/kato.hprof.reader/src/main/java/org/apache/kato/hprof/datalayer/InstanceFieldEntry.java?rev=883384&r1=883383&r2=883384&view=diff
==============================================================================
--- incubator/kato/trunk/org.apache.kato/kato.hprof.reader/src/main/java/org/apache/kato/hprof/datalayer/InstanceFieldEntry.java (original)
+++ incubator/kato/trunk/org.apache.kato/kato.hprof.reader/src/main/java/org/apache/kato/hprof/datalayer/InstanceFieldEntry.java Mon Nov 23 15:53:48 2009
@@ -1,38 +1,38 @@
-/*******************************************************************************
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * 
- *   http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- ******************************************************************************/
-package org.apache.kato.hprof.datalayer;
-
-/**
- *  An instance field description from a Class.
- */
-public class InstanceFieldEntry extends FieldEntry {
-
-	private int offset;
-
-	/**
-	 * 
-	 * @param fieldNameID the ID of the name of the field.
-	 * @param type the type of the field
-	 * @param offset offset of the field within its instance.
-	 */
-	public InstanceFieldEntry(long fieldNameID, short type, int offset) {
-		this.fieldNameID = fieldNameID;
-		this.type = type;
-		this.offset = offset;
-	}
-	
-	public int getOffset() {
-		return offset;
-	}
+/*******************************************************************************
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ ******************************************************************************/
+package org.apache.kato.hprof.datalayer;
+
+/**
+ *  An instance field description from a Class.
+ */
+public class InstanceFieldEntry extends FieldEntry {
+
+	private int offset;
+
+	/**
+	 * 
+	 * @param fieldNameID the ID of the name of the field.
+	 * @param type the type of the field
+	 * @param offset offset of the field within its instance.
+	 */
+	public InstanceFieldEntry(long fieldNameID, short type, int offset) {
+		this.fieldNameID = fieldNameID;
+		this.type = type;
+		this.offset = offset;
+	}
+	
+	public int getOffset() {
+		return offset;
+	}
 }
\ No newline at end of file

Propchange: incubator/kato/trunk/org.apache.kato/kato.hprof.reader/src/main/java/org/apache/kato/hprof/datalayer/InstanceFieldEntry.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/kato/trunk/org.apache.kato/kato.hprof.reader/src/main/java/org/apache/kato/hprof/datalayer/RandomAccesDataProvider.java
URL: http://svn.apache.org/viewvc/incubator/kato/trunk/org.apache.kato/kato.hprof.reader/src/main/java/org/apache/kato/hprof/datalayer/RandomAccesDataProvider.java?rev=883384&r1=883383&r2=883384&view=diff
==============================================================================
--- incubator/kato/trunk/org.apache.kato/kato.hprof.reader/src/main/java/org/apache/kato/hprof/datalayer/RandomAccesDataProvider.java (original)
+++ incubator/kato/trunk/org.apache.kato/kato.hprof.reader/src/main/java/org/apache/kato/hprof/datalayer/RandomAccesDataProvider.java Mon Nov 23 15:53:48 2009
@@ -1,165 +1,165 @@
-/*******************************************************************************
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * 
- *   http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- ******************************************************************************/
-package org.apache.kato.hprof.datalayer;
-
-import java.io.File;
-import java.io.IOException;
-import java.io.RandomAccessFile;
-import java.util.List;
-
-import javax.imageio.stream.FileImageInputStream;
-
-import org.apache.kato.common.IDataProvider;
-
-public class RandomAccesDataProvider implements IDataProvider {
-
-	private FileImageInputStream raf=null;
-	private long fileLength=0;
-	private long current=0;
-	
-	private boolean moved=false;
-	
-	public RandomAccesDataProvider(File reader) throws IOException {
-		if(reader==null) throw new IllegalArgumentException("reader file is null");
-		if(reader.exists()==false) throw new IllegalArgumentException("reader file ["+reader.getAbsolutePath()+ " ] does not exist");
-		RandomAccessFile r=new RandomAccessFile(reader, "r");
-		raf=new FileImageInputStream(r);
-	}
-
-	@Override
-	public void close() throws IOException {
-		raf.close();
-		raf=null;
-		
-	}
-
-	@Override
-	public void moveTo(long l) throws IOException {
-		
-		current=l;
-		moved=true;
-		
-	}
-
-	@Override
-	public void open() throws IOException {
-		fileLength=raf.length();
-		raf.seek(0);
-		
-	}
-
-	@Override
-	public String readCString() throws IOException {
-		updateLocation();
-		
-		StringBuilder builder=new StringBuilder();
-		while(true) {
-			int b=raf.readUnsignedByte();
-			current++;
-			if(b==0) break;
-			builder.append( (char)b);
-		}
-		
-		return builder.toString();
-	}
-
-	@Override
-	public int readU4() throws IOException {
-		updateLocation();
-		current+=4;
-		return raf.readInt();
-	}
-
-	@Override
-	public long readU8() throws IOException {
-		updateLocation();
-		current+=8;
-		long high=raf.readUnsignedInt();
-		long low=raf.readUnsignedInt();
-		return high << 32 | low;
-	}
-
-	@Override
-	public long getCurrentLocation() throws IOException {
-		
-		return current;
-	}
-
-	@Override
-	public long getDataLength() throws IOException {
-		
-		return fileLength;
-	}
-
-	@Override
-	public short readByte() throws IOException {
-		updateLocation();
-		current++;
-		return (short) (raf.readByte() & 0xff);
-	}
-
-	@Override
-	public byte[] readBytes(int left) throws IOException {
-		updateLocation();
-		current+=left;
-		byte[] data=new byte[left];
-		 raf.readFully(data);
-		return data; 
-	}
-
-	@Override
-	public void moveBy(int move) throws IOException {
-		current+=move;
-		moved=true;
-		
-	}
-
-	@Override
-	public short readU2() throws IOException {
-		updateLocation();
-		current+=2;
-		return raf.readShort();
-	}
-	private void updateLocation() throws IOException {
-		if(moved) {
-			raf.seek(current);
-			moved=false;
-		}
-		
-	}
-
-	@Override
-	public void addState(List state) {
-		long realPos=-2;
-		try {
-			realPos = raf.getStreamPosition();
-		} catch (IOException e) {
-		
-		}
-		
-		state.add("RandomAccessDataProvider current="+current+",moved="+moved+",fileLength="+fileLength+",realpos="+realPos);
-		
-	}
-
-	@Override
-	public long dataRemaining() {
-		
-		return fileLength-current;
-	}
-	
-	@Override
-	public boolean moved() {
-		return moved;
-	}
-}
+/*******************************************************************************
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ ******************************************************************************/
+package org.apache.kato.hprof.datalayer;
+
+import java.io.File;
+import java.io.IOException;
+import java.io.RandomAccessFile;
+import java.util.List;
+
+import javax.imageio.stream.FileImageInputStream;
+
+import org.apache.kato.common.IDataProvider;
+
+public class RandomAccesDataProvider implements IDataProvider {
+
+	private FileImageInputStream raf=null;
+	private long fileLength=0;
+	private long current=0;
+	
+	private boolean moved=false;
+	
+	public RandomAccesDataProvider(File reader) throws IOException {
+		if(reader==null) throw new IllegalArgumentException("reader file is null");
+		if(reader.exists()==false) throw new IllegalArgumentException("reader file ["+reader.getAbsolutePath()+ " ] does not exist");
+		RandomAccessFile r=new RandomAccessFile(reader, "r");
+		raf=new FileImageInputStream(r);
+	}
+
+	@Override
+	public void close() throws IOException {
+		raf.close();
+		raf=null;
+		
+	}
+
+	@Override
+	public void moveTo(long l) throws IOException {
+		
+		current=l;
+		moved=true;
+		
+	}
+
+	@Override
+	public void open() throws IOException {
+		fileLength=raf.length();
+		raf.seek(0);
+		
+	}
+
+	@Override
+	public String readCString() throws IOException {
+		updateLocation();
+		
+		StringBuilder builder=new StringBuilder();
+		while(true) {
+			int b=raf.readUnsignedByte();
+			current++;
+			if(b==0) break;
+			builder.append( (char)b);
+		}
+		
+		return builder.toString();
+	}
+
+	@Override
+	public int readU4() throws IOException {
+		updateLocation();
+		current+=4;
+		return raf.readInt();
+	}
+
+	@Override
+	public long readU8() throws IOException {
+		updateLocation();
+		current+=8;
+		long high=raf.readUnsignedInt();
+		long low=raf.readUnsignedInt();
+		return high << 32 | low;
+	}
+
+	@Override
+	public long getCurrentLocation() throws IOException {
+		
+		return current;
+	}
+
+	@Override
+	public long getDataLength() throws IOException {
+		
+		return fileLength;
+	}
+
+	@Override
+	public short readByte() throws IOException {
+		updateLocation();
+		current++;
+		return (short) (raf.readByte() & 0xff);
+	}
+
+	@Override
+	public byte[] readBytes(int left) throws IOException {
+		updateLocation();
+		current+=left;
+		byte[] data=new byte[left];
+		 raf.readFully(data);
+		return data; 
+	}
+
+	@Override
+	public void moveBy(int move) throws IOException {
+		current+=move;
+		moved=true;
+		
+	}
+
+	@Override
+	public short readU2() throws IOException {
+		updateLocation();
+		current+=2;
+		return raf.readShort();
+	}
+	private void updateLocation() throws IOException {
+		if(moved) {
+			raf.seek(current);
+			moved=false;
+		}
+		
+	}
+
+	@Override
+	public void addState(List state) {
+		long realPos=-2;
+		try {
+			realPos = raf.getStreamPosition();
+		} catch (IOException e) {
+		
+		}
+		
+		state.add("RandomAccessDataProvider current="+current+",moved="+moved+",fileLength="+fileLength+",realpos="+realPos);
+		
+	}
+
+	@Override
+	public long dataRemaining() {
+		
+		return fileLength-current;
+	}
+	
+	@Override
+	public boolean moved() {
+		return moved;
+	}
+}

Propchange: incubator/kato/trunk/org.apache.kato/kato.hprof.reader/src/main/java/org/apache/kato/hprof/datalayer/RandomAccesDataProvider.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/kato/trunk/org.apache.kato/kato.hprof.reader/src/main/java/org/apache/kato/hprof/datalayer/StaticFieldEntry.java
URL: http://svn.apache.org/viewvc/incubator/kato/trunk/org.apache.kato/kato.hprof.reader/src/main/java/org/apache/kato/hprof/datalayer/StaticFieldEntry.java?rev=883384&r1=883383&r2=883384&view=diff
==============================================================================
--- incubator/kato/trunk/org.apache.kato/kato.hprof.reader/src/main/java/org/apache/kato/hprof/datalayer/StaticFieldEntry.java (original)
+++ incubator/kato/trunk/org.apache.kato/kato.hprof.reader/src/main/java/org/apache/kato/hprof/datalayer/StaticFieldEntry.java Mon Nov 23 15:53:48 2009
@@ -1,79 +1,79 @@
-/*******************************************************************************
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * 
- *   http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- ******************************************************************************/
-package org.apache.kato.hprof.datalayer;
-
-/**
- * Represents a static field in a class on the heap.
- * Provides methods to retrieve its value.
- */
-public class StaticFieldEntry extends FieldEntry {
-	public StaticFieldEntry(long fieldNameID, short type, long data) {
-		this.fieldNameID = fieldNameID;
-		this.type = type;
-		this.data = data;
-	}
-	
-	/**
-	 * The data. Fields are either ID's of objects or numbers,
-	 * all should fit within a long. 
-	 */
-	private long data;
-	
-	public long getData() {
-		return data;
-	}
-	
-	public byte getByteField() {
-		return (byte) data;
-	}
-
-
-	public char getCharField() {
-		return (char) data;
-	}
-
-
-	public double getDoubleField() {
-		return Double.longBitsToDouble(data);
-	}
-
-
-	public float getFloatField() {
-		return Float.intBitsToFloat((int) data);
-	}
-
-
-	public long getIDField() {		
-		return data;
-	}
-
-
-	public int getIntegerField() {
-		return (int)data;
-	}
-
-	
-	public long getLongField() {	
-		return data;
-	}
-
-
-	public short getShortField() {
-		return (short)data;
-	}
-
-	public boolean getBooleanField() {
-		return !(data == 0L);
-	}
+/*******************************************************************************
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ ******************************************************************************/
+package org.apache.kato.hprof.datalayer;
+
+/**
+ * Represents a static field in a class on the heap.
+ * Provides methods to retrieve its value.
+ */
+public class StaticFieldEntry extends FieldEntry {
+	public StaticFieldEntry(long fieldNameID, short type, long data) {
+		this.fieldNameID = fieldNameID;
+		this.type = type;
+		this.data = data;
+	}
+	
+	/**
+	 * The data. Fields are either ID's of objects or numbers,
+	 * all should fit within a long. 
+	 */
+	private long data;
+	
+	public long getData() {
+		return data;
+	}
+	
+	public byte getByteField() {
+		return (byte) data;
+	}
+
+
+	public char getCharField() {
+		return (char) data;
+	}
+
+
+	public double getDoubleField() {
+		return Double.longBitsToDouble(data);
+	}
+
+
+	public float getFloatField() {
+		return Float.intBitsToFloat((int) data);
+	}
+
+
+	public long getIDField() {		
+		return data;
+	}
+
+
+	public int getIntegerField() {
+		return (int)data;
+	}
+
+	
+	public long getLongField() {	
+		return data;
+	}
+
+
+	public short getShortField() {
+		return (short)data;
+	}
+
+	public boolean getBooleanField() {
+		return !(data == 0L);
+	}
 }
\ No newline at end of file

Propchange: incubator/kato/trunk/org.apache.kato/kato.hprof.reader/src/main/java/org/apache/kato/hprof/datalayer/StaticFieldEntry.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/kato/trunk/org.apache.kato/kato.hprof.reader/src/test/java/org/apache/kato/hprof/HProfViewTest.java
URL: http://svn.apache.org/viewvc/incubator/kato/trunk/org.apache.kato/kato.hprof.reader/src/test/java/org/apache/kato/hprof/HProfViewTest.java?rev=883384&r1=883383&r2=883384&view=diff
==============================================================================
--- incubator/kato/trunk/org.apache.kato/kato.hprof.reader/src/test/java/org/apache/kato/hprof/HProfViewTest.java (original)
+++ incubator/kato/trunk/org.apache.kato/kato.hprof.reader/src/test/java/org/apache/kato/hprof/HProfViewTest.java Mon Nov 23 15:53:48 2009
@@ -1,59 +1,59 @@
-/*******************************************************************************
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * 
- *   http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- ******************************************************************************/
-package org.apache.kato.hprof;
-
-import java.io.File;
-import java.net.URI;
-import java.net.URL;
-import java.util.Collection;
-
-import junit.framework.TestCase;
-
-import org.apache.kato.hprof.datalayer.HProfFactory;
-import org.apache.kato.hprof.datalayer.HProfFile;
-
-public class HProfViewTest extends TestCase {
-	HProfFile file;
-	HProfView view;
-	
-	public void setUp() throws Exception {
-		URL datafile=getClass().getResource("/data/java.hprof");
-		URI i=datafile.toURI();
-		File file2=new File(i);
-		file = HProfFactory.createReader(file2);
-		file.open();
-		view = new HProfView(file);
-		view.open(null);
-	}
-	
-	public void testClassLoaders() {
-		Collection<IJavaClassLoader> loaders = view.getJavaClassLoaders();
-		
-		for(IJavaClassLoader loader : loaders) {	 		
-	 	
-	 		System.out.println("\nloader = 0x"+Long.toHexString(loader.getID()));
-	 		System.out.println("==============================");
-	 		
-	 		Collection<Long> classes = loader.getClasses();
-	 		
-	 		for ( Long clazz : classes ) {
-	 			IJavaClass classObj = view.getJavaClassByID(clazz);
-	 			
-	 			System.out.println("\t0x"+Long.toHexString(clazz)+ ": "+ 
-	 					Long.toHexString(classObj.getClassObjectID())+
-	 					" "+classObj.getClassName());	 
-	 		}
-	 	}
-	}
-}
+/*******************************************************************************
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ ******************************************************************************/
+package org.apache.kato.hprof;
+
+import java.io.File;
+import java.net.URI;
+import java.net.URL;
+import java.util.Collection;
+
+import junit.framework.TestCase;
+
+import org.apache.kato.hprof.datalayer.HProfFactory;
+import org.apache.kato.hprof.datalayer.HProfFile;
+
+public class HProfViewTest extends TestCase {
+	HProfFile file;
+	HProfView view;
+	
+	public void setUp() throws Exception {
+		URL datafile=getClass().getResource("/data/java.hprof");
+		URI i=datafile.toURI();
+		File file2=new File(i);
+		file = HProfFactory.createReader(file2);
+		file.open();
+		view = new HProfView(file);
+		view.open(null);
+	}
+	
+	public void testClassLoaders() {
+		Collection<IJavaClassLoader> loaders = view.getJavaClassLoaders();
+		
+		for(IJavaClassLoader loader : loaders) {	 		
+	 	
+	 		System.out.println("\nloader = 0x"+Long.toHexString(loader.getID()));
+	 		System.out.println("==============================");
+	 		
+	 		Collection<Long> classes = loader.getClasses();
+	 		
+	 		for ( Long clazz : classes ) {
+	 			IJavaClass classObj = view.getJavaClassByID(clazz);
+	 			
+	 			System.out.println("\t0x"+Long.toHexString(clazz)+ ": "+ 
+	 					Long.toHexString(classObj.getClassObjectID())+
+	 					" "+classObj.getClassName());	 
+	 		}
+	 	}
+	}
+}

Propchange: incubator/kato/trunk/org.apache.kato/kato.hprof.reader/src/test/java/org/apache/kato/hprof/HProfViewTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/kato/trunk/org.apache.kato/kato.hprof.reader/src/test/java/test/apache/kato/common/AllTests.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/kato/trunk/org.apache.kato/kato.hprof.reader/src/test/java/test/apache/kato/common/TestArrayBitMaskMappingStrategy.java
URL: http://svn.apache.org/viewvc/incubator/kato/trunk/org.apache.kato/kato.hprof.reader/src/test/java/test/apache/kato/common/TestArrayBitMaskMappingStrategy.java?rev=883384&r1=883383&r2=883384&view=diff
==============================================================================
--- incubator/kato/trunk/org.apache.kato/kato.hprof.reader/src/test/java/test/apache/kato/common/TestArrayBitMaskMappingStrategy.java (original)
+++ incubator/kato/trunk/org.apache.kato/kato.hprof.reader/src/test/java/test/apache/kato/common/TestArrayBitMaskMappingStrategy.java Mon Nov 23 15:53:48 2009
@@ -1,292 +1,292 @@
-/*******************************************************************************
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * 
- *   http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- ******************************************************************************/
-package test.apache.kato.common;
-
-import junit.framework.TestCase;
-
-import org.apache.kato.common.ArrayBitMaskMappingStrategy;
-
-public class TestArrayBitMaskMappingStrategy extends TestCase {
-
-	
-	
-	public void report(int arraySize,int elementNo1,int elementNo2) {
-		
-		
-		System.out.println("Array Size        = "+arraySize);
-		System.out.println("Element Nos       = "+elementNo1+","+elementNo2+" ("+Integer.toBinaryString(elementNo2));
-		int maxBitShift=  (int) (31 - (Math.log10(arraySize)/Math.log10(2)))+1;
-		System.out.println("Maximum bit shift = "+maxBitShift);
-		
-		ArrayBitMaskMappingStrategy c=new ArrayBitMaskMappingStrategy(arraySize,2);
-		
-		int arrayIndex1 =   c.getIndexArrayElement(elementNo1);
-		int seekCount1  =   c.getSeekCount(elementNo1);
-		
-		System.out.println("Array Index1       = "+arrayIndex1+" : "+seekCount1);
-		
-		int arrayIndex2 =  c.getIndexArrayElement(elementNo2);
-		int seekCount2  =  c.getSeekCount(elementNo2);
-		
-		System.out.println("Array Index2       = "+arrayIndex2+" : "+seekCount2);
-		
-		int bitcount=(int) (Math.log10(elementNo2)/Math.log10(2))+1;
-		int max= ( 1 << bitcount ) -1;
-		System.out.println("Element2 bitcount  = "+bitcount+" ( Max is "+max+")");
-		int newBucketSize=max/arraySize;
-		int bitcountBS=(int) (Math.log10(newBucketSize)/Math.log10(2))+1;
-		int maxBS= ( 1 << bitcountBS ) -1;
-		System.out.println("new bitcount       = "+bitcountBS+" ( Max is "+maxBS+")");
-		System.out.println("new bucket size    = "+maxBS+"  ("+(maxBS*arraySize)+")("+Integer.toBinaryString(maxBS));
-		
-		
-	}
-	
-	
-	
-	public void testArraySize1bit() {
-		
-		ArrayBitMaskMappingStrategy c=new ArrayBitMaskMappingStrategy(8,2);
-		assertEquals(8,c.getArraySize());
-
-		
-	}
-
-	public void testBucketSize1bit() {
-		
-		ArrayBitMaskMappingStrategy c=new ArrayBitMaskMappingStrategy(8,2);
-		assertEquals(2,c.getBucketSize());
-		
-	}
-	public void testArraySize5bit() {
-		
-		ArrayBitMaskMappingStrategy c=new ArrayBitMaskMappingStrategy(8,30);
-		assertEquals(8,c.getArraySize());
-
-		
-	}
-
-	public void testBucketSize5bit() {
-		
-		ArrayBitMaskMappingStrategy c=new ArrayBitMaskMappingStrategy(8,30);
-		assertEquals(32,c.getBucketSize());
-		
-	}
-
-	public void testGet0ElementFrom1Bit() {
-		
-		ArrayBitMaskMappingStrategy c=new ArrayBitMaskMappingStrategy(8,2);
-		assertEquals(0,c.getIndexArrayElement(0));
-		assertEquals(0,c.getSeekCount(0));
-		
-	}
-	public void testGet0ElementSeekCountFrom1Bit() {
-		
-		ArrayBitMaskMappingStrategy c=new ArrayBitMaskMappingStrategy(8,2);
-		assertEquals(0,c.getSeekCount(0));
-		
-	}
-	
-	public void testGet1ElementFrom1Bit() {
-		
-		ArrayBitMaskMappingStrategy c=new ArrayBitMaskMappingStrategy(8,2);
-		assertEquals(0,c.getIndexArrayElement(1));
-		
-		
-	}
-	public void testGet1ElementSeekFrom1Bit() {
-		
-		ArrayBitMaskMappingStrategy c=new ArrayBitMaskMappingStrategy(8,2);
-		assertEquals(1,c.getSeekCount(1));
-		
-	}
-	
-	public void testGet3ElementFrom1Bit() {
-		
-		ArrayBitMaskMappingStrategy c=new ArrayBitMaskMappingStrategy(8,2);
-		assertEquals(1,c.getIndexArrayElement(3));
-		
-		
-	}
-	public void testGet3ElementSeekFrom1Bit() {
-		
-		ArrayBitMaskMappingStrategy c=new ArrayBitMaskMappingStrategy(8,2);
-		assertEquals(1,c.getSeekCount(3));
-		
-	}
-
-	public void testGet15ElementFrom1Bit() {
-		
-		ArrayBitMaskMappingStrategy c=new ArrayBitMaskMappingStrategy(8,2);
-		assertEquals(7,c.getIndexArrayElement(15));
-		
-		
-	}
-	public void testGet15ElementSeekFrom1Bit() {
-		
-		ArrayBitMaskMappingStrategy c=new ArrayBitMaskMappingStrategy(8,2);
-		assertEquals(1,c.getSeekCount(15));
-		
-	}
-	
-
-	public void testGet0ElementFrom5Bit() {
-		
-		ArrayBitMaskMappingStrategy c=new ArrayBitMaskMappingStrategy(8,30);
-		assertEquals(0,c.getIndexArrayElement(0));
-		assertEquals(0,c.getSeekCount(0));
-		
-	}
-
-	public void testGet0ElementSeekCountFrom5Bit() {
-		
-		ArrayBitMaskMappingStrategy c=new ArrayBitMaskMappingStrategy(8,30);
-		assertEquals(0,c.getSeekCount(0));
-		
-	}
-
-	public void testGet1ElementFrom5Bit() {
-		
-		ArrayBitMaskMappingStrategy c=new ArrayBitMaskMappingStrategy(8,30);
-		assertEquals(0,c.getIndexArrayElement(1));
-		
-		
-	}
-
-	public void testGet1ElementSeekFrom5Bit() {
-		
-		ArrayBitMaskMappingStrategy c=new ArrayBitMaskMappingStrategy(8,30);
-		assertEquals(1,c.getSeekCount(1));
-		
-	}
-
-	public void testGet3ElementFrom5Bit() {
-		
-		ArrayBitMaskMappingStrategy c=new ArrayBitMaskMappingStrategy(8,30);
-		assertEquals(0,c.getIndexArrayElement(3));
-		
-		
-	}
-
-	public void testGet3ElementSeekFrom5Bit() {
-		
-		ArrayBitMaskMappingStrategy c=new ArrayBitMaskMappingStrategy(8,30);
-		assertEquals(3,c.getSeekCount(3));
-		
-	}
-
-	public void testGet64ElementFrom5Bit() {
-		
-		ArrayBitMaskMappingStrategy c=new ArrayBitMaskMappingStrategy(8,30);
-		assertEquals(2,c.getIndexArrayElement(64));
-		
-		
-	}
-
-	public void testGet64ElementSeekFrom5Bit() {
-		
-		ArrayBitMaskMappingStrategy c=new ArrayBitMaskMappingStrategy(8,30);
-		assertEquals(0,c.getSeekCount(64));
-		
-	}
-
-	public void testGet500ElementFrom5Bit() {
-		
-		ArrayBitMaskMappingStrategy c=new ArrayBitMaskMappingStrategy(8,30);
-		assertEquals(-1,c.getIndexArrayElement(500));
-		
-	}
-	
-	public void testDoubleCapacityReturnsObject() {
-		ArrayBitMaskMappingStrategy c=new ArrayBitMaskMappingStrategy(8,30);
-		ArrayBitMaskMappingStrategy newStrategy=c.doubleCapacity();
-		assertNotNull(newStrategy);
-	}
-	public void testDoubleCapacityReturnsNull() {
-		ArrayBitMaskMappingStrategy c=new ArrayBitMaskMappingStrategy(8,(Integer.MAX_VALUE/2)+50);
-		ArrayBitMaskMappingStrategy newStrategy=c.doubleCapacity();
-		assertNull(newStrategy);
-	}
-	public void testDoubleCapacityArraySize() {
-		ArrayBitMaskMappingStrategy c=new ArrayBitMaskMappingStrategy(8,30);
-		ArrayBitMaskMappingStrategy newStrategy=c.doubleCapacity();
-		assertEquals(8,newStrategy.getArraySize());
-		
-		
-	}
-	public void testDoubleCapacityBucketSize() {
-		ArrayBitMaskMappingStrategy c=new ArrayBitMaskMappingStrategy(8,30);
-		ArrayBitMaskMappingStrategy newStrategy=c.doubleCapacity();
-		assertEquals(64,newStrategy.getBucketSize());
-		
-	}
-	public void testSmallArrayMapping1Bit() {
-		
-		int[] data=new int[8];
-		ArrayBitMaskMappingStrategy c=new ArrayBitMaskMappingStrategy(8,2);
-		for(int i=0;i<16;i++) {
-			int location=c.getIndexArrayElement(i);
-			int seek=c.getSeekCount(i);
-			if(seek==0) data[location]=i;
-		}
-		
-		assertEquals(0,data[0]);
-		assertEquals(2,data[1]);
-		assertEquals(4,data[2]);
-		assertEquals(6,data[3]);
-		assertEquals(8,data[4]);
-		assertEquals(10,data[5]);
-		assertEquals(12,data[6]);
-		assertEquals(14,data[7]);
-		
-		
-		
-	}
-	
-
-	public void testSmallArrayDoubling1Bit() {
-		
-		int[] data=new int[8];
-		ArrayBitMaskMappingStrategy c=new ArrayBitMaskMappingStrategy(8,2);
-		for(int i=0;i<16;i++) {
-			int location=c.getIndexArrayElement(i);
-			int seek=c.getSeekCount(i);
-			if(seek==0) data[location]=i;
-		}
-		
-		c=c.doubleCapacity();
-		
-		for(int i=0;i<16;i++) {
-			int location=c.getIndexArrayElement(i);
-			int seek=c.getSeekCount(i);
-			if(seek==0) {
-				assertEquals(data[location]*2,i);
-			}
-		}
-			
-		
-		
-	}
-	
-	public void printWible() {
-		
-		for(int i=2;i<32;i++) {
-			int bitshift=(int) (Math.log10(i-1)/Math.log10(2));
-			int shifted= 1 << bitshift;
-			int mask   = (1 << (bitshift+1))-1;
-			int max    = mask+1;
-			System.out.println(""+i+"("+max+")="+bitshift+" "+Integer.toBinaryString(i)+" "+Integer.toBinaryString(shifted)+ " "+Integer.toBinaryString(mask));
-		}
-	}
-}
+/*******************************************************************************
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ ******************************************************************************/
+package test.apache.kato.common;
+
+import junit.framework.TestCase;
+
+import org.apache.kato.common.ArrayBitMaskMappingStrategy;
+
+public class TestArrayBitMaskMappingStrategy extends TestCase {
+
+	
+	
+	public void report(int arraySize,int elementNo1,int elementNo2) {
+		
+		
+		System.out.println("Array Size        = "+arraySize);
+		System.out.println("Element Nos       = "+elementNo1+","+elementNo2+" ("+Integer.toBinaryString(elementNo2));
+		int maxBitShift=  (int) (31 - (Math.log10(arraySize)/Math.log10(2)))+1;
+		System.out.println("Maximum bit shift = "+maxBitShift);
+		
+		ArrayBitMaskMappingStrategy c=new ArrayBitMaskMappingStrategy(arraySize,2);
+		
+		int arrayIndex1 =   c.getIndexArrayElement(elementNo1);
+		int seekCount1  =   c.getSeekCount(elementNo1);
+		
+		System.out.println("Array Index1       = "+arrayIndex1+" : "+seekCount1);
+		
+		int arrayIndex2 =  c.getIndexArrayElement(elementNo2);
+		int seekCount2  =  c.getSeekCount(elementNo2);
+		
+		System.out.println("Array Index2       = "+arrayIndex2+" : "+seekCount2);
+		
+		int bitcount=(int) (Math.log10(elementNo2)/Math.log10(2))+1;
+		int max= ( 1 << bitcount ) -1;
+		System.out.println("Element2 bitcount  = "+bitcount+" ( Max is "+max+")");
+		int newBucketSize=max/arraySize;
+		int bitcountBS=(int) (Math.log10(newBucketSize)/Math.log10(2))+1;
+		int maxBS= ( 1 << bitcountBS ) -1;
+		System.out.println("new bitcount       = "+bitcountBS+" ( Max is "+maxBS+")");
+		System.out.println("new bucket size    = "+maxBS+"  ("+(maxBS*arraySize)+")("+Integer.toBinaryString(maxBS));
+		
+		
+	}
+	
+	
+	
+	public void testArraySize1bit() {
+		
+		ArrayBitMaskMappingStrategy c=new ArrayBitMaskMappingStrategy(8,2);
+		assertEquals(8,c.getArraySize());
+
+		
+	}
+
+	public void testBucketSize1bit() {
+		
+		ArrayBitMaskMappingStrategy c=new ArrayBitMaskMappingStrategy(8,2);
+		assertEquals(2,c.getBucketSize());
+		
+	}
+	public void testArraySize5bit() {
+		
+		ArrayBitMaskMappingStrategy c=new ArrayBitMaskMappingStrategy(8,30);
+		assertEquals(8,c.getArraySize());
+
+		
+	}
+
+	public void testBucketSize5bit() {
+		
+		ArrayBitMaskMappingStrategy c=new ArrayBitMaskMappingStrategy(8,30);
+		assertEquals(32,c.getBucketSize());
+		
+	}
+
+	public void testGet0ElementFrom1Bit() {
+		
+		ArrayBitMaskMappingStrategy c=new ArrayBitMaskMappingStrategy(8,2);
+		assertEquals(0,c.getIndexArrayElement(0));
+		assertEquals(0,c.getSeekCount(0));
+		
+	}
+	public void testGet0ElementSeekCountFrom1Bit() {
+		
+		ArrayBitMaskMappingStrategy c=new ArrayBitMaskMappingStrategy(8,2);
+		assertEquals(0,c.getSeekCount(0));
+		
+	}
+	
+	public void testGet1ElementFrom1Bit() {
+		
+		ArrayBitMaskMappingStrategy c=new ArrayBitMaskMappingStrategy(8,2);
+		assertEquals(0,c.getIndexArrayElement(1));
+		
+		
+	}
+	public void testGet1ElementSeekFrom1Bit() {
+		
+		ArrayBitMaskMappingStrategy c=new ArrayBitMaskMappingStrategy(8,2);
+		assertEquals(1,c.getSeekCount(1));
+		
+	}
+	
+	public void testGet3ElementFrom1Bit() {
+		
+		ArrayBitMaskMappingStrategy c=new ArrayBitMaskMappingStrategy(8,2);
+		assertEquals(1,c.getIndexArrayElement(3));
+		
+		
+	}
+	public void testGet3ElementSeekFrom1Bit() {
+		
+		ArrayBitMaskMappingStrategy c=new ArrayBitMaskMappingStrategy(8,2);
+		assertEquals(1,c.getSeekCount(3));
+		
+	}
+
+	public void testGet15ElementFrom1Bit() {
+		
+		ArrayBitMaskMappingStrategy c=new ArrayBitMaskMappingStrategy(8,2);
+		assertEquals(7,c.getIndexArrayElement(15));
+		
+		
+	}
+	public void testGet15ElementSeekFrom1Bit() {
+		
+		ArrayBitMaskMappingStrategy c=new ArrayBitMaskMappingStrategy(8,2);
+		assertEquals(1,c.getSeekCount(15));
+		
+	}
+	
+
+	public void testGet0ElementFrom5Bit() {
+		
+		ArrayBitMaskMappingStrategy c=new ArrayBitMaskMappingStrategy(8,30);
+		assertEquals(0,c.getIndexArrayElement(0));
+		assertEquals(0,c.getSeekCount(0));
+		
+	}
+
+	public void testGet0ElementSeekCountFrom5Bit() {
+		
+		ArrayBitMaskMappingStrategy c=new ArrayBitMaskMappingStrategy(8,30);
+		assertEquals(0,c.getSeekCount(0));
+		
+	}
+
+	public void testGet1ElementFrom5Bit() {
+		
+		ArrayBitMaskMappingStrategy c=new ArrayBitMaskMappingStrategy(8,30);
+		assertEquals(0,c.getIndexArrayElement(1));
+		
+		
+	}
+
+	public void testGet1ElementSeekFrom5Bit() {
+		
+		ArrayBitMaskMappingStrategy c=new ArrayBitMaskMappingStrategy(8,30);
+		assertEquals(1,c.getSeekCount(1));
+		
+	}
+
+	public void testGet3ElementFrom5Bit() {
+		
+		ArrayBitMaskMappingStrategy c=new ArrayBitMaskMappingStrategy(8,30);
+		assertEquals(0,c.getIndexArrayElement(3));
+		
+		
+	}
+
+	public void testGet3ElementSeekFrom5Bit() {
+		
+		ArrayBitMaskMappingStrategy c=new ArrayBitMaskMappingStrategy(8,30);
+		assertEquals(3,c.getSeekCount(3));
+		
+	}
+
+	public void testGet64ElementFrom5Bit() {
+		
+		ArrayBitMaskMappingStrategy c=new ArrayBitMaskMappingStrategy(8,30);
+		assertEquals(2,c.getIndexArrayElement(64));
+		
+		
+	}
+
+	public void testGet64ElementSeekFrom5Bit() {
+		
+		ArrayBitMaskMappingStrategy c=new ArrayBitMaskMappingStrategy(8,30);
+		assertEquals(0,c.getSeekCount(64));
+		
+	}
+
+	public void testGet500ElementFrom5Bit() {
+		
+		ArrayBitMaskMappingStrategy c=new ArrayBitMaskMappingStrategy(8,30);
+		assertEquals(-1,c.getIndexArrayElement(500));
+		
+	}
+	
+	public void testDoubleCapacityReturnsObject() {
+		ArrayBitMaskMappingStrategy c=new ArrayBitMaskMappingStrategy(8,30);
+		ArrayBitMaskMappingStrategy newStrategy=c.doubleCapacity();
+		assertNotNull(newStrategy);
+	}
+	public void testDoubleCapacityReturnsNull() {
+		ArrayBitMaskMappingStrategy c=new ArrayBitMaskMappingStrategy(8,(Integer.MAX_VALUE/2)+50);
+		ArrayBitMaskMappingStrategy newStrategy=c.doubleCapacity();
+		assertNull(newStrategy);
+	}
+	public void testDoubleCapacityArraySize() {
+		ArrayBitMaskMappingStrategy c=new ArrayBitMaskMappingStrategy(8,30);
+		ArrayBitMaskMappingStrategy newStrategy=c.doubleCapacity();
+		assertEquals(8,newStrategy.getArraySize());
+		
+		
+	}
+	public void testDoubleCapacityBucketSize() {
+		ArrayBitMaskMappingStrategy c=new ArrayBitMaskMappingStrategy(8,30);
+		ArrayBitMaskMappingStrategy newStrategy=c.doubleCapacity();
+		assertEquals(64,newStrategy.getBucketSize());
+		
+	}
+	public void testSmallArrayMapping1Bit() {
+		
+		int[] data=new int[8];
+		ArrayBitMaskMappingStrategy c=new ArrayBitMaskMappingStrategy(8,2);
+		for(int i=0;i<16;i++) {
+			int location=c.getIndexArrayElement(i);
+			int seek=c.getSeekCount(i);
+			if(seek==0) data[location]=i;
+		}
+		
+		assertEquals(0,data[0]);
+		assertEquals(2,data[1]);
+		assertEquals(4,data[2]);
+		assertEquals(6,data[3]);
+		assertEquals(8,data[4]);
+		assertEquals(10,data[5]);
+		assertEquals(12,data[6]);
+		assertEquals(14,data[7]);
+		
+		
+		
+	}
+	
+
+	public void testSmallArrayDoubling1Bit() {
+		
+		int[] data=new int[8];
+		ArrayBitMaskMappingStrategy c=new ArrayBitMaskMappingStrategy(8,2);
+		for(int i=0;i<16;i++) {
+			int location=c.getIndexArrayElement(i);
+			int seek=c.getSeekCount(i);
+			if(seek==0) data[location]=i;
+		}
+		
+		c=c.doubleCapacity();
+		
+		for(int i=0;i<16;i++) {
+			int location=c.getIndexArrayElement(i);
+			int seek=c.getSeekCount(i);
+			if(seek==0) {
+				assertEquals(data[location]*2,i);
+			}
+		}
+			
+		
+		
+	}
+	
+	public void printWible() {
+		
+		for(int i=2;i<32;i++) {
+			int bitshift=(int) (Math.log10(i-1)/Math.log10(2));
+			int shifted= 1 << bitshift;
+			int mask   = (1 << (bitshift+1))-1;
+			int max    = mask+1;
+			System.out.println(""+i+"("+max+")="+bitshift+" "+Integer.toBinaryString(i)+" "+Integer.toBinaryString(shifted)+ " "+Integer.toBinaryString(mask));
+		}
+	}
+}

Propchange: incubator/kato/trunk/org.apache.kato/kato.hprof.reader/src/test/java/test/apache/kato/common/TestArrayBitMaskMappingStrategy.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/kato/trunk/org.apache.kato/kato.hprof.reader/src/test/java/test/apache/kato/common/TestArrayCompactor.java
URL: http://svn.apache.org/viewvc/incubator/kato/trunk/org.apache.kato/kato.hprof.reader/src/test/java/test/apache/kato/common/TestArrayCompactor.java?rev=883384&r1=883383&r2=883384&view=diff
==============================================================================
--- incubator/kato/trunk/org.apache.kato/kato.hprof.reader/src/test/java/test/apache/kato/common/TestArrayCompactor.java (original)
+++ incubator/kato/trunk/org.apache.kato/kato.hprof.reader/src/test/java/test/apache/kato/common/TestArrayCompactor.java Mon Nov 23 15:53:48 2009
@@ -1,38 +1,38 @@
-/*******************************************************************************
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * 
- *   http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- ******************************************************************************/
-package test.apache.kato.common;
-
-import org.apache.kato.common.ArrayCompactor;
-
-import junit.framework.TestCase;
-
-public class TestArrayCompactor extends TestCase {
-
-	
-	public void testCompactArray() {
-		
-		long[] array=new long[]{100,50,45,30,56,90,89,2,0,0,0 };
-		int last=7;
-		long[] results=new long[]{100,45,56,89,56,90,89,2,0,0,0 };
-		int expectedLast=3;
-		
-		int result=ArrayCompactor.compact(array, last);
-		assertEquals(expectedLast,result);
-		
-		for(int i=0;i<results.length;i++) {
-			assertEquals("Element "+i,results[i],array[i]);
-		}
-		
-	}
-}
+/*******************************************************************************
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ ******************************************************************************/
+package test.apache.kato.common;
+
+import org.apache.kato.common.ArrayCompactor;
+
+import junit.framework.TestCase;
+
+public class TestArrayCompactor extends TestCase {
+
+	
+	public void testCompactArray() {
+		
+		long[] array=new long[]{100,50,45,30,56,90,89,2,0,0,0 };
+		int last=7;
+		long[] results=new long[]{100,45,56,89,56,90,89,2,0,0,0 };
+		int expectedLast=3;
+		
+		int result=ArrayCompactor.compact(array, last);
+		assertEquals(expectedLast,result);
+		
+		for(int i=0;i<results.length;i++) {
+			assertEquals("Element "+i,results[i],array[i]);
+		}
+		
+	}
+}

Propchange: incubator/kato/trunk/org.apache.kato/kato.hprof.reader/src/test/java/test/apache/kato/common/TestArrayCompactor.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/kato/trunk/org.apache.kato/kato.hprof.reader/src/test/java/test/apache/kato/common/TestBitMaskMappingArray.java
URL: http://svn.apache.org/viewvc/incubator/kato/trunk/org.apache.kato/kato.hprof.reader/src/test/java/test/apache/kato/common/TestBitMaskMappingArray.java?rev=883384&r1=883383&r2=883384&view=diff
==============================================================================
--- incubator/kato/trunk/org.apache.kato/kato.hprof.reader/src/test/java/test/apache/kato/common/TestBitMaskMappingArray.java (original)
+++ incubator/kato/trunk/org.apache.kato/kato.hprof.reader/src/test/java/test/apache/kato/common/TestBitMaskMappingArray.java Mon Nov 23 15:53:48 2009
@@ -1,95 +1,95 @@
-/*******************************************************************************
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * 
- *   http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- ******************************************************************************/
-package test.apache.kato.common;
-
-import java.util.List;
-
-import junit.framework.TestCase;
-
-import org.apache.kato.common.BitMaskMappingArray;
-import org.apache.kato.common.IArrayEntryProvider;
-
-public class TestBitMaskMappingArray extends TestCase{
-
-	
-	public void testCreation() {
-		
-		BitMaskMappingArray array=new  BitMaskMappingArray(8,2,null);
-	}
-	
-	public void testSingleSpanSeek() {
-		BitMaskMappingArray array=new  BitMaskMappingArray(8,2,new MockArrayEntryProvider());
-		
-		for(int i=0;i<8;i++) {
-			Long l=(Long) array.get(i);
-			assertEquals(i,l.intValue());
-		}
-	}
-	
-	public void testDoubleSpanSeek() {
-		BitMaskMappingArray array=new  BitMaskMappingArray(8,2,new MockArrayEntryProvider());
-		
-		for(int i=9;i<24;i++) {
-			Long l=(Long) array.get(i);
-			assertEquals(i,l.intValue());
-		}
-	}
-	
-	public void testLargeSpanSeek() {
-		BitMaskMappingArray array=new  BitMaskMappingArray(8,2,new MockArrayEntryProvider());
-		
-		Long l=(Long) array.get(100);
-		assertEquals(100,l.intValue());
-		
-		l=(Long) array.get(1000);
-		assertEquals(1000,l.intValue());
-		
-		
-		
-	}
-	class MockArrayEntryProvider implements IArrayEntryProvider {
-
-		long location=0;
-		@Override
-		public Object getCurrentElement() {
-			
-			return new Long(location);
-		}
-
-		@Override
-		public boolean moveRelativeElement(int seekNo) {
-			location+=seekNo;
-			return true;
-		}
-
-		@Override
-		public boolean moveToLocation(long l) {
-			location=l;
-			return true;
-		}
-
-		@Override
-		public long getCurrentLocation() {
-			
-			return location;
-		}
-
-		@Override
-		public void getState(List state) {
-			// TODO Auto-generated method stub
-			
-		}
-		
-	}
-}
+/*******************************************************************************
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ ******************************************************************************/
+package test.apache.kato.common;
+
+import java.util.List;
+
+import junit.framework.TestCase;
+
+import org.apache.kato.common.BitMaskMappingArray;
+import org.apache.kato.common.IArrayEntryProvider;
+
+public class TestBitMaskMappingArray extends TestCase{
+
+	
+	public void testCreation() {
+		
+		BitMaskMappingArray array=new  BitMaskMappingArray(8,2,null);
+	}
+	
+	public void testSingleSpanSeek() {
+		BitMaskMappingArray array=new  BitMaskMappingArray(8,2,new MockArrayEntryProvider());
+		
+		for(int i=0;i<8;i++) {
+			Long l=(Long) array.get(i);
+			assertEquals(i,l.intValue());
+		}
+	}
+	
+	public void testDoubleSpanSeek() {
+		BitMaskMappingArray array=new  BitMaskMappingArray(8,2,new MockArrayEntryProvider());
+		
+		for(int i=9;i<24;i++) {
+			Long l=(Long) array.get(i);
+			assertEquals(i,l.intValue());
+		}
+	}
+	
+	public void testLargeSpanSeek() {
+		BitMaskMappingArray array=new  BitMaskMappingArray(8,2,new MockArrayEntryProvider());
+		
+		Long l=(Long) array.get(100);
+		assertEquals(100,l.intValue());
+		
+		l=(Long) array.get(1000);
+		assertEquals(1000,l.intValue());
+		
+		
+		
+	}
+	class MockArrayEntryProvider implements IArrayEntryProvider {
+
+		long location=0;
+		@Override
+		public Object getCurrentElement() {
+			
+			return new Long(location);
+		}
+
+		@Override
+		public boolean moveRelativeElement(int seekNo) {
+			location+=seekNo;
+			return true;
+		}
+
+		@Override
+		public boolean moveToLocation(long l) {
+			location=l;
+			return true;
+		}
+
+		@Override
+		public long getCurrentLocation() {
+			
+			return location;
+		}
+
+		@Override
+		public void getState(List state) {
+			// TODO Auto-generated method stub
+			
+		}
+		
+	}
+}

Propchange: incubator/kato/trunk/org.apache.kato/kato.hprof.reader/src/test/java/test/apache/kato/common/TestBitMaskMappingArray.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/kato/trunk/org.apache.kato/kato.hprof.reader/src/test/java/test/apache/kato/common/TestCachedRandomAccessDataProvider.java
URL: http://svn.apache.org/viewvc/incubator/kato/trunk/org.apache.kato/kato.hprof.reader/src/test/java/test/apache/kato/common/TestCachedRandomAccessDataProvider.java?rev=883384&r1=883383&r2=883384&view=diff
==============================================================================
--- incubator/kato/trunk/org.apache.kato/kato.hprof.reader/src/test/java/test/apache/kato/common/TestCachedRandomAccessDataProvider.java (original)
+++ incubator/kato/trunk/org.apache.kato/kato.hprof.reader/src/test/java/test/apache/kato/common/TestCachedRandomAccessDataProvider.java Mon Nov 23 15:53:48 2009
@@ -1,61 +1,61 @@
-/*******************************************************************************
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * 
- *   http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- ******************************************************************************/
-package test.apache.kato.common;
-
-import java.io.File;
-import java.io.RandomAccessFile;
-
-import org.apache.kato.hprof.datalayer.CachedRandomAccesDataProvider;
-
-import junit.framework.TestCase;
-
-public class TestCachedRandomAccessDataProvider extends TestCase {
-	static File testFile = new File(System.getProperty("java.io.tmpdir")+File.separatorChar+"testFile");
-	
-	
-	public void setUp() throws Exception {
-		if(!testFile.exists()) {
-			RandomAccessFile raf = new RandomAccessFile(testFile,"rw");
-			
-			for(int i=0; i < 1048576; i++) {
-				raf.writeInt(i);
-			}
-			
-			raf.close();
-		}
-	}
-	
-	public void testRead() throws Exception {
-		CachedRandomAccesDataProvider provider = new CachedRandomAccesDataProvider(testFile);
-		provider.open();
-		
-		for(int i=0; i < 1048576; i++) {
-			int val = provider.readU4();
-			assertEquals(i,val);
-		}
-		provider.close();
-	}
-	
-	public void testReadBackwards() throws Exception {
-		CachedRandomAccesDataProvider provider = new CachedRandomAccesDataProvider(testFile);
-		provider.open();
-		
-		for(int i=1048572; i >0 ; i-=1) {
-			provider.moveTo(i*4);
-			int val = provider.readU4();
-			assertEquals(i,val);
-		}
-		provider.close();
-	}
-}
+/*******************************************************************************
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ ******************************************************************************/
+package test.apache.kato.common;
+
+import java.io.File;
+import java.io.RandomAccessFile;
+
+import org.apache.kato.hprof.datalayer.CachedRandomAccesDataProvider;
+
+import junit.framework.TestCase;
+
+public class TestCachedRandomAccessDataProvider extends TestCase {
+	static File testFile = new File(System.getProperty("java.io.tmpdir")+File.separatorChar+"testFile");
+	
+	
+	public void setUp() throws Exception {
+		if(!testFile.exists()) {
+			RandomAccessFile raf = new RandomAccessFile(testFile,"rw");
+			
+			for(int i=0; i < 1048576; i++) {
+				raf.writeInt(i);
+			}
+			
+			raf.close();
+		}
+	}
+	
+	public void testRead() throws Exception {
+		CachedRandomAccesDataProvider provider = new CachedRandomAccesDataProvider(testFile);
+		provider.open();
+		
+		for(int i=0; i < 1048576; i++) {
+			int val = provider.readU4();
+			assertEquals(i,val);
+		}
+		provider.close();
+	}
+	
+	public void testReadBackwards() throws Exception {
+		CachedRandomAccesDataProvider provider = new CachedRandomAccesDataProvider(testFile);
+		provider.open();
+		
+		for(int i=1048572; i >0 ; i-=1) {
+			provider.moveTo(i*4);
+			int val = provider.readU4();
+			assertEquals(i,val);
+		}
+		provider.close();
+	}
+}

Propchange: incubator/kato/trunk/org.apache.kato/kato.hprof.reader/src/test/java/test/apache/kato/common/TestCachedRandomAccessDataProvider.java
------------------------------------------------------------------------------
    svn:eol-style = native



Mime
View raw message