Coverage details for net.sf.tourviewer.ciclo.AbstractRecord

LineHitsSource
1 package net.sf.tourviewer.ciclo;
2  
3 import java.util.Formatter;
4  
5  
6 public abstract class AbstractRecord implements Record {
7     
8     private int[] data;
9  
100    public AbstractRecord(int[] data)
11     {
120        this.data = data;
130    }
14     
15     public int[] getData()
16     {
170        return null;
18     }
19  
20     public String getDataString()
21     {
220        StringBuilder sb = new StringBuilder(40);
230        Formatter formatter = new Formatter(sb);
24          
250        for (int i = 0; i < data.length; i++) {
260            formatter.format("%4H.", data[i]);
27         }
280        return sb.toString();
29     }
30     
31     public int getHex(int offset)
32     {
330        return data[offset];
34     }
35  
36     public int getHexL(int offset)
37     {
380        return data[offset] & 0x00FF;
39     }
40  
41     public int getHexH(int offset)
42     {
430        return (data[offset] & 0xFF00) >> 8;
44     }
45  
46     public int getDec(int offset)
47     {
480        return Integer.parseInt(Integer.toHexString(getHex(offset)) + "");
49     }
50     
51     public int getDecH(int offset)
52     {
530        return Integer.parseInt(Integer.toHexString(getHexH(offset)) + "");
54     }
55     
56     public int getDecL(int offset)
57     {
580        return Integer.parseInt(Integer.toHexString(getHexL(offset)) + "");
59     }
60     
61 }

this report was generated by version 1.0.5 of jcoverage.
visit www.jcoverage.com for updates.

copyright © 2003, jcoverage ltd. all rights reserved.
Java is a trademark of Sun Microsystems, Inc. in the United States and other countries.