1.1 --- a/java/text.py Thu Dec 09 02:17:22 2004 +0100
1.2 +++ b/java/text.py Thu Dec 09 02:18:05 2004 +0100
1.3 @@ -1,6 +1,6 @@
1.4 #!/usr/bin/env python
1.5
1.6 -class FilterOutputStream:
1.7 +class FilterOutputStream(object):
1.8 def __init__(self, out):
1.9 self.out = out
1.10 def write(self, value, *args):
1.11 @@ -14,7 +14,7 @@
1.12 def close(self):
1.13 self.out.close()
1.14
1.15 -class InputStream:
1.16 +class InputStream(object):
1.17 def read(self, *args):
1.18 raise NotImplementedError, "read"
1.19 def skip(self, n):
1.20 @@ -30,7 +30,40 @@
1.21 def markSupported(self):
1.22 raise NotImplementedError, "markSupported"
1.23
1.24 -class OutputStream:
1.25 +class MessageFormat(object):
1.26 + def __init__(self, pattern):
1.27 + self.pattern = pattern
1.28 +
1.29 + def applyPattern(self, pattern):
1.30 + self.pattern = pattern
1.31 + applyPattern___java__lang__String = applyPattern
1.32 +
1.33 + def equals(self, obj):
1.34 + return self == obj
1.35 + equals___java__lang__Object = equals
1.36 +
1.37 + def format(self, *args):
1.38 + raise NotImplementedError, "format"
1.39 + format___java__lang__Object_array____java__lang__StringBuffer___java__text__FieldPosition = format
1.40 + format___java__lang__Object___java__lang__StringBuffer___java__text__FieldPosition = format
1.41 +
1.42 + def format__static(pattern, arguments):
1.43 + mf = MessageFormat(pattern)
1.44 + # NOTE: To be implemented.
1.45 + return ""
1.46 + format___java__lang__String___java__lang__Object_array_ = staticmethod(format__static)
1.47 +
1.48 + def getFormats(self):
1.49 + raise NotImplementedError, "getFormats"
1.50 + getFormats___ = getFormats
1.51 +
1.52 + def getLocale(self):
1.53 + raise NotImplementedError, "getLocale"
1.54 + getLocale___ = getLocale
1.55 +
1.56 +setattr(MessageFormat, "__init_____java__lang__String", MessageFormat.__init__)
1.57 +
1.58 +class OutputStream(object):
1.59 def write(self, b, *args):
1.60 raise NotImplementedError, "write"
1.61 def flush(self):