wi >>= 8; if(bs != bi) { throw new DataCorruptionException(wordPos + i, bs, bi); bi = inBuff.get(); if(bs != bi) { throw new DataCorruptionException(m, bs, bi);
@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; }
if(expected != actual) { buff.release(); throw new DataCorruptionException(i, expected, actual);
); } catch(final DataCorruptionException e) { throw new DataCorruptionException( currPos + e.getOffset() - countBytesDone, e.expected, e.actual );
countBytesDone += n; } catch(final DataCorruptionException e) { throw new DataCorruptionException( currPos + e.getOffset() - countBytesDone, e.expected, e.actual );
chunkCountDone += remainingSize; } catch(final DataCorruptionException e) { throw new DataCorruptionException( getRangeOffset(dataIoTask.getCurrRangeIdx()) + e.getOffset(), e.expected, e.actual
rangeBytesDone += m; } catch(final DataCorruptionException e) { throw new DataCorruptionException( currOffset + e.getOffset() - countBytesDone, e.expected, e.actual );
throw new DataCorruptionException( currOffset + e.getOffset() - countBytesDone, e.expected, e.actual );