2 # -*- coding: utf-8 -*-
4 # Copyright (c) 2008 by Hartmut Goebel <h.goebel@goebel-consult.de>
5 # Licenced under the GNU General Public License v3 (GPLv3)
6 # see file LICENSE-gpl-3.0.txt
9 __author__ = "Hartmut Goebel <h.goebel@goebel-consult.de>"
10 __copyright__ = "Copyright (c) 2008 by Hartmut Goebel <h.goebel@goebel-consult.de>"
11 __licence__ = "GPLv3 - GNU General Public License v3"
15 from com.sun.star.io import XInputStream, XOutputStream, XSeekable
17 class InputStream(unohelper.Base, XInputStream, XSeekable):
18 def __init__(self, stream):
21 def skipBytes(self, count):
24 def readBytes(self, retSeq, count):
25 s = self.f.read(count)
26 return len(s), uno.ByteSequence(s)
28 def readSomeBytes(self, retSeq , count):
29 return self.readBytes(retSeq, count)
40 def getPosition(self):
52 class OutputStream(unohelper.Base, XOutputStream):
53 def __init__(self, stream):
56 def writeBytes(self, seq):
57 self.f.write(seq.value)
59 def closeOutput(self):