wi >>= 8; if(bs != bi) { throw new DataCorruptionException(wordPos + i, bs, bi); bi = inBuff.get(); if(bs != bi) { throw new DataCorruptionException(m, bs, bi);
chunkCountDone += remainingSize; } catch(final DataCorruptionException e) { throw new DataCorruptionException( getRangeOffset(dataIoTask.getCurrRangeIdx()) + e.getOffset(), e.expected, e.actual );
ioTask.setStatus(Status.RESP_FAIL_CORRUPT); final long countBytesDone = ioTask.getCountBytesDone() + e.getOffset(); ioTask.setCountBytesDone(countBytesDone); Loggers.MSG.debug(
); } catch(final DataCorruptionException e) { throw new DataCorruptionException( currPos + e.getOffset() - countBytesDone, e.expected, e.actual );
Loggers.MSG.debug( "{}: content mismatch @ offset {}, expected: {}, actual: {} ", dataItem.getName(), ee.getOffset(), String.format("\"0x%X\"", (int) (ee.expected & 0xFF)), String.format("\"0x%X\"", (int) (ee.actual & 0xFF))
countBytesDone += n; } catch(final DataCorruptionException e) { throw new DataCorruptionException( currPos + e.getOffset() - countBytesDone, e.expected, e.actual );
@Override public final int write(final ByteBuffer src) throws DataCorruptionException, DataSizeException { if(src == null) { return 0; } int m; final MappedByteBuffer ringBuff = (MappedByteBuffer) dataInput .getLayer(layerNum) .asReadOnlyBuffer(); ringBuff.position((int) ((offset + position) % dataInputSize)); final int n = Math.min(src.remaining(), ringBuff.remaining()); if(n > 0) { byte bs, bi; for(m = 0; m < n; m ++) { bs = ringBuff.get(); bi = src.get(); if(bs != bi) { throw new DataCorruptionException(m, bs, bi); } } position += n; } else { return n; } return m; }
countBytesDone += e.getOffset(); ioTask.setCountBytesDone(countBytesDone); Loggers.MSG.debug(
rangeBytesDone += m; } catch(final DataCorruptionException e) { throw new DataCorruptionException( currOffset + e.getOffset() - countBytesDone, e.expected, e.actual );
if(expected != actual) { buff.release(); throw new DataCorruptionException(i, expected, actual);
} catch(final DataCorruptionException e) { ioTask.setStatus(Status.RESP_FAIL_CORRUPT); final long countBytesDone = ioTask.getCountBytesDone() + e.getOffset(); ioTask.setCountBytesDone(countBytesDone); Loggers.MSG.debug("{}: content mismatch @ offset {}, expected: {}, actual: {} ",
throw new DataCorruptionException( currOffset + e.getOffset() - countBytesDone, e.expected, e.actual );