MCPcopy Index your code
hub / github.com/sqlmapproject/sqlmap / MPBytesIOProxy

Class MPBytesIOProxy

thirdparty/bottle/bottle.py:1399–1435  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1397
1398
1399class MPBytesIOProxy:
1400 def __init__(self, src, start, end):
1401 self._src = src
1402 self._st = start
1403 self._end = end
1404 self._pos = start
1405
1406 def tell(self):
1407 return self._pos - self._st
1408
1409 def seek(self, pos):
1410 if pos < 0: pos = 0
1411 self._pos = min(self._st + pos, self._end)
1412
1413 def read(self, sz=None):
1414 max_sz = self._end - self._pos
1415 if max_sz <= 0:
1416 return tob('')
1417 if sz is not None and sz > 0:
1418 sz = min(sz, max_sz)
1419 else:
1420 sz = max_sz
1421 self._src.seek(self._pos)
1422 self._pos += sz
1423 return self._src.read(sz)
1424
1425 def writable(self):
1426 return False
1427
1428 def fileno(self):
1429 raise OSError('Not supported')
1430
1431 def closed(self):
1432 return self._src.closed()
1433
1434 def close(self):
1435 pass
1436
1437
1438class MPHeader:

Callers 1

readMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…