@Override public int readUShort() { checkAvaliable(SIZE_SHORT); int blockAvailable = _currentBlock.available(); int result; if (blockAvailable > SIZE_SHORT) { result = _currentBlock.readUShortLE(); } else { DataInputBlock nextBlock = getDataInputBlock(_current_offset + blockAvailable); if (blockAvailable == SIZE_SHORT) { result = _currentBlock.readUShortLE(); } else { result = nextBlock.readUShortLE(_currentBlock); } _currentBlock = nextBlock; } _current_offset += SIZE_SHORT; return result; }
@Override public int readUShort() { checkAvaliable(SIZE_SHORT); int blockAvailable = _currentBlock.available(); int result; if (blockAvailable > SIZE_SHORT) { result = _currentBlock.readUShortLE(); } else { DataInputBlock nextBlock = getDataInputBlock(_current_offset + blockAvailable); if (blockAvailable == SIZE_SHORT) { result = _currentBlock.readUShortLE(); } else { result = nextBlock.readUShortLE(_currentBlock); } _currentBlock = nextBlock; } _current_offset += SIZE_SHORT; return result; }