summaryrefslogtreecommitdiff
path: root/plugins/python/androperms/reader.py
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/python/androperms/reader.py')
-rw-r--r--plugins/python/androperms/reader.py41
1 files changed, 0 insertions, 41 deletions
diff --git a/plugins/python/androperms/reader.py b/plugins/python/androperms/reader.py
deleted file mode 100644
index f126850..0000000
--- a/plugins/python/androperms/reader.py
+++ /dev/null
@@ -1,41 +0,0 @@
-#!/usr/bin/python -u
-# -*- coding: utf-8 -*-
-
-
-from struct import unpack
-
-
-class AXMLReader():
- """Provide various read helpers."""
-
- def __init__(self, data):
-
- self._data = data
-
- self._position = 0
- self._length = len(self._data)
-
-
- def readInt(self):
- """Read a 4-bytes value."""
-
- self.skipInt()
-
- value = unpack('<L', self._data[self._position - 4 : self._position])[0]
-
- return value
-
-
- def skipInt(self):
- """Skip a 4-bytes value."""
-
- self._position += 4
-
- if self._position > self._length:
- raise Exception("Reader out of bound (%d > %d)!" % (self._position, self._length))
-
-
- def readIntArray(self, length):
- """Read an array composed of 4-bytes values."""
-
- return [ self.readInt() for i in range(0, length) ]