171 """<h3>'{0}'</h3></div></body>""" |
171 """<h3>'{0}'</h3></div></body>""" |
172 """</html>""").format(url.toString()) |
172 """</html>""").format(url.toString()) |
173 .encode("utf-8")) |
173 .encode("utf-8")) |
174 ) |
174 ) |
175 |
175 |
176 with E5MutexLocker(self.__mutex): |
176 with EricMutexLocker(self.__mutex): |
177 self.__buffer.setData(data) |
177 self.__buffer.setData(data) |
178 self.__buffer.open(QIODevice.OpenModeFlag.ReadOnly) |
178 self.__buffer.open(QIODevice.OpenModeFlag.ReadOnly) |
179 self.open(QIODevice.OpenModeFlag.ReadOnly) |
179 self.open(QIODevice.OpenModeFlag.ReadOnly) |
180 |
180 |
181 self.readyRead.emit() |
181 self.readyRead.emit() |
185 Public method to get the number of available bytes. |
185 Public method to get the number of available bytes. |
186 |
186 |
187 @return number of available bytes |
187 @return number of available bytes |
188 @rtype int |
188 @rtype int |
189 """ |
189 """ |
190 with E5MutexLocker(self.__mutex): |
190 with EricMutexLocker(self.__mutex): |
191 return self.__buffer.bytesAvailable() |
191 return self.__buffer.bytesAvailable() |
192 |
192 |
193 def readData(self, maxlen): |
193 def readData(self, maxlen): |
194 """ |
194 """ |
195 Public method to retrieve data from the reply object. |
195 Public method to retrieve data from the reply object. |
196 |
196 |
197 @param maxlen maximum number of bytes to read (integer) |
197 @param maxlen maximum number of bytes to read (integer) |
198 @return string containing the data (bytes) |
198 @return string containing the data (bytes) |
199 """ |
199 """ |
200 with E5MutexLocker(self.__mutex): |
200 with EricMutexLocker(self.__mutex): |
201 return self.__buffer.read(maxlen) |
201 return self.__buffer.read(maxlen) |
202 |
202 |
203 def close(self): |
203 def close(self): |
204 """ |
204 """ |
205 Public method used to cloase the reply. |
205 Public method used to cloase the reply. |