Revision 108 org.gvsig.dgn/trunk/org.gvsig.dgn/org.gvsig.dgn.provider/src/main/java/org/gvsig/fmap/dal/store/dgn/lib/DGNElemCore.java
DGNElemCore.java | ||
---|---|---|
19 | 19 |
*/ |
20 | 20 |
package org.gvsig.fmap.dal.store.dgn.lib; |
21 | 21 |
|
22 |
import java.util.Formatter; |
|
23 |
|
|
22 | 24 |
/** |
23 | 25 |
* Clase utilizada para guardar un elemento de tipo Base del cual extienden los |
24 | 26 |
* dem?s tipos. |
... | ... | |
136 | 138 |
public int getSType() { |
137 | 139 |
return this.stype; |
138 | 140 |
} |
141 |
|
|
142 |
|
|
143 |
public byte[] getData() { |
|
144 |
return this.raw_data; |
|
145 |
} |
|
146 |
|
|
147 |
public String getDataAsHexadecimal() { |
|
148 |
if( this.raw_data == null ) { |
|
149 |
return null; |
|
150 |
} |
|
151 |
Formatter out = new Formatter(); |
|
152 |
|
|
153 |
for (int i = 0; i < this.raw_data.length; i++) { |
|
154 |
int ch = this.raw_data[i] & 0xff; |
|
155 |
out.format("%02X", ch); |
|
156 |
} |
|
157 |
return out.toString(); |
|
158 |
} |
|
139 | 159 |
} |
Also available in: Unified diff