public PrintStream format ( String format , Object ... args ) { try { synchronized ( this ) { ensureOpen ( ) ; if ( ( formatter == null ) || ( formatter . locale ( ) != Locale . getDefault ( ) ) ) formatter = new Formatter ( ( Appendable ) WeakProxy . forObject ( this ) ) ; formatter . format ( Locale . getDefault ( ) , format , args ) ; } } catch ( InterruptedIOException x ) { Thread . currentThread ( ) . interrupt ( ) ; } catch ( IOException x ) { trouble = true ; } return this ; }
Writes a formatted string to this output stream using the specified format string and arguments .