Revision 76
trunk/org.gvsig.dwg/org.gvsig.dwg.lib/src/main/java/org/gvsig/dwg/lib/readers/DwgFileVR2004Reader.java | ||
---|---|---|
180 | 180 |
int pos; |
181 | 181 |
|
182 | 182 |
if (sectionInfoIndex == 0) { |
183 |
logger.error("No se ha encontrado la Section Info en el array de secciones.");
|
|
183 |
logger.trace("No se ha encontrado la Section Info en el array de secciones.");
|
|
184 | 184 |
} |
185 | 185 |
|
186 | 186 |
pos = sections[sectionInfoIndex].getAddress(); // we get the address for the Section Info |
... | ... | |
251 | 251 |
*/ |
252 | 252 |
protected void readDwgR2004FileHeader(ByteBuffer bb) { |
253 | 253 |
|
254 |
logger.info("STARTING TO READ DWG FILE.");
|
|
254 |
logger.trace("STARTING TO READ DWG FILE.");
|
|
255 | 255 |
bb.order(ByteOrder.LITTLE_ENDIAN); |
256 | 256 |
for (int i = 0; i < 6; i++) { |
257 | 257 |
version = version + (char) bb.get(); |
258 | 258 |
} |
259 | 259 |
if (!version.equalsIgnoreCase("AC1018")) { |
260 |
logger.error("Error en la version: " + version);
|
|
260 |
logger.trace("Error en la version: " + version);
|
|
261 | 261 |
} |
262 | 262 |
|
263 | 263 |
/* |
... | ... | |
269 | 269 |
for (int i = 0; i < 5; i++) { |
270 | 270 |
unknowSixBytes[i] = bb.get(); |
271 | 271 |
if (unknowSixBytes[i] != 0) { |
272 |
logger.warn("(unknowSixBytes) En la posicion 0x"
|
|
272 |
logger.trace("(unknowSixBytes) En la posicion 0x"
|
|
273 | 273 |
+ Integer.toHexString(pos + i) |
274 | 274 |
+ " debería haber un 0, pero hay un 0x" |
275 | 275 |
+ Integer.toHexString(unknowSixBytes[i])); |
... | ... | |
278 | 278 |
pos = 0xB; |
279 | 279 |
unknowSixBytes[5] = bb.get(); |
280 | 280 |
if (unknowSixBytes[5] != 0x4C) { |
281 |
logger.warn("(unknowSixBytes) En la posicion 0x"
|
|
281 |
logger.trace("(unknowSixBytes) En la posicion 0x"
|
|
282 | 282 |
+ Integer.toHexString(pos) |
283 | 283 |
+ " debería haber un 0x4C, pero hay un 0x" |
284 | 284 |
+ Integer.toHexString(unknowSixBytes[5])); |
... | ... | |
298 | 298 |
pos = 0x15; |
299 | 299 |
bb.get(threeBytes0); |
300 | 300 |
if (threeBytes0[0] != 0x0) { |
301 |
logger.warn("Posible error leyendo la cabecera del archivo DWG: " +
|
|
301 |
logger.trace("Posible error leyendo la cabecera del archivo DWG: " +
|
|
302 | 302 |
"En la posicion 0x" + Integer.toHexString(pos) |
303 | 303 |
+ " deber?a haber un 0x0, pero hay un 0x" |
304 | 304 |
+ Integer.toHexString(threeBytes0[0])); |
305 | 305 |
} |
306 | 306 |
pos = 0x16; |
307 | 307 |
if (threeBytes0[1] != 0x19) { |
308 |
logger.warn("Posible error leyendo la cabecera del archivo DWG: " +
|
|
308 |
logger.trace("Posible error leyendo la cabecera del archivo DWG: " +
|
|
309 | 309 |
"En la posicion 0x" + Integer.toHexString(pos) |
310 | 310 |
+ " deber?a haber un 0x19, pero hay un 0x" |
311 | 311 |
+ Integer.toHexString(threeBytes0[1])); |
312 | 312 |
} |
313 | 313 |
pos = 0x17; |
314 | 314 |
if (threeBytes0[2] != 0x4C) { |
315 |
logger.warn("Posible error leyendo la cabecera del archivo DWG: " +
|
|
315 |
logger.trace("Posible error leyendo la cabecera del archivo DWG: " +
|
|
316 | 316 |
"En la posicion 0x" + Integer.toHexString(pos) |
317 | 317 |
+ " deber?a haber un 0x4C, pero hay un 0x" |
318 | 318 |
+ Integer.toHexString(threeBytes0[2])); |
... | ... | |
335 | 335 |
for (int i = 0; i < eightyTwoBytes0.length; i++) { |
336 | 336 |
eightyTwoBytes0[i] = bb.get(); |
337 | 337 |
if (eightyTwoBytes0[i] != 0) { |
338 |
logger.warn("Posible error leyendo la cabecera del archivo DWG: " +
|
|
338 |
logger.trace("Posible error leyendo la cabecera del archivo DWG: " +
|
|
339 | 339 |
"(eightyTwoBytes0) En la posicion 0x" |
340 | 340 |
+ Integer.toHexString(pos + i) |
341 | 341 |
+ " deber?a haber un 0, pero hay un 0x" |
... | ... | |
431 | 431 |
// appears before the data |
432 | 432 |
|
433 | 433 |
if ((sentinel[0] & 0xFF) != 0xcf) |
434 |
logger.warn("sentinel[0] != 0xcf found " + (sentinel[0] & 0xFF));
|
|
434 |
logger.trace("sentinel[0] != 0xcf found " + (sentinel[0] & 0xFF));
|
|
435 | 435 |
if ((sentinel[1] & 0xFF) != 0x7b) |
436 |
logger.warn("sentinel[1] != 0x7b found " + (sentinel[1] & 0xFF));
|
|
436 |
logger.trace("sentinel[1] != 0x7b found " + (sentinel[1] & 0xFF));
|
|
437 | 437 |
if ((sentinel[2] & 0xFF) != 0x1f) |
438 |
logger.warn("sentinel[2] != 0x1f found " + (sentinel[2] & 0xFF));
|
|
438 |
logger.trace("sentinel[2] != 0x1f found " + (sentinel[2] & 0xFF));
|
|
439 | 439 |
if ((sentinel[3] & 0xFF) != 0x23) |
440 |
logger.warn("sentinel[3] != 0x23 found " + (sentinel[3] & 0xFF));
|
|
440 |
logger.trace("sentinel[3] != 0x23 found " + (sentinel[3] & 0xFF));
|
|
441 | 441 |
if ((sentinel[4] & 0xFF) != 0xfd) |
442 |
logger.warn("sentinel[4] != 0xfd found " + (sentinel[4] & 0xFF));
|
|
442 |
logger.trace("sentinel[4] != 0xfd found " + (sentinel[4] & 0xFF));
|
|
443 | 443 |
if ((sentinel[5] & 0xFF) != 0xde) |
444 |
logger.warn("sentinel[5] != 0xde found " + (sentinel[5] & 0xFF));
|
|
444 |
logger.trace("sentinel[5] != 0xde found " + (sentinel[5] & 0xFF));
|
|
445 | 445 |
if ((sentinel[6] & 0xFF) != 0x38) |
446 |
logger.warn("sentinel[6] != 0x38 found " + (sentinel[6] & 0xFF));
|
|
446 |
logger.trace("sentinel[6] != 0x38 found " + (sentinel[6] & 0xFF));
|
|
447 | 447 |
if ((sentinel[7] & 0xFF) != 0xa9) |
448 |
logger.warn("sentinel[7] != 0xa9 found " + (sentinel[7] & 0xFF));
|
|
448 |
logger.trace("sentinel[7] != 0xa9 found " + (sentinel[7] & 0xFF));
|
|
449 | 449 |
if ((sentinel[8] & 0xFF) != 0x5f) |
450 |
logger.warn("sentinel[8] != 0x5f found " + (sentinel[8] & 0xFF));
|
|
450 |
logger.trace("sentinel[8] != 0x5f found " + (sentinel[8] & 0xFF));
|
|
451 | 451 |
if ((sentinel[9] & 0xFF) != 0x7c) |
452 |
logger.warn("sentinel[9] != 0x7c found " + (sentinel[9] & 0xFF));
|
|
452 |
logger.trace("sentinel[9] != 0x7c found " + (sentinel[9] & 0xFF));
|
|
453 | 453 |
if ((sentinel[10] & 0xFF) != 0x68) |
454 |
logger.warn("sentinel[10] != 0x68 found " + (sentinel[10] & 0xFF));
|
|
454 |
logger.trace("sentinel[10] != 0x68 found " + (sentinel[10] & 0xFF));
|
|
455 | 455 |
if ((sentinel[11] & 0xFF) != 0xb8) |
456 |
logger.warn("sentinel[11] != 0xb8 found " + (sentinel[11] & 0xFF));
|
|
456 |
logger.trace("sentinel[11] != 0xb8 found " + (sentinel[11] & 0xFF));
|
|
457 | 457 |
if ((sentinel[12] & 0xFF) != 0x4e) |
458 |
logger.warn("sentinel[12] != 0x4e found " + (sentinel[12] & 0xFF));
|
|
458 |
logger.trace("sentinel[12] != 0x4e found " + (sentinel[12] & 0xFF));
|
|
459 | 459 |
if ((sentinel[13] & 0xFF) != 0x6d) |
460 |
logger.warn("sentinel[13] != 0x6d found " + (sentinel[13] & 0xFF));
|
|
460 |
logger.trace("sentinel[13] != 0x6d found " + (sentinel[13] & 0xFF));
|
|
461 | 461 |
if ((sentinel[14] & 0xFF) != 0x33) |
462 |
logger.warn("sentinel[14] != 0x33 found " + (sentinel[14] & 0xFF));
|
|
462 |
logger.trace("sentinel[14] != 0x33 found " + (sentinel[14] & 0xFF));
|
|
463 | 463 |
if ((sentinel[15] & 0xFF) != 0x5f) |
464 |
logger.warn("sentinel[15] != 0x5f found " + (sentinel[15] & 0xFF));
|
|
464 |
logger.trace("sentinel[15] != 0x5f found " + (sentinel[15] & 0xFF));
|
|
465 | 465 |
|
466 | 466 |
// we start working with data that comes after the beginning sentinel |
467 | 467 |
decompressedBB.order(ByteOrder.LITTLE_ENDIAN); |
... | ... | |
481 | 481 |
decompressedBB.get(lastSentinnel); |
482 | 482 |
|
483 | 483 |
if ((lastSentinnel[0] & 0xFF) != 0x30) |
484 |
logger.warn("lastSentinnel[0] != 0x30 , is: " + lastSentinnel[0]);
|
|
484 |
logger.trace("lastSentinnel[0] != 0x30 , is: " + lastSentinnel[0]);
|
|
485 | 485 |
if ((lastSentinnel[1] & 0xFF) != 0x84) |
486 |
logger.warn("lastSentinnel[1] != 0x84 , is: " + lastSentinnel[1]);
|
|
486 |
logger.trace("lastSentinnel[1] != 0x84 , is: " + lastSentinnel[1]);
|
|
487 | 487 |
if ((lastSentinnel[2] & 0xFF) != 0xe0) |
488 |
logger.warn("lastSentinnel[2] != 0xe0 , is: " + lastSentinnel[2]);
|
|
488 |
logger.trace("lastSentinnel[2] != 0xe0 , is: " + lastSentinnel[2]);
|
|
489 | 489 |
if ((lastSentinnel[3] & 0xFF) != 0xdc) |
490 |
logger.warn("lastSentinnel[3] != 0xdc , is: " + lastSentinnel[3]);
|
|
490 |
logger.trace("lastSentinnel[3] != 0xdc , is: " + lastSentinnel[3]);
|
|
491 | 491 |
if ((lastSentinnel[4] & 0xFF) != 0x02) |
492 |
logger.warn("lastSentinnel[4] != 0x02 , is: " + lastSentinnel[4]);
|
|
492 |
logger.trace("lastSentinnel[4] != 0x02 , is: " + lastSentinnel[4]);
|
|
493 | 493 |
if ((lastSentinnel[5] & 0xFF) != 0x21) |
494 |
logger.warn("lastSentinnel[5] != 0x21 , is: " + lastSentinnel[5]);
|
|
494 |
logger.trace("lastSentinnel[5] != 0x21 , is: " + lastSentinnel[5]);
|
|
495 | 495 |
if ((lastSentinnel[6] & 0xFF) != 0xc7) |
496 |
logger.warn("lastSentinnel[6] != 0xc7 , is: " + lastSentinnel[6]);
|
|
496 |
logger.trace("lastSentinnel[6] != 0xc7 , is: " + lastSentinnel[6]);
|
|
497 | 497 |
if ((lastSentinnel[7] & 0xFF) != 0x56) |
498 |
logger.warn("lastSentinnel[7] != 0x56 , is: " + lastSentinnel[7]);
|
|
498 |
logger.trace("lastSentinnel[7] != 0x56 , is: " + lastSentinnel[7]);
|
|
499 | 499 |
if ((lastSentinnel[8] & 0xFF) != 0xa0) |
500 |
logger.warn("lastSentinnel[8] != 0xa0 , is: " + lastSentinnel[8]);
|
|
500 |
logger.trace("lastSentinnel[8] != 0xa0 , is: " + lastSentinnel[8]);
|
|
501 | 501 |
if ((lastSentinnel[9] & 0xFF) != 0x83) |
502 |
logger.warn("lastSentinnel[9] != 0x83 , is: " + lastSentinnel[9]);
|
|
502 |
logger.trace("lastSentinnel[9] != 0x83 , is: " + lastSentinnel[9]);
|
|
503 | 503 |
if ((lastSentinnel[10] & 0xFF) != 0x97) |
504 |
logger.warn("lastSentinnel[10] != 0x97 , is: " + lastSentinnel[10]);
|
|
504 |
logger.trace("lastSentinnel[10] != 0x97 , is: " + lastSentinnel[10]);
|
|
505 | 505 |
if ((lastSentinnel[11] & 0xFF) != 0x47) |
506 |
logger.warn("lastSentinnel[11] != 0x47 , is: " + lastSentinnel[11]);
|
|
506 |
logger.trace("lastSentinnel[11] != 0x47 , is: " + lastSentinnel[11]);
|
|
507 | 507 |
if ((lastSentinnel[12] & 0xFF) != 0xb1) |
508 |
logger.warn("lastSentinnel[12] != 0xb1 , is: " + lastSentinnel[12]);
|
|
508 |
logger.trace("lastSentinnel[12] != 0xb1 , is: " + lastSentinnel[12]);
|
|
509 | 509 |
if ((lastSentinnel[13] & 0xFF) != 0x92) |
510 |
logger.warn("lastSentinnel[13] != 0x92 , is: " + lastSentinnel[13]);
|
|
510 |
logger.trace("lastSentinnel[13] != 0x92 , is: " + lastSentinnel[13]);
|
|
511 | 511 |
if ((lastSentinnel[14] & 0xFF) != 0xcc) |
512 |
logger.warn("lastSentinnel[14] != 0xcc , is: " + lastSentinnel[14]);
|
|
512 |
logger.trace("lastSentinnel[14] != 0xcc , is: " + lastSentinnel[14]);
|
|
513 | 513 |
if ((lastSentinnel[15] & 0xFF) != 0xa0) |
514 |
logger.warn("lastSentinnel[15] != 0xa0 , is: " + lastSentinnel[15]);
|
|
514 |
logger.trace("lastSentinnel[15] != 0xa0 , is: " + lastSentinnel[15]);
|
|
515 | 515 |
|
516 | 516 |
int bitPos = 0; |
517 | 517 |
try { |
... | ... | |
1884 | 1884 |
dwgFile.setHeader("LTYPE_CONTINUOUS", new Integer(intHandle)); |
1885 | 1885 |
|
1886 | 1886 |
} catch (Exception e) { |
1887 |
logger.error(e.getMessage());
|
|
1887 |
logger.trace(e.getMessage());
|
|
1888 | 1888 |
} |
1889 | 1889 |
|
1890 | 1890 |
} |
... | ... | |
1943 | 1943 |
foundSections.add(sections[i]); |
1944 | 1944 |
} |
1945 | 1945 |
if (i == sectionAmount) |
1946 |
logger.warn("No se han encontrado secciones llamadas \"" + name + "\"");
|
|
1946 |
logger.trace("No se han encontrado secciones llamadas \"" + name + "\"");
|
|
1947 | 1947 |
} |
1948 | 1948 |
return (Section[]) foundSections.toArray(new Section[0]); |
1949 | 1949 |
} |
... | ... | |
1966 | 1966 |
// appears before the data |
1967 | 1967 |
|
1968 | 1968 |
if ((sentinel[0] & 0XFF) != 0x8d) |
1969 |
logger.warn(" sentinel[0] != 0x8d");
|
|
1969 |
logger.trace(" sentinel[0] != 0x8d");
|
|
1970 | 1970 |
if ((sentinel[1] & 0XFF) != 0xa1) |
1971 |
logger.warn("sentinel[1] != 0xa1");
|
|
1971 |
logger.trace("sentinel[1] != 0xa1");
|
|
1972 | 1972 |
if ((sentinel[2] & 0XFF) != 0xc4) |
1973 |
logger.warn("sentinel[2] != 0xc4");
|
|
1973 |
logger.trace("sentinel[2] != 0xc4");
|
|
1974 | 1974 |
if ((sentinel[3] & 0XFF) != 0xb8) |
1975 |
logger.warn("sentinel[3] != 0xb8");
|
|
1975 |
logger.trace("sentinel[3] != 0xb8");
|
|
1976 | 1976 |
if ((sentinel[4] & 0XFF) != 0xc4) |
1977 |
logger.warn("sentinel[4] != 0xc4");
|
|
1977 |
logger.trace("sentinel[4] != 0xc4");
|
|
1978 | 1978 |
if ((sentinel[5] & 0XFF) != 0xa9) |
1979 |
logger.warn("sentinel[5] != 0xa9");
|
|
1979 |
logger.trace("sentinel[5] != 0xa9");
|
|
1980 | 1980 |
if ((sentinel[6] & 0XFF) != 0xf8) |
1981 |
logger.warn("sentinel[6] != 0xf8");
|
|
1981 |
logger.trace("sentinel[6] != 0xf8");
|
|
1982 | 1982 |
if ((sentinel[7] & 0XFF) != 0xc5) |
1983 |
logger.warn("sentinel[7] != 0xc5");
|
|
1983 |
logger.trace("sentinel[7] != 0xc5");
|
|
1984 | 1984 |
if ((sentinel[8] & 0XFF) != 0xc0) |
1985 |
logger.warn("sentinel[8] != 0xc0");
|
|
1985 |
logger.trace("sentinel[8] != 0xc0");
|
|
1986 | 1986 |
if ((sentinel[9] & 0XFF) != 0xdc) |
1987 |
logger.warn("sentinel[9] != 0xdc");
|
|
1987 |
logger.trace("sentinel[9] != 0xdc");
|
|
1988 | 1988 |
if ((sentinel[10] & 0XFF) != 0xf4) |
1989 |
logger.warn("sentinel[10] != 0xf4");
|
|
1989 |
logger.trace("sentinel[10] != 0xf4");
|
|
1990 | 1990 |
if ((sentinel[11] & 0XFF) != 0x5f) |
1991 |
logger.warn("sentinel[11] != 0x5f");
|
|
1991 |
logger.trace("sentinel[11] != 0x5f");
|
|
1992 | 1992 |
if ((sentinel[12] & 0XFF) != 0xe7) |
1993 |
logger.warn("sentinel[12] != 0xe7");
|
|
1993 |
logger.trace("sentinel[12] != 0xe7");
|
|
1994 | 1994 |
if ((sentinel[13] & 0XFF) != 0xcf) |
1995 |
logger.warn("sentinel[13] != 0xcf");
|
|
1995 |
logger.trace("sentinel[13] != 0xcf");
|
|
1996 | 1996 |
if ((sentinel[14] & 0XFF) != 0xb6) |
1997 |
logger.warn("sentinel[14] != 0xb6");
|
|
1997 |
logger.trace("sentinel[14] != 0xb6");
|
|
1998 | 1998 |
if ((sentinel[15] & 0XFF) != 0x8a) |
1999 |
logger.warn("sentinel[15] != 0x8a");
|
|
1999 |
logger.trace("sentinel[15] != 0x8a");
|
|
2000 | 2000 |
|
2001 | 2001 |
// we start working with data that comes after the beginning sentinel |
2002 | 2002 |
decompressedBB.order(ByteOrder.LITTLE_ENDIAN); |
... | ... | |
2020 | 2020 |
|
2021 | 2021 |
val = DwgUtil.getRawChar(intData, bitPos); // 0x00 |
2022 | 2022 |
if (((Integer) val.get(1)).intValue() != 0x00) { |
2023 |
logger.warn("Classes Section RC1 != 0x00");
|
|
2023 |
logger.trace("Classes Section RC1 != 0x00");
|
|
2024 | 2024 |
} |
2025 | 2025 |
bitPos = ((Integer) val.get(0)).intValue(); |
2026 | 2026 |
|
2027 | 2027 |
val = DwgUtil.getRawChar(intData, bitPos); |
2028 | 2028 |
bitPos = ((Integer) val.get(0)).intValue(); // 0x00 |
2029 | 2029 |
if (((Integer) val.get(1)).intValue() != 0x00) { |
2030 |
logger.warn("Classes Section RC2 != 0x00");
|
|
2030 |
logger.trace("Classes Section RC2 != 0x00");
|
|
2031 | 2031 |
} |
2032 | 2032 |
|
2033 | 2033 |
val = DwgUtil.testBit(intData, bitPos); |
2034 | 2034 |
bitPos = ((Integer) val.get(0)).intValue(); |
2035 | 2035 |
if (((Boolean) val.get(1)).booleanValue() != true) { |
2036 |
logger.warn("Classes Section B != true");
|
|
2036 |
logger.trace("Classes Section B != true");
|
|
2037 | 2037 |
} |
2038 | 2038 |
|
2039 | 2039 |
int maxBit = size * 8; |
... | ... | |
2099 | 2099 |
byte[] lastSentinnel = new byte[16]; |
2100 | 2100 |
decompressedBB.get(lastSentinnel); |
2101 | 2101 |
if (lastSentinnel[0] != 0x72) |
2102 |
logger.warn("lastSentinnel[0] != 0x72");
|
|
2102 |
logger.trace("lastSentinnel[0] != 0x72");
|
|
2103 | 2103 |
if (lastSentinnel[1] != 0x5e) |
2104 |
logger.warn("lastSentinnel[1] != 0x5e");
|
|
2104 |
logger.trace("lastSentinnel[1] != 0x5e");
|
|
2105 | 2105 |
if (lastSentinnel[2] != 0x3b) |
2106 |
logger.warn("lastSentinnel[2] != 0x3b");
|
|
2106 |
logger.trace("lastSentinnel[2] != 0x3b");
|
|
2107 | 2107 |
if (lastSentinnel[3] != 0x47) |
2108 |
logger.warn("lastSentinnel[3] != 0x47");
|
|
2108 |
logger.trace("lastSentinnel[3] != 0x47");
|
|
2109 | 2109 |
if (lastSentinnel[4] != 0x3b) |
2110 |
logger.warn("lastSentinnel[4] != 0x3b");
|
|
2110 |
logger.trace("lastSentinnel[4] != 0x3b");
|
|
2111 | 2111 |
if (lastSentinnel[5] != 0x56) |
2112 |
logger.warn("lastSentinnel[5] != 0x56");
|
|
2112 |
logger.trace("lastSentinnel[5] != 0x56");
|
|
2113 | 2113 |
if (lastSentinnel[6] != 0x07) |
2114 |
logger.warn("lastSentinnel[6] != 0x07");
|
|
2114 |
logger.trace("lastSentinnel[6] != 0x07");
|
|
2115 | 2115 |
if (lastSentinnel[7] != 0x3a) |
2116 |
logger.warn("lastSentinnel[7] != 0x3a");
|
|
2116 |
logger.trace("lastSentinnel[7] != 0x3a");
|
|
2117 | 2117 |
if (lastSentinnel[8] != 0x3f) |
2118 |
logger.warn("lastSentinnel[8] != 0x3f");
|
|
2118 |
logger.trace("lastSentinnel[8] != 0x3f");
|
|
2119 | 2119 |
if (lastSentinnel[9] != 0x23) |
2120 |
logger.warn("lastSentinnel[9] != 0x23");
|
|
2120 |
logger.trace("lastSentinnel[9] != 0x23");
|
|
2121 | 2121 |
if (lastSentinnel[10] != 0x0b) |
2122 |
logger.warn("lastSentinnel[10] != 0x0b");
|
|
2122 |
logger.trace("lastSentinnel[10] != 0x0b");
|
|
2123 | 2123 |
if ((lastSentinnel[11] & 0xFF) != 0xa0) |
2124 |
logger.warn("lastSentinnel[11] != 0xa0");
|
|
2124 |
logger.trace("lastSentinnel[11] != 0xa0");
|
|
2125 | 2125 |
if (lastSentinnel[12] != 0x18) |
2126 |
logger.warn("lastSentinnel[12] != 0x18");
|
|
2126 |
logger.trace("lastSentinnel[12] != 0x18");
|
|
2127 | 2127 |
if (lastSentinnel[13] != 0x30) |
2128 |
logger.warn("lastSentinnel[13] != 0x30");
|
|
2128 |
logger.trace("lastSentinnel[13] != 0x30");
|
|
2129 | 2129 |
if (lastSentinnel[14] != 0x49) |
2130 |
logger.warn("lastSentinnel[14] != 0x49");
|
|
2130 |
logger.trace("lastSentinnel[14] != 0x49");
|
|
2131 | 2131 |
if (lastSentinnel[15] != 0x75) |
2132 |
logger.warn("lastSentinnel[15] != 0x75");
|
|
2132 |
logger.trace("lastSentinnel[15] != 0x75");
|
|
2133 | 2133 |
} |
2134 | 2134 |
|
2135 | 2135 |
/** |
... | ... | |
2168 | 2168 |
bitPos = ((Integer) v.get(0)).intValue(); |
2169 | 2169 |
int handle = ((Integer) v.get(1)).intValue(); |
2170 | 2170 |
if(handle<0){ |
2171 |
logger.warn("offset negativo");
|
|
2171 |
logger.trace("offset negativo");
|
|
2172 | 2172 |
handle = - handle; |
2173 | 2173 |
} |
2174 | 2174 |
lastHandle = lastHandle + handle; |
... | ... | |
2207 | 2207 |
ByteBuffer sectionDecompressedData = null; |
2208 | 2208 |
int numberOfFoundSections = foundSections.length; |
2209 | 2209 |
if ( numberOfFoundSections == 0) { |
2210 |
logger.warn("No se han encontrado secciones llamadas " + name);
|
|
2210 |
logger.trace("No se han encontrado secciones llamadas " + name);
|
|
2211 | 2211 |
} else { |
2212 | 2212 |
Section section; |
2213 | 2213 |
int decompressedSize = foundSections[0].getMaxDecompressedSize(); |
... | ... | |
2249 | 2249 |
*/ |
2250 | 2250 |
|
2251 | 2251 |
if ( decrypted[1] != section.getType()){ |
2252 |
logger.warn("Discrepancia en el tipo de seccion: " + section.getType() +" , " + decrypted[1] );
|
|
2252 |
logger.trace("Discrepancia en el tipo de seccion: " + section.getType() +" , " + decrypted[1] );
|
|
2253 | 2253 |
} |
2254 | 2254 |
if ( decrypted[2] != section.getDataSize()){ |
2255 |
logger.warn("Discrepancia en el tamaño de los datos de la seccion: " + section.getDataSize() +" , " + decrypted[2] );
|
|
2255 |
logger.trace("Discrepancia en el tamaño de los datos de la seccion: " + section.getDataSize() +" , " + decrypted[2] );
|
|
2256 | 2256 |
} |
2257 | 2257 |
if ( decrypted[3] != section.getSize()){ |
2258 |
logger.warn("Discrepancia en el tamaño de la seccion: " + section.getSize() +" , " + decrypted[3] );
|
|
2258 |
logger.trace("Discrepancia en el tamaño de la seccion: " + section.getSize() +" , " + decrypted[3] );
|
|
2259 | 2259 |
} |
2260 | 2260 |
if ( decrypted[4] != section.getStartOffset()){ |
2261 |
logger.warn("Discrepancia en el start offset de la seccion: " + section.getStartOffset() +" , " + decrypted[4] );
|
|
2261 |
logger.trace("Discrepancia en el start offset de la seccion: " + section.getStartOffset() +" , " + decrypted[4] );
|
|
2262 | 2262 |
} |
2263 | 2263 |
|
2264 | 2264 |
decompressedSize = section.getMaxDecompressedSize(); |
... | ... | |
2266 | 2266 |
sectionDecompressedData.position(0); |
2267 | 2267 |
section.setDecompressedData(sectionDecompressedData); |
2268 | 2268 |
if (fullSectionDecompressedBB.position() != section.getStartOffset()){ |
2269 |
logger.warn("Desincronizaci?n entre el start offset de la seccion y la posici?n del ByteBuffer compuesto: " + section.getStartOffset() +" , " + fullSectionDecompressedBB.position() );
|
|
2269 |
logger.trace("Desincronizaci?n entre el start offset de la seccion y la posici?n del ByteBuffer compuesto: " + section.getStartOffset() +" , " + fullSectionDecompressedBB.position() );
|
|
2270 | 2270 |
} |
2271 | 2271 |
fullSectionDecompressedBB.put(section.getDecompressedData()); |
2272 | 2272 |
} |
... | ... | |
2303 | 2303 |
dwgFile.addDwgObject(obj); |
2304 | 2304 |
} |
2305 | 2305 |
} catch (Exception e) { |
2306 |
logger.error(e.getMessage());
|
|
2306 |
logger.trace(e.getMessage());
|
|
2307 | 2307 |
continue; |
2308 | 2308 |
} |
2309 | 2309 |
}// for |
... | ... | |
2324 | 2324 |
DwgObject obj = null; |
2325 | 2325 |
try { |
2326 | 2326 |
if (offset >= bb.capacity()) { |
2327 |
logger.warn("Posible error leyendo un objeto: capacity = "
|
|
2327 |
logger.trace("Posible error leyendo un objeto: capacity = "
|
|
2328 | 2328 |
+ bb.capacity() + " offset = " + offset); |
2329 | 2329 |
return null; |
2330 | 2330 |
} |
... | ... | |
2335 | 2335 |
//FIXME: Esto es para saltarse posibles objetos defectuosos que nos |
2336 | 2336 |
//impedir?an ver el resto del archivo |
2337 | 2337 |
if (size == 0 || size>29696) { |
2338 |
logger.warn("Posible error leyendo un objeto: size = "+size);
|
|
2338 |
logger.trace("Posible error leyendo un objeto: size = "+size);
|
|
2339 | 2339 |
return null; |
2340 | 2340 |
} |
2341 | 2341 |
if (offset + (size*8) >= bb.capacity()) { |
2342 |
logger.warn("Posible error leyendo un objeto: capacity = "
|
|
2342 |
logger.trace("Posible error leyendo un objeto: capacity = "
|
|
2343 | 2343 |
+ bb.capacity() + " offset = " + offset + " size = "+size); |
2344 | 2344 |
return null; |
2345 | 2345 |
} |
... | ... | |
2352 | 2352 |
try { |
2353 | 2353 |
intData = DwgUtil.toIntArray(data); |
2354 | 2354 |
} catch (Exception e) { |
2355 |
logger.error("Error leyendo un objeto: size = " + size, e);
|
|
2355 |
logger.trace("Error leyendo un objeto: size = " + size, e);
|
|
2356 | 2356 |
return null; |
2357 | 2357 |
} |
2358 | 2358 |
|
... | ... | |
2368 | 2368 |
* non-fixed value |
2369 | 2369 |
*/ |
2370 | 2370 |
if (obj == null) { |
2371 |
logger.info("dwgFileVR2004Reader: Entrando en Objeto Nulo");
|
|
2371 |
logger.trace("dwgFileVR2004Reader: Entrando en Objeto Nulo");
|
|
2372 | 2372 |
if (type >= 500) { |
2373 | 2373 |
int newIndex = type - 500; |
2374 | 2374 |
if (newIndex < (dwgFile.getDwgClasses().size() - 1)) { |
... | ... | |
2377 | 2377 |
obj = DwgObjectFactory.getInstance().create(dxfEntityName, index); |
2378 | 2378 |
|
2379 | 2379 |
if (obj == null) { |
2380 |
logger.info(dxfEntityName
|
|
2380 |
logger.trace(dxfEntityName
|
|
2381 | 2381 |
+ " todavia no est? implementado"); |
2382 | 2382 |
return null; |
2383 | 2383 |
}// if |
... | ... | |
2386 | 2386 |
return null; |
2387 | 2387 |
} |
2388 | 2388 |
} else { |
2389 |
logger.info("dwgFileVR2004Reader: Encontrado tipo " + type);
|
|
2389 |
logger.trace("dwgFileVR2004Reader: Encontrado tipo " + type);
|
|
2390 | 2390 |
return null; |
2391 | 2391 |
} |
2392 | 2392 |
} |
... | ... | |
2461 | 2461 |
// reader.setFileReader(this); |
2462 | 2462 |
reader.readSpecificObj(data, bitPos, obj); |
2463 | 2463 |
} else { |
2464 |
logger.warn("No se ha implementado la lectura de "
|
|
2464 |
logger.trace("No se ha implementado la lectura de "
|
|
2465 | 2465 |
+ obj.getClass().getName() + ", code=" + obj.getType()); |
2466 | 2466 |
} |
2467 | 2467 |
} |
... | ... | |
2503 | 2503 |
sectionNumber = dData.getInt(); |
2504 | 2504 |
while (sectionNumber < 0) { |
2505 | 2505 |
if (gapNumber >= gapAmount) { |
2506 |
logger.warn("ERROR: Se han encontrado mas gaps de los definidos");
|
|
2506 |
logger.trace("ERROR: Se han encontrado mas gaps de los definidos");
|
|
2507 | 2507 |
} |
2508 | 2508 |
gaps[gapNumber] = new Gap(); |
2509 | 2509 |
int gapSize = dData.getInt(); |
... | ... | |
2600 | 2600 |
calcSize = calcSize + literalLength; |
2601 | 2601 |
|
2602 | 2602 |
} else { |
2603 |
logger.error("Error leyendo el literal Length");
|
|
2603 |
logger.trace("Error leyendo el literal Length");
|
|
2604 | 2604 |
} |
2605 | 2605 |
|
2606 | 2606 |
// We start treating the opcodes |
... | ... | |
2609 | 2609 |
|
2610 | 2610 |
if ((opcode1 & 0xFF) >= 0x00 && (opcode1 & 0xFF) <= 0x0F) { |
2611 | 2611 |
|
2612 |
logger.warn("Posible error leyendo el opcode " + opcode1);
|
|
2612 |
logger.trace("Posible error leyendo el opcode " + opcode1);
|
|
2613 | 2613 |
decompressedData.put(opcode1); // ??? |
2614 | 2614 |
if (opcode2valid) { |
2615 | 2615 |
opcode1 = opcode2; |
... | ... | |
2755 | 2755 |
opcode2valid = true; |
2756 | 2756 |
} |
2757 | 2757 |
} else { |
2758 |
logger.warn("Posible error de lectura de una seccion comprimida: " +
|
|
2758 |
logger.trace("Posible error de lectura de una seccion comprimida: " +
|
|
2759 | 2759 |
"Ha aparecido un opcode1 con valor " |
2760 | 2760 |
+ Integer.toHexString(opcode1 & 0xFF)); |
2761 | 2761 |
opcode2 = bb.get(); |
... | ... | |
2763 | 2763 |
} |
2764 | 2764 |
|
2765 | 2765 |
if (compressedBytes < 0) { |
2766 |
logger.warn("Posible error de lectura de una seccion comprimida: compressedBytes < 0");
|
|
2766 |
logger.trace("Posible error de lectura de una seccion comprimida: compressedBytes < 0");
|
|
2767 | 2767 |
} |
2768 | 2768 |
if (compOffset < 0) { |
2769 |
logger.warn("Posible error de lectura de una seccion comprimida: compOffset < 0");
|
|
2769 |
logger.trace("Posible error de lectura de una seccion comprimida: compOffset < 0");
|
|
2770 | 2770 |
} |
2771 | 2771 |
if (litCount < 0) { |
2772 |
logger.warn("Posible error de lectura de una seccion comprimida: litCount < 0");
|
|
2772 |
logger.trace("Posible error de lectura de una seccion comprimida: litCount < 0");
|
|
2773 | 2773 |
} |
2774 | 2774 |
|
2775 | 2775 |
if (compressedBytes > compOffset) { |
2776 |
logger.warn("Posible error en la lectura de una seccion comprimida: "
|
|
2776 |
logger.trace("Posible error en la lectura de una seccion comprimida: "
|
|
2777 | 2777 |
+ "No parece logico que compressedBytes > compOffset"); |
2778 | 2778 |
} |
2779 | 2779 |
if (compOffset >= decompressedData.position()) { |
2780 |
logger.warn("Posible error en la lectura de una seccion comprimida:"
|
|
2780 |
logger.trace("Posible error en la lectura de una seccion comprimida:"
|
|
2781 | 2781 |
+ " el compOffset se sale"); |
2782 | 2782 |
compressedBytes = 0; // ???? Para no leer bytes comprimidos ni que se |
2783 | 2783 |
// incluyan en el tamaño calculado. |
... | ... | |
2847 | 2847 |
*/ |
2848 | 2848 |
return 0; |
2849 | 2849 |
} |
2850 |
logger.warn("Posible error de lectura: Se ha encontrado un Literal Lenght: "
|
|
2850 |
logger.trace("Posible error de lectura: Se ha encontrado un Literal Lenght: "
|
|
2851 | 2851 |
+ Integer.toHexString(b & 0xFF)); |
2852 | 2852 |
return total; |
2853 | 2853 |
} |
Also available in: Unified diff