mirror of
https://github.com/corda/corda.git
synced 2025-06-13 20:58:19 +00:00
Added java.util.Formatter implementation. Basic/common formats work,
such as %s, %d, %x... also width, left justify, zerofill flags are implemented. Many of the other formats do not work, see the comments in avian.FormatString javadoc and look for FIXME and TODO items for more information on features that are known to not work correctly.
This commit is contained in:
@ -78,6 +78,25 @@ public class PrintStream extends OutputStream {
|
||||
print(String.valueOf(s));
|
||||
}
|
||||
|
||||
public synchronized void printf(java.util.Locale locale, String format, Object... args) {
|
||||
// should this be cached in an instance variable??
|
||||
final java.util.Formatter formatter = new java.util.Formatter(this);
|
||||
formatter.format(locale, format, args);
|
||||
}
|
||||
|
||||
public synchronized void printf(String format, Object... args) {
|
||||
final java.util.Formatter formatter = new java.util.Formatter(this);
|
||||
formatter.format(format, args);
|
||||
}
|
||||
|
||||
public void format(String format, Object... args) {
|
||||
printf(format, args);
|
||||
}
|
||||
|
||||
public void format(java.util.Locale locale, String format, Object... args) {
|
||||
printf(locale, format, args);
|
||||
}
|
||||
|
||||
public synchronized void println(String s) {
|
||||
try {
|
||||
out.write(s.getBytes());
|
||||
|
Reference in New Issue
Block a user