Package org.cip4.jdflib.cformat
Class PrintfStream
- java.lang.Object
-
- java.io.OutputStream
-
- java.io.FilterOutputStream
-
- java.io.PrintStream
-
- org.cip4.jdflib.cformat.PrintfStream
-
- All Implemented Interfaces:
java.io.Closeable,java.io.Flushable,java.lang.Appendable,java.lang.AutoCloseable
@Deprecated public class PrintfStream extends java.io.PrintStreamDeprecated.use standard java writersPrintStream which outputs primitive types using C printf style formatting. For each primitive type (float, double, char, int, long, String), there is a printf method which takes (as a first argument) either a printf style format string, or a PrintfFormat object. Using the latter can be more efficient because it permits an application to prorate the overhead of parsing a format string.Because Java does not permit variable numbers of arguments, each printf methodName accepts only one primitive type, and the format can correspondingly contain only one conversion sequence.
- See Also:
PrintfFormat,PrintfWriter
-
-
Constructor Summary
Constructors Constructor Description PrintfStream(java.io.OutputStream pout)Deprecated.Creates a PrintfStream, without automatic line flushing, from an existing OutputStream.PrintfStream(java.io.OutputStream pout, boolean autoFlush)Deprecated.Creates a PrintfStream from an existing OutputStream.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidprintf(java.lang.String fs, char x)Deprecated.Prints a char in accordance with the supplied format string.voidprintf(java.lang.String fs, double x)Deprecated.Prints a double in accordance with the supplied format string.voidprintf(java.lang.String fs, float x)Deprecated.Prints a float in accordance with the supplied format string.voidprintf(java.lang.String fs, int x)Deprecated.Prints an int in accordance with the supplied format string.voidprintf(java.lang.String fs, long x)Deprecated.Prints a long in accordance with the supplied format string.voidprintf(java.lang.String fs, java.lang.String x)Deprecated.Prints a String in accordance with the supplied format string.voidprintf(PrintfFormat fmt, char x)Deprecated.Prints a char in accordance with the supplied PrintfFormat object.voidprintf(PrintfFormat fmt, double x)Deprecated.Prints a double in accordance with the supplied PrintfFormat object.voidprintf(PrintfFormat fmt, float x)Deprecated.Prints a float in accordance with the supplied PrintfFormat object.voidprintf(PrintfFormat fmt, int x)Deprecated.Prints an int in accordance with the supplied PrintfFormat object.voidprintf(PrintfFormat fmt, long x)Deprecated.Prints a long in accordance with the supplied PrintfFormat object.voidprintf(PrintfFormat fmt, java.lang.String x)Deprecated.Prints a String in accordance with the supplied PrintfFormat object.-
Methods inherited from class java.io.PrintStream
append, append, append, checkError, clearError, close, flush, format, format, print, print, print, print, print, print, print, print, print, printf, printf, println, println, println, println, println, println, println, println, println, println, setError, write, write
-
-
-
-
Constructor Detail
-
PrintfStream
public PrintfStream(java.io.OutputStream pout)
Deprecated.Creates a PrintfStream, without automatic line flushing, from an existing OutputStream.- Parameters:
out- An output stream
-
PrintfStream
public PrintfStream(java.io.OutputStream pout, boolean autoFlush)Deprecated.Creates a PrintfStream from an existing OutputStream.- Parameters:
out- An output streamautoFlush- If true, specifies that output flushing will automatically occur when the println() methods are called, a byte array is written, or a new line character or byte is encountered in the output.
-
-
Method Detail
-
printf
public void printf(java.lang.String fs, double x)Deprecated.Prints a double in accordance with the supplied format string.- Parameters:
fs- Format stringx- Double to output- Throws:
java.lang.IllegalArgumentException- Malformed format string
-
printf
public void printf(java.lang.String fs, float x)Deprecated.Prints a float in accordance with the supplied format string.- Parameters:
fs- Format stringx- Float to output- Throws:
java.lang.IllegalArgumentException- Malformed format string
-
printf
public void printf(java.lang.String fs, long x)Deprecated.Prints a long in accordance with the supplied format string.- Parameters:
fs- Format stringx- Long to output- Throws:
java.lang.IllegalArgumentException- Malformed format string
-
printf
public void printf(java.lang.String fs, int x)Deprecated.Prints an int in accordance with the supplied format string.- Parameters:
fs- Format stringx- Int to output- Throws:
java.lang.IllegalArgumentException- Malformed format string
-
printf
public void printf(java.lang.String fs, java.lang.String x)Deprecated.Prints a String in accordance with the supplied format string.- Parameters:
fs- Format stringx- String to output- Throws:
java.lang.IllegalArgumentException- Malformed format string
-
printf
public void printf(java.lang.String fs, char x)Deprecated.Prints a char in accordance with the supplied format string.- Parameters:
fs- Format stringx- Char to output- Throws:
java.lang.IllegalArgumentException- Malformed format string
-
printf
public void printf(PrintfFormat fmt, double x)
Deprecated.Prints a double in accordance with the supplied PrintfFormat object.- Parameters:
fmt- Formatting objectx- Double to output- See Also:
PrintfFormat
-
printf
public void printf(PrintfFormat fmt, float x)
Deprecated.Prints a float in accordance with the supplied PrintfFormat object.- Parameters:
fmt- Formatting objectx- Float to output- See Also:
PrintfFormat
-
printf
public void printf(PrintfFormat fmt, long x)
Deprecated.Prints a long in accordance with the supplied PrintfFormat object.- Parameters:
fmt- Formatting objectx- Long to output- See Also:
PrintfFormat
-
printf
public void printf(PrintfFormat fmt, int x)
Deprecated.Prints an int in accordance with the supplied PrintfFormat object.- Parameters:
fmt- Formatting objectx- Int to output- See Also:
PrintfFormat
-
printf
public void printf(PrintfFormat fmt, java.lang.String x)
Deprecated.Prints a String in accordance with the supplied PrintfFormat object.- Parameters:
fmt- Formatting objectx- String to output- See Also:
PrintfFormat
-
printf
public void printf(PrintfFormat fmt, char x)
Deprecated.Prints a char in accordance with the supplied PrintfFormat object.- Parameters:
fmt- Formatting objectx- Char to output- See Also:
PrintfFormat
-
-