|
Softhema Java Toolkit Collection 1.1 | ||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||
java.lang.Object | +--softhema.system.toolkits.ToolkitIO
| Constructor Summary | |
ToolkitIO()
|
|
| Method Summary | |
static void |
flushInOut()
Empties the standard input System.in and flushes the standard output System.out. |
static java.lang.String |
getLicenseInfo()
The method returns copyright information of the Java class. |
static void |
printf(java.lang.String sFormat)
Imitation of the ANSI C printf function. |
static void |
printf(java.lang.String sFormat,
char ch)
Imitation of the ANSI C printf function. |
static void |
printf(java.lang.String sFormat,
double d)
Imitation of the ANSI C printf function. |
static void |
printf(java.lang.String sFormat,
java.util.List listFormatParameter)
Imitation of the ANSI C printf function. |
static void |
printf(java.lang.String sFormat,
long l)
Imitation of the ANSI C printf function. |
static void |
printf(java.lang.String sFormat,
java.lang.Object param1)
Imitation of the ANSI C printf function. |
static void |
printf(java.lang.String sFormat,
java.lang.Object[] aFormatParameter)
Imitation of the ANSI C printf function. |
static void |
printf(java.lang.String sFormat,
java.lang.Object param1,
java.lang.Object param2)
Imitation of the ANSI C printf function. |
static void |
printf(java.lang.String sFormat,
java.lang.Object param1,
java.lang.Object param2,
java.lang.Object param3)
Imitation of the ANSI C printf function. |
static void |
printf(java.lang.String sFormat,
java.lang.Object param1,
java.lang.Object param2,
java.lang.Object param3,
java.lang.Object param4)
Imitation of the ANSI C printf function. |
static void |
printf(java.lang.String sFormat,
java.lang.Object param1,
java.lang.Object param2,
java.lang.Object param3,
java.lang.Object param4,
java.lang.Object param5)
Imitation of the ANSI C printf function. |
static void |
printf(java.lang.String sFormat,
java.lang.Object param1,
java.lang.Object param2,
java.lang.Object param3,
java.lang.Object param4,
java.lang.Object param5,
java.lang.Object param6)
Imitation of the ANSI C printf function. |
static void |
printf(java.lang.String sFormat,
java.util.Vector vecFormatParameter)
Imitation of the ANSI C printf function. |
static void |
printf(java.io.Writer stream,
java.lang.String sFormat,
char ch)
Imitation of the ANSI C printf function. |
static void |
printf(java.io.Writer stream,
java.lang.String sFormat,
double d)
Imitation of the ANSI C printf function. |
static void |
printf(java.io.Writer stream,
java.lang.String sFormat,
java.util.List listFormatParameter)
Imitation of the ANSI C printf function. |
static void |
printf(java.io.Writer stream,
java.lang.String sFormat,
long l)
Imitation of the ANSI C printf function. |
static void |
printf(java.io.Writer stream,
java.lang.String sFormat,
java.lang.Object param1)
Imitation of the ANSI C printf function. |
static void |
printf(java.io.Writer stream,
java.lang.String sFormat,
java.lang.Object[] aFormatParameter)
Imitation of the ANSI C printf function. This version of the function printf place output to a "Writer" output stream. |
static void |
printf(java.io.Writer stream,
java.lang.String sFormat,
java.lang.Object param1,
java.lang.Object param2)
Imitation of the ANSI C printf function. |
static void |
printf(java.io.Writer stream,
java.lang.String sFormat,
java.lang.Object param1,
java.lang.Object param2,
java.lang.Object param3)
Imitation of the ANSI C printf function. |
static void |
printf(java.io.Writer stream,
java.lang.String sFormat,
java.lang.Object param1,
java.lang.Object param2,
java.lang.Object param3,
java.lang.Object param4)
Imitation of the ANSI C printf function. |
static void |
printf(java.io.Writer stream,
java.lang.String sFormat,
java.lang.Object param1,
java.lang.Object param2,
java.lang.Object param3,
java.lang.Object param4,
java.lang.Object param5)
Imitation of the ANSI C printf function. |
static void |
printf(java.io.Writer stream,
java.lang.String sFormat,
java.lang.Object param1,
java.lang.Object param2,
java.lang.Object param3,
java.lang.Object param4,
java.lang.Object param5,
java.lang.Object param6)
Imitation of the ANSI C printf function. |
static void |
printf(java.io.Writer stream,
java.lang.String sFormat,
java.util.Vector vecFormatParameter)
Imitation of the ANSI C printf function. |
static java.math.BigDecimal |
readBigDecimal()
Reads a BigDecimal. |
static java.math.BigInteger |
readBigInteger()
Reads a BigInteger. |
static java.lang.String |
readStringLine()
Reads a text line. |
static java.lang.String |
readStringLine(java.io.InputStream instream)
Reads a text line. |
static java.lang.String |
readStringLine(java.io.Reader reader)
Reads a text line. |
static char |
readValueChar()
Reads a character. |
static double |
readValueDouble()
Reads a double value. |
static float |
readValueFloat()
Reads a float value. |
static int |
readValueInt()
Reads an int value. |
static long |
readValueLong()
Reads a long value. |
static short |
readValueShort()
Reads a short value. |
static int |
scanf(java.io.BufferedReader buf_reader,
java.lang.String sFormat,
java.util.List listFormatParameter)
Imitation of the ANSI C scanf function. |
static int |
scanf(java.io.BufferedReader buf_reader,
java.lang.String sFormat,
java.lang.Object[] aFormatParameter)
Imitation of the ANSI C scanf function. |
static int |
scanf(java.io.BufferedReader buf_reader,
java.lang.String sFormat,
java.util.Vector vecFormatParameter)
Imitation of the ANSI C scanf function. |
static int |
scanf(java.io.InputStream instream,
java.lang.String sFormat,
java.util.List listFormatParameter)
Imitation of the ANSI C scanf function. |
static int |
scanf(java.io.InputStream instream,
java.lang.String sFormat,
java.lang.Object[] aFormatParameter)
Imitation of the ANSI C scanf function. |
static int |
scanf(java.io.InputStream instream,
java.lang.String sFormat,
java.util.Vector vecFormatParameter)
Imitation of the ANSI C scanf function. |
static int |
scanf(java.lang.String sFormat,
java.util.List listFormatParameter)
Imitation of the ANSI C scanf function. |
static int |
scanf(java.lang.String sFormat,
java.lang.Object[] aFormatParameter)
Imitation of the ANSI C scanf function. |
static int |
scanf(java.lang.String sFormat,
java.util.Vector vecFormatParameter)
Imitation of the ANSI C scanf function. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public ToolkitIO()
| Method Detail |
public static java.lang.String getLicenseInfo()
public static int scanf(java.lang.String sFormat,
java.util.List listFormatParameter)
throws java.io.IOException
development stage of the method: release
public static int scanf(java.lang.String sFormat,
java.util.Vector vecFormatParameter)
throws java.io.IOException
development stage of the method: release
public static int scanf(java.lang.String sFormat,
java.lang.Object[] aFormatParameter)
throws java.io.IOException
development stage of the method: release
public static int scanf(java.io.InputStream instream,
java.lang.String sFormat,
java.util.Vector vecFormatParameter)
throws java.io.IOException
development stage of the method: release
public static int scanf(java.io.InputStream instream,
java.lang.String sFormat,
java.util.List listFormatParameter)
throws java.io.IOException
development stage of the method: release
public static int scanf(java.io.InputStream instream,
java.lang.String sFormat,
java.lang.Object[] aFormatParameter)
throws java.io.IOException
development stage of the method: release
public static int scanf(java.io.BufferedReader buf_reader,
java.lang.String sFormat,
java.lang.Object[] aFormatParameter)
throws java.io.IOException
| conversion character | description |
|---|---|
| % | A single % character is expected in the input. No assignment is done. |
| b,B (extension not to ANSI-C compatible) | A binary integer is expected. |
| d D (extension not to ANSI-C compatible) | A decimal integer is expected. |
| u U (extension not to ANSI-C compatible) | An unsigned decimal integer is expected. |
| o O (extension not to ANSI-C compatible) | An octal integer is expected. |
| x,X | A hexadecimal integer is expected. |
| i | An integer is expected. A leading 0(zero) implies octal. A leading 0x or 0X implies hexadecimal. Otherwise, decimal is assumed. |
| e,E,f,g,G F (extension not to ANSI-C compatible) | A floating-point number is expected. |
| s S (extension not to ANSI-C compatible) | A string is expected. The input is terminated by a white-space character. scanf cannot read an empty string. |
| ls,LS (extension not to ANSI-C compatible) | A string line is expected. The input is terminated by a new line character. |
| c C (extension not to ANSI-C compatible) | A character is expected. |
| [ | Indicates string data and the normal skip over leading whit space is suppressed. The left bracket is followed by a set of characters, called the scanset, and a right bracket. The input field is the maximal sequence of input characters consisting entirely of characters in the scanset. The circumflex (^), when it appears as the first character in the scanset, serves as a complement operator and redefines the scanset as the set of all characters not contained in the remainder of the scanset string. Construction of the scanset follows certain conventions. A range of characters may be represented by the construct first-last, enabling [0123456789] to be expressed [0-9]. Using this convention, first must be lexically less than or equal to last. Otherwise, the dash stands for itself. The dash also stands for itself when it is the first or the last character in the scanset. To include the right square bracket as an element of the scanset, it must appear as the first character (possibly preceded by a circumflex) of the scanset, in which case it will not be interpreted syntactically as the closing bracket. At least one character must match for this conversion to succeed. |
development stage of the method: release
public static int scanf(java.io.BufferedReader buf_reader,
java.lang.String sFormat,
java.util.List listFormatParameter)
throws java.io.IOException
development stage of the method: release
public static int scanf(java.io.BufferedReader buf_reader,
java.lang.String sFormat,
java.util.Vector vecFormatParameter)
throws java.io.IOException
development stage of the method: release
public static void printf(java.io.Writer stream,
java.lang.String sFormat,
java.util.Vector vecFormatParameter)
throws java.io.IOException
Example:
Writer out
= new BufferedWriter(new OutputStreamWriter(System.out));
Vector vec = new java.util.Vector();
vec.addElement( new Integer(5) );
vec.addElement( new Integer(7) );
vec.addElement( new Integer(5 * 7) );
ToolkitIO.printf(out, " %i * %i = %i ",
vec );
development stage of the method: release
public static void printf(java.io.Writer stream,
java.lang.String sFormat,
java.util.List listFormatParameter)
throws java.io.IOException
Example:
Writer out
= new BufferedWriter(new OutputStreamWriter(System.out));
List list = new java.util.ArrayList();
list.add( new Integer(3) );
list.add( new Integer(4) );
list.add( new Integer(7) );
ToolkitIO.printf(out, " %i + %i = %i ",
list );
development stage of the method: release
public static void printf(java.io.Writer stream,
java.lang.String sFormat,
java.lang.Object[] aFormatParameter)
throws java.io.IOException
Example:
Writer out
= new BufferedWriter(new OutputStreamWriter(System.out));
ToolkitIO.printf(out, " %i / %i = %i ",
new Object[]
{
new Integer(256),
new Integer(2),
new Integer(128)
} );
| flag character | meaning |
|---|---|
| - | The resulting conversion is left-justified within the field. |
| + | The resulting signed conversion always begins with a sign(+ or -). |
| blank | If the first character of a signed conversion is not a sign, a blank is prefixed to the result. This implies that if the blank and + flags both appear, the blank flag is ignored. |
| # | This flag specifies that the value is converted to an
alternated form. For c, d, i, s, n and u conversions, the flag has no effect.
For o conversion, it increases the precision to force the first digit of the
result to be a zero. For x conversion, a non-zero result will have 0x or 0X
prefixed to it. For e, f or g conversions, the result will always contain
a radix character, even if no digits follow the radix (normally, a radix
character appears in the resulting conversions only if followed by a digit). For g conversions, trailing zeroes are not removed from the result. |
| 0 | Leading zeros (following any indication of sign or base)
are used to pad to the field width for all conversion characters. No space
padding is performed. If both the 0 and - appear, the 0 flag is ignored. For d, i, o, u and x conversions, if a precision is specified, the 0 flag is ignored. |
The conversion characters and their meanings are:
| conversion character | meaning |
|---|---|
| b,B (extension not to ANSI-C compatible) | The integer argument is converted to binary notation. |
| d,i,o,u,x,X D,I,O,U (extension not to ANSI-C compatible) |
The integer argument is converted to decimal (d and i are identical), octal (0), unsigned decimal (u), or hexadecimal notation (x), respectively; the letters abcdef are used for x conversion and the letters ABCDEF for X conversion. The precision specifies the minimum number of digits to appear. The default precision is zero. The result of converting a zero value with a zero precision is a null string. |
| f F (extension not to ANSI-C compatible) |
The double value argument is converted to decimal notation in the style INT.FRACT (%.f) or INT,FRACT (%,f). |
| e,E | The double argument is converted in an exponential form. For example 1.234e+003 for the value 1234. |
| g,G | The double argument is printed in style f or e (or in style E in the case of a G format code), with the precision specifying the number of significant digits. The style used depends on the value converted: style e will be used only if the exponent resulting from the conversion is less than -4 or greater than or equal to the precision. Trailing zeroes are removed from the fractional part of the result. A radix character appears only if it is followed by a digit. |
| c C (extension not to ANSI-C compatible) |
The character argument is printed. |
| s S (extension not to ANSI-C compatible) |
The string argument is printed. |
| % | Print the character %. No argument is converted. |
development stage of the method: release
public static void printf(java.io.Writer stream,
java.lang.String sFormat,
char ch)
throws java.io.IOException
Example:
Writer out
= new BufferedWriter(new OutputStreamWriter(System.out));
ToolkitIO.printf(out, "The character is %c.",
'B' );
development stage of the method: release
public static void printf(java.io.Writer stream,
java.lang.String sFormat,
double d)
throws java.io.IOException
Example:
Writer out
= new BufferedWriter(new OutputStreamWriter(System.out));
ToolkitIO.printf(out, "The result is %.3lf",
3.1415 );
development stage of the method: release
public static void printf(java.io.Writer stream,
java.lang.String sFormat,
long l)
throws java.io.IOException
Example:
Writer out
= new BufferedWriter(new OutputStreamWriter(System.out));
long x = 123456789;
ToolkitIO.printf(out, "The result is %ld.",
x );
development stage of the method: release
public static void printf(java.io.Writer stream,
java.lang.String sFormat,
java.lang.Object param1)
throws java.io.IOException
Example:
Writer out
= new BufferedWriter(new OutputStreamWriter(System.out));
ToolkitIO.printf(out, "result:%lf",
new Double(3.14) );
development stage of the method: release
public static void printf(java.io.Writer stream,
java.lang.String sFormat,
java.lang.Object param1,
java.lang.Object param2)
throws java.io.IOException
Example:
Writer out
= new BufferedWriter(new OutputStreamWriter(System.out));
ToolkitIO.printf(out, "%i is the square of %i.",
new Integer(9),
new Integer(3) );
development stage of the method: release
public static void printf(java.io.Writer stream,
java.lang.String sFormat,
java.lang.Object param1,
java.lang.Object param2,
java.lang.Object param3)
throws java.io.IOException
Example:
Writer out
= new BufferedWriter(new OutputStreamWriter(System.out));
ToolkitIO.printf(out, "%c%c%c",
new Character('a'),
new Character('b'),
new Character('c') );
development stage of the method: release
public static void printf(java.io.Writer stream,
java.lang.String sFormat,
java.lang.Object param1,
java.lang.Object param2,
java.lang.Object param3,
java.lang.Object param4)
throws java.io.IOException
Example:
Writer out
= new BufferedWriter(new OutputStreamWriter(System.out));
ToolkitIO.printf(out, "four Values:%s %s %s %s",
"This","is","an","example" );
development stage of the method: release
public static void printf(java.io.Writer stream,
java.lang.String sFormat,
java.lang.Object param1,
java.lang.Object param2,
java.lang.Object param3,
java.lang.Object param4,
java.lang.Object param5)
throws java.io.IOException
Example:
FileWriter writer = new FileWriter("example.txt");
ToolkitIO.printf( writer, "%ld %lf %ld %,lf %c",
"12345678901234567890123456789"
"0.12345678901234567890123456789",
"100",
"123456789.123456789", "x");
development stage of the method: release
public static void printf(java.io.Writer stream,
java.lang.String sFormat,
java.lang.Object param1,
java.lang.Object param2,
java.lang.Object param3,
java.lang.Object param4,
java.lang.Object param5,
java.lang.Object param6)
throws java.io.IOException
Example:
FileWriter writer = new FileWriter("example.txt");
ToolkitIO.printf( writer, "%5$d, %4$d, %3$d, %2$d, %1$d, %0$d",
new Integer(1), new Integer(2), new Integer(4),
new Integer(8), new Integer(16), new Integer(32) );
development stage of the method: release
public static void printf(java.lang.String sFormat,
java.lang.Object[] aFormatParameter)
throws java.io.IOException
To this version of printf the parameters in an array are transferred.
Example:
ToolkitIO.printf(" %i / %i = %i ",
new Object[]
{
new Integer(256),
new Integer(2),
new Integer(128)
} );
development stage of the method: release
public static void printf(java.lang.String sFormat,
java.util.Vector vecFormatParameter)
throws java.io.IOException
To this version of printf the parameters in a vector are transferred.
Example:
Vector vec = new java.util.Vector();
vec.addElement( new Integer(5) );
vec.addElement( new Integer(7) );
vec.addElement( new Integer(5 * 7) );
ToolkitIO.printf(" %i * %i = %i ",
vec );
development stage of the method: release
public static void printf(java.lang.String sFormat,
java.util.List listFormatParameter)
throws java.io.IOException
To this version of printf the parameters in a list are transferred.
Example:
List list = new java.util.ArrayList();
list.add( new Integer(3) );
list.add( new Integer(4) );
list.add( new Integer(7) );
ToolkitIO.printf(" %i + %i = %i ",
list );
development stage of the method: release
public static void printf(java.lang.String sFormat,
char ch)
throws java.io.IOException
To this version of printf a character value is transferred.
Example:
char ch = 'A';
ToolkitIO.printf("The character is %c.",
ch );
development stage of the method: release
public static void printf(java.lang.String sFormat,
double d)
throws java.io.IOException
To this version of printf a double value is transferred.
Example:
double pi = 3.1415;
ToolkitIO.printf("The result is %lf.",
pi );
development stage of the method: release
public static void printf(java.lang.String sFormat,
long l)
throws java.io.IOException
To this version of printf a long value is transferred.
Example:
long x = 123456789;
ToolkitIO.printf("The result is %ld.",
x );
development stage of the method: release
public static void printf(java.lang.String sFormat)
throws java.io.IOException
To this version of printf one parameter is transferred.
Example:
ToolkitIO.printf("Hello World");
development stage of the method: release
public static void printf(java.lang.String sFormat,
java.lang.Object param1)
throws java.io.IOException
To this version of printf one parameter is transferred.
Example:
ToolkitIO.printf("result:%lf",
new Double(3.14) );
development stage of the method: release
public static void printf(java.lang.String sFormat,
java.lang.Object param1,
java.lang.Object param2)
throws java.io.IOException
To this version of printf two format arguments are transferred.
Example:
ToolkitIO.printf("%i is the square of %i.",
new Integer(9),
new Integer(3) );
development stage of the method: release
public static void printf(java.lang.String sFormat,
java.lang.Object param1,
java.lang.Object param2,
java.lang.Object param3)
throws java.io.IOException
To this version of printf three format arguments are transferred.
Example:
ToolkitIO.printf("%c%c%c",
new Character('a'),
new Character('b'),
new Character('c') );
development stage of the method: release
public static void printf(java.lang.String sFormat,
java.lang.Object param1,
java.lang.Object param2,
java.lang.Object param3,
java.lang.Object param4)
throws java.io.IOException
To this version of printf four format arguments are transferred.
Example:
ToolkitIO.printf("four Values:%s %s %s %s",
"This","is","an","example" );
development stage of the method: release
public static void printf(java.lang.String sFormat,
java.lang.Object param1,
java.lang.Object param2,
java.lang.Object param3,
java.lang.Object param4,
java.lang.Object param5)
throws java.io.IOException
To this version of printf five format arguments are transferred.
Example:
ToolkitIO.printf("five Values:%c, %s, %hx, %x, %lx",
new Character('A'),
"Example", new Short(255),
new Integer(16), new Long(65535) );
development stage of the method: release
public static void printf(java.lang.String sFormat,
java.lang.Object param1,
java.lang.Object param2,
java.lang.Object param3,
java.lang.Object param4,
java.lang.Object param5,
java.lang.Object param6)
throws java.io.IOException
To this version of printf six format arguments are transferred.
Example:
ToolkitIO.printf("six Values:%hi, %i, %li, %f, %lf, %x",
new Short(1),
new Integer(2),
new Long(3),
new Float(4.0),
new Double(5.0), new Integer(6) );
development stage of the method: release
public static void flushInOut()
throws java.io.IOException
development stage of the method: release
public static java.lang.String readStringLine()
throws java.io.IOException
development stage of the method: release
public static java.lang.String readStringLine(java.io.Reader reader)
throws java.io.IOException
development stage of the method: release
public static java.lang.String readStringLine(java.io.InputStream instream)
throws java.io.IOException
development stage of the method: release
public static char readValueChar()
throws java.io.IOException
development stage of the method: release
public static short readValueShort()
throws java.io.IOException
development stage of the method: release
public static int readValueInt()
throws java.io.IOException
development stage of the method: release
public static long readValueLong()
throws java.io.IOException
development stage of the method: release
public static float readValueFloat()
throws java.io.IOException
development stage of the method: release
public static double readValueDouble()
throws java.io.IOException
development stage of the method: release
public static java.math.BigInteger readBigInteger()
throws java.io.IOException
development stage of the method: release
public static java.math.BigDecimal readBigDecimal()
throws java.io.IOException
development stage of the method: release
|
Softhema Java Toolkit Collection 1.1 | ||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||
| Introduction |
| Installation |
| Samples |
| License (read carefully) |