|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectrebuild.util.text.StringUtilities
public final class StringUtilities
Various String utilities.
Field Summary | |
---|---|
static int |
BASE64FORMATTINGOPTIONS_INSERTLINEBREAKS
Inserts line breaks after every 76 characters in the string representation. |
static int |
BASE64FORMATTINGOPTIONS_NONE
Does not insert line breaks after every 76 characters in the string representation. |
static short |
STRINGSPLITOPTIONS_NONE
The return value includes array elements that contain an empty string. |
static short |
STRINGSPLITOPTIONS_REMOVEEMPTYENTRIES
The return value does not include array elements that contain an empty string. |
Method Summary | |
---|---|
static java.lang.StringBuffer |
append(java.lang.StringBuffer buf,
char value,
int repeatCount)
Appends a specified number of copies of the string representation of a Unicode character to the end of the StringBuffer. |
static java.lang.StringBuffer |
append(java.lang.StringBuffer buf,
char value,
int repeatCount,
int index)
Appends a specified number of copies of the string representation of a Unicode character to the end of the StringBuffer. |
static java.lang.StringBuffer |
append(java.lang.StringBuffer buf,
java.lang.String value,
int startIndex,
int index,
boolean indexIsLength)
Appends a section of string to the specified StringBuffer. |
static int |
compareOrdinal(java.lang.String strA,
int indexA,
java.lang.String strB,
int indexB,
int length)
Compares substrings of two specified String objects by evaluating the numeric values of the corresponding char objects in each substring. |
static int |
compareToLength(java.lang.String str1,
java.lang.String str2,
int length)
Compare two strings up to a certain length. |
static boolean |
contains(java.lang.String stringToCheck,
java.lang.String value)
Returns a value indicating whether the specified String object occurs within this string. |
static java.lang.StringBuffer |
delete(java.lang.StringBuffer buf,
int startingIndex,
int length)
Removes the characters in a substring of a StringBuffer. |
static char |
forDigit(int digit,
int radix)
Get the character value for the specified numeric digit. |
static java.lang.String |
format_java(java.lang.String format,
java.lang.Object arg0)
Format a string. |
static java.lang.String |
format_java(java.lang.String format,
java.lang.Object[] args)
Format a string. |
static java.lang.String |
format_java(java.lang.String format,
java.lang.Object arg0,
java.lang.Object arg1)
Format a string. |
static java.lang.String |
format_java(java.lang.String format,
java.lang.Object arg0,
java.lang.Object arg1,
java.lang.Object arg2)
Format a string. |
static java.lang.String |
format_printf(java.lang.String format,
java.lang.Object arg0)
Format a string. |
static java.lang.String |
format_printf(java.lang.String format,
java.lang.Object[] args)
Format a string. |
static java.lang.String |
format_printf(java.lang.String format,
java.lang.Object arg0,
java.lang.Object arg1)
Format a string. |
static java.lang.String |
format_printf(java.lang.String format,
java.lang.Object arg0,
java.lang.Object arg1,
java.lang.Object arg2)
Format a string. |
static int |
fprintf(java.io.OutputStream stream,
java.lang.String format,
java.lang.Object[] argptr)
Write formatted output to a output stream. |
static int |
fprintf(java.io.PrintStream stream,
int count,
java.lang.String format,
java.lang.Object[] argptr)
Write formatted output to a print stream. |
static int |
fprintf(java.io.PrintStream stream,
java.lang.String format,
java.lang.Object[] argptr)
Write formatted output to a print stream. |
static int |
fprintf(Stream stream,
java.lang.String format,
java.lang.Object[] argptr)
Write formatted output to a stream. |
static byte[] |
fromBase64CharArray(char[] inArray,
int offset,
int length)
Converts a subset of a Unicode character array, which encodes binary data as base 64 digits, to an equivalent 8-bit unsigned integer array. |
static byte[] |
fromBase64String(java.lang.String s)
Converts the specified String , which encodes binary data as base 64 digits, to an equivalent 8-bit signed integer array. |
static int |
fscanf(java.io.InputStream file,
java.lang.String format,
java.lang.Object[] argptr)
Read formatted data from a input stream. |
static int |
fscanf(Stream file,
java.lang.String format,
java.lang.Object[] argptr)
Read formatted data from a stream. |
static boolean |
isLetterOrDigit(char ch)
Determines if the specified character is a letter or digit. |
static boolean |
isNullEmptyOrWhitespace(java.lang.String value)
Indicates whether the specified String object is null, an Empty string, or whitespace. |
static boolean |
isNullOrEmpty(java.lang.String value)
Indicates whether the specified String object is null or an Empty string. |
static int |
lastIndexOf(java.lang.String str,
java.lang.String value)
Returns the index within a string of the last occurrence of the specified substring. |
static int |
printf(java.lang.String format,
java.lang.Object[] argptr)
Print formatted data to System.out |
static java.lang.String |
replace(java.lang.String str,
char oldChar,
char newChar)
Replaces all occurrences of a specified Unicode character in this instance with another specified Unicode character. |
static java.lang.String |
replace(java.lang.String str,
java.lang.String oldValue,
java.lang.String newValue)
Replaces all occurrences of a specified String in a String , with another specified String . |
static java.lang.String[] |
split(java.lang.String str,
char separator)
Returns a String array containing the substrings in this instance that are delimited by a separator. |
static java.lang.String[] |
split(java.lang.String str,
char[] separator)
Returns a String array containing the substrings in this instance that are delimited by elements of a specified char array. |
static java.lang.String[] |
split(java.lang.String str,
char[] separator,
int count)
Returns a String array containing the substrings in this instance that are delimited by elements of a specified char array. |
static java.lang.String[] |
split(java.lang.String str,
char[] separator,
int count,
short options)
Returns a String array containing the substrings in this string that are delimited by elements of a specified char array. |
static java.lang.String[] |
split(java.lang.String str,
char[] separator,
short options)
Returns a String array containing the substrings in this string that are delimited by elements of a specified char array. |
static java.lang.String[] |
split(java.lang.String str,
java.lang.String[] separator,
int count,
short options)
Returns a String array containing the substrings in this string that are delimited by elements of a specified String array. |
static java.lang.String[] |
split(java.lang.String str,
java.lang.String[] separator,
short options)
Returns a String array containing the substrings in this string that are delimited by elements of a specified String array. |
static int |
sprintf(char[] buffer,
java.lang.String format,
java.lang.Object[] argptr)
Print formatted variable argument list to a char array. |
static int |
sprintf(java.lang.StringBuffer buffer,
java.lang.String format,
java.lang.Object[] argptr)
Print formatted variable argument list to a string buffer. |
static int |
sscanf(java.lang.String str,
java.lang.String format,
java.lang.Object[] argptr)
Read formatted data from string. |
static java.lang.String |
substring(java.lang.String str,
int startIndex,
int length)
Retrieves a substring from this instance. |
static int |
toBase64CharArray(byte[] inArray,
int offsetIn,
int length,
char[] outArray,
int offsetOut)
Converts a subset of an 8-bit signed integer array to an equivalent subset of a Unicode character array encoded with base 64 digits. |
static int |
toBase64CharArray(byte[] inArray,
int offsetIn,
int length,
char[] outArray,
int offsetOut,
int options)
Converts a subset of an 8-bit signed integer array to an equivalent subset of a Unicode character array encoded with base 64 digits. |
static java.lang.String |
toBase64String(byte[] inArray)
Converts the value of an array of 8-bit signed integers to its equivalent String representation encoded with base 64 digits. |
static java.lang.String |
toBase64String(byte[] inArray,
int options)
Converts a subset of an array of 8-bit signed integers to its equivalent String representation encoded with base 64 digits. |
static java.lang.String |
toBase64String(byte[] inArray,
int offset,
int length)
Converts a subset of an array of 8-bit signed integers to its equivalent String representation encoded with base 64 digits. |
static java.lang.String |
toBase64String(byte[] inArray,
int offset,
int length,
int options)
Converts a subset of an array of 8-bit signed integers to its equivalent String representation encoded with base 64 digits. |
static char[] |
toCharArray(java.lang.String str,
int startIndex,
int length)
Copies the characters in a specified substring in this instance to a Unicode character array. |
static int |
vsnprintf(char[] buffer,
int count,
java.lang.String format,
java.lang.Object[] argptr)
Print formatted variable argument list to a char array. |
static int |
vsnprintf(java.lang.StringBuffer buffer,
int count,
java.lang.String format,
java.lang.Object[] argptr)
Print formatted variable argument list to a string buffer. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final short STRINGSPLITOPTIONS_NONE
public static final short STRINGSPLITOPTIONS_REMOVEEMPTYENTRIES
public static final int BASE64FORMATTINGOPTIONS_NONE
public static final int BASE64FORMATTINGOPTIONS_INSERTLINEBREAKS
Method Detail |
---|
public static boolean isNullOrEmpty(java.lang.String value)
value
- A String reference.
public static boolean isNullEmptyOrWhitespace(java.lang.String value)
value
- A String reference.
public static boolean contains(java.lang.String stringToCheck, java.lang.String value)
stringToCheck
- The String that should be checked.value
- The String object to seek.
java.lang.NullPointerException
- If value or stringToCheck is null.public static char[] toCharArray(java.lang.String str, int startIndex, int length)
str
- The String to get the chars from.startIndex
- The starting position of a substring in this instance.length
- The length of the substring in this instance.
java.lang.StringIndexOutOfBoundsException
- startIndex or length is less than zero.-or- startIndex plus length is greater than the length of this instance.public static int compareToLength(java.lang.String str1, java.lang.String str2, int length)
str1
- String to compare.str2
- String to compare.length
- How many chars to compare up to.
java.lang.NullPointerException
- str1 or str2 is null.
java.lang.StringIndexOutOfBoundsException
- length is less then 0 (zero).public static java.lang.String substring(java.lang.String str, int startIndex, int length)
str
- The String to split.startIndex
- The index of the start of the substring.length
- The number of characters in the substring.
java.lang.StringIndexOutOfBoundsException
- startIndex plus length indicates a position not within this instance.-or- startIndex or length is less than zero.public static java.lang.String replace(java.lang.String str, char oldChar, char newChar)
str.replace(oldChar, newChar)
.
str
- The String
to replace chars from.oldChar
- A Unicode character to be replaced.newChar
- A Unicode character to replace all occurrences of oldChar.
String
equivalent to this instance but with all instances of oldChar replaced with newChar.public static java.lang.String replace(java.lang.String str, java.lang.String oldValue, java.lang.String newValue)
String
in a String
, with another specified String
.
str
- The String
to replace something from.oldValue
- A String
to be replaced.newValue
- A String
to replace all occurrences of oldValue.
String
equivalent to str but with all instances of oldValue replaced with newValue.
java.lang.NullPointerException
- oldValue or str is null.
java.lang.IllegalArgumentException
- oldValue is the empty string ("").public static int lastIndexOf(java.lang.String str, java.lang.String value)
str
- The String to search in.value
- The value to search for.
public static boolean isLetterOrDigit(char ch)
ch
- the character to be tested.
true
if the character is a letter or digit; false
otherwise.public static java.lang.String[] split(java.lang.String str, char separator)
str
- The String to split.separator
- A Unicode character that delimit the substrings in this instance.
public static java.lang.String[] split(java.lang.String str, char[] separator)
str
- The String to split.separator
- An array of Unicode characters that delimit the substrings in this instance, an empty array containing no delimiters, or null.
public static java.lang.String[] split(java.lang.String str, char[] separator, int count)
str
- The String to split.separator
- An array of Unicode characters that delimit the substrings in this instance, an empty array containing no delimiters, or null.count
- The maximum number of substrings to return.
java.lang.StringIndexOutOfBoundsException
- count is negative.public static java.lang.String[] split(java.lang.String str, char[] separator, short options)
str
- The String to split.separator
- An array of Unicode characters that delimit the substrings in this string, an empty array containing no delimiters, or null.options
- Specify STRINGSPLITOPTIONS_REMOVEEMPTYENTRIES to omit empty array elements from the array returned, or STRINGSPLITOPTIONS_NONE to include empty array elements in the array returned.
java.lang.IllegalArgumentException
- options is not one of the STRINGSPLITOPTIONS_* values.public static java.lang.String[] split(java.lang.String str, java.lang.String[] separator, short options)
str
- The String to split.separator
- An array of strings that delimit the substrings in this string, an empty array containing no delimiters, or null.options
- Specify STRINGSPLITOPTIONS_REMOVEEMPTYENTRIES to omit empty array elements from the array returned, or STRINGSPLITOPTIONS_NONE to include empty array elements in the array returned.
java.lang.IllegalArgumentException
- options is not one of the STRINGSPLITOPTIONS_* values.public static java.lang.String[] split(java.lang.String str, char[] separator, int count, short options)
str
- The String to split.separator
- An array of Unicode characters that delimit the substrings in this string, an empty array containing no delimiters, or null.count
- The maximum number of substrings to return.options
- Specify STRINGSPLITOPTIONS_REMOVEEMPTYENTRIES to omit empty array elements from the array returned, or STRINGSPLITOPTIONS_NONE to include empty array elements in the array returned.
java.lang.StringIndexOutOfBoundsException
- count is negative.
java.lang.IllegalArgumentException
- options is not one of the STRINGSPLITOPTIONS_* values.public static java.lang.String[] split(java.lang.String str, java.lang.String[] separator, int count, short options)
str
- The String to split.separator
- An array of strings that delimit the substrings in this string, an empty array containing no delimiters, or null.count
- The maximum number of substrings to return.options
- Specify STRINGSPLITOPTIONS_REMOVEEMPTYENTRIES to omit empty array elements from the array returned, or STRINGSPLITOPTIONS_NONE to include empty array elements in the array returned.
java.lang.StringIndexOutOfBoundsException
- count is negative.
java.lang.IllegalArgumentException
- options is not one of the STRINGSPLITOPTIONS_* values.public static int compareOrdinal(java.lang.String strA, int indexA, java.lang.String strB, int indexB, int length)
strA
- The first String.indexA
- The starting index of the substring in strA.strB
- The second String.indexB
- The starting index of the substring in strB.length
- The maximum number of characters in the substrings to compare.
public static java.lang.String format_java(java.lang.String format, java.lang.Object arg0)
format
- The string format to use.arg0
- The argument to apply to the string format.
public static java.lang.String format_java(java.lang.String format, java.lang.Object arg0, java.lang.Object arg1)
format
- The string format to use.arg0
- The argument to apply to the string format.arg1
- The argument to apply to the string format.
public static java.lang.String format_java(java.lang.String format, java.lang.Object arg0, java.lang.Object arg1, java.lang.Object arg2)
format
- The string format to use.arg0
- The argument to apply to the string format.arg1
- The argument to apply to the string format.arg2
- The argument to apply to the string format.
public static java.lang.String format_java(java.lang.String format, java.lang.Object[] args)
format
- The string format to use.args
- The arguments to apply to the string format.
public static java.lang.String format_printf(java.lang.String format, java.lang.Object arg0)
format
- The string format to use.arg0
- The argument to apply to the string format.
public static java.lang.String format_printf(java.lang.String format, java.lang.Object arg0, java.lang.Object arg1)
format
- The string format to use.arg0
- The argument to apply to the string format.arg1
- The argument to apply to the string format.
public static java.lang.String format_printf(java.lang.String format, java.lang.Object arg0, java.lang.Object arg1, java.lang.Object arg2)
format
- The string format to use.arg0
- The argument to apply to the string format.arg1
- The argument to apply to the string format.arg2
- The argument to apply to the string format.
public static java.lang.String format_printf(java.lang.String format, java.lang.Object[] args)
format
- The string format to use.args
- The arguments to apply to the string format.
public static java.lang.StringBuffer append(java.lang.StringBuffer buf, char value, int repeatCount)
buf
- The StringBuffer to append the chars to.value
- The character to append.repeatCount
- The number of times to append value.
java.lang.IndexOutOfBoundsException
- repeatCount is less than zero.public static java.lang.StringBuffer append(java.lang.StringBuffer buf, char value, int repeatCount, int index)
buf
- The StringBuffer to append the chars to.value
- The character to append.repeatCount
- The number of times to append value.index
- The location to append the chars. If the chars should be added to the end of the StringBuffer then -1 should be passed, if the value is greater then the current length of the StringBuffer then it will be added to the end. This cannot be less then -1.
java.lang.IndexOutOfBoundsException
- repeatCount is less than zero. -or- index is less then -1.public static java.lang.StringBuffer append(java.lang.StringBuffer buf, java.lang.String value, int startIndex, int index, boolean indexIsLength)
buf
- The StringBuffer to append the String to.value
- The String to append.startIndex
- The starting index of value
to append.index
- A value (see indexIsLength).indexIsLength
- If true
then index is the number of chars to append, if
false
then it is the ending index of the String to append.
public static java.lang.StringBuffer delete(java.lang.StringBuffer buf, int startingIndex, int length)
buf
- The StringBuffer to remove chars from.startingIndex
- The beginning index, inclusive.length
- The number of characters to remove.
java.lang.StringIndexOutOfBoundsException
- If startingIndex
is negative, greater than length(), or, when length is added, greater than end.public static java.lang.String toBase64String(byte[] inArray)
String
representation encoded with base 64 digits.
inArray
- An array of 8-bit signed integers.
String
representation, in base 64, of the contents of inArray.
java.lang.NullPointerException
- inArray is null.public static java.lang.String toBase64String(byte[] inArray, int options)
String
representation encoded with base 64 digits. A parameter specifies whether to insert line breaks in the return value.
inArray
- An array of 8-bit signed integers.options
- BASE64FORMATTINGOPTIONS_INSERTLINEBREAKS
to insert a line break every 76 characters, or BASE64FORMATTINGOPTIONS_NONE
to not insert line breaks.
String
representation in base 64 of the elements in inArray.
java.lang.IllegalArgumentException
- options is not a valid Base64FormattingOptions_* value.
java.lang.NullPointerException
- inArray is null.public static java.lang.String toBase64String(byte[] inArray, int offset, int length)
String
representation encoded with base 64 digits. Parameters specify the subset as an offset in the input array, and the number of elements in the array to convert.
inArray
- An array of 8-bit signed integers.offset
- An offset in inArray.length
- The number of elements of inArray to convert.
String
representation in base 64 of length elements of inArray starting at position offset.
java.lang.ArrayIndexOutOfBoundsException
- offset or length is negative.-or- offset plus length is greater than the length of inArray.
java.lang.NullPointerException
- inArray is null.public static java.lang.String toBase64String(byte[] inArray, int offset, int length, int options)
String
representation encoded with base 64 digits. Parameters specify the subset as an offset in the input array, the number of elements in the array to convert, and whether to insert line breaks in the return value.
inArray
- An array of 8-bit signed integers.offset
- An offset in inArray.length
- The number of elements of inArray to convert.options
- BASE64FORMATTINGOPTIONS_INSERTLINEBREAKS
to insert a line break every 76 characters, or BASE64FORMATTINGOPTIONS_NONE
to not insert line breaks.
String
representation in base 64 of length elements of inArray starting at position offset.
java.lang.ArrayIndexOutOfBoundsException
- offset or length is negative.-or- offset plus length is greater than the length of inArray.
java.lang.IllegalArgumentException
- options is not a valid Base64FormattingOptions_* value.
java.lang.NullPointerException
- inArray is null.public static int toBase64CharArray(byte[] inArray, int offsetIn, int length, char[] outArray, int offsetOut)
inArray
- An input array of 8-bit unsigned integers.offsetIn
- A position within inArray.length
- The number of elements of inArray to convert.outArray
- An output array of Unicode characters.offsetOut
- A position within outArray.
java.lang.ArrayIndexOutOfBoundsException
- offsetIn, offsetOut, or length is negative.-or- offsetIn plus length is greater than the length of inArray.-or- offsetOut plus the number of elements to return is greater than the length of outArray.
java.lang.NullPointerException
- inArray or outArray is null.public static int toBase64CharArray(byte[] inArray, int offsetIn, int length, char[] outArray, int offsetOut, int options)
inArray
- An input array of 8-bit unsigned integers.offsetIn
- A position within inArray.length
- The number of elements of inArray to convert.outArray
- An output array of Unicode characters.offsetOut
- A position within outArray.options
- BASE64FORMATTINGOPTIONS_INSERTLINEBREAKS
to insert a line break every 76 characters, or BASE64FORMATTINGOPTIONS_NONE
to not insert line breaks.
java.lang.ArrayIndexOutOfBoundsException
- offsetIn, offsetOut, or length is negative.-or- offsetIn plus length is greater than the length of inArray.-or- offsetOut plus the number of elements to return is greater than the length of outArray.
java.lang.IllegalArgumentException
- options is not a valid Base64FormattingOptions_* value.
java.lang.NullPointerException
- inArray or outArray is null.public static byte[] fromBase64CharArray(char[] inArray, int offset, int length)
inArray
- A Unicode character array.offset
- A position within inArray.length
- The number of elements in inArray to convert.
java.io.IOException
- The length of s, ignoring white space characters, is not zero or a multiple of 4. -or-The format of s is invalid. s contains a non-base 64 character, more than two padding characters, or a non-white space character among the padding characters.
java.lang.ArrayIndexOutOfBoundsException
- offset or length is less than 0.-or- offset plus length indicates a position not within inArray.
java.lang.NullPointerException
- inArray is null.public static byte[] fromBase64String(java.lang.String s)
String
, which encodes binary data as base 64 digits, to an equivalent 8-bit signed integer array.
s
- A String
.
java.lang.NullPointerException
- s is null.
java.io.IOException
- The length of s, ignoring white space characters, is not zero or a multiple of 4. -or-The format of s is invalid. s contains a non-base 64 character, more than two padding characters, or a non-white space character among the padding characters.public static char forDigit(int digit, int radix)
digit
- The numeric digit to retrieve.radix
- The radix the resulting character should be.
public static int vsnprintf(java.lang.StringBuffer buffer, int count, java.lang.String format, java.lang.Object[] argptr)
buffer
- The string buffer to write to.count
- Maximum number of characters to write. If this is less then zero then it will not truncate the output.format
- Format string to write to the buffer.argptr
- Depending on the format string, the function may expect a sequence of additional arguments, each containing one value to be inserted instead of each %-tag specified in
the format parameter, if any. There should be the same number of these arguments as the number of %-tags that expect a value.
public static int vsnprintf(char[] buffer, int count, java.lang.String format, java.lang.Object[] argptr)
buffer
- The char array to write to.count
- Maximum number of characters to write. If this is less then zero then it will not truncate the output.format
- Format string to write to the buffer.argptr
- Depending on the format string, the function may expect a sequence of additional arguments, each containing one value to be inserted instead of each %-tag specified in
the format parameter, if any. There should be the same number of these arguments as the number of %-tags that expect a value.
public static int sprintf(java.lang.StringBuffer buffer, java.lang.String format, java.lang.Object[] argptr)
buffer
- The string buffer to write to.format
- Format string to write to the buffer.argptr
- Depending on the format string, the function may expect a sequence of additional arguments, each containing one value to be inserted instead of each %-tag specified in
the format parameter, if any. There should be the same number of these arguments as the number of %-tags that expect a value.
public static int sprintf(char[] buffer, java.lang.String format, java.lang.Object[] argptr)
buffer
- The char array to write to.format
- Format string to write to the buffer.argptr
- Depending on the format string, the function may expect a sequence of additional arguments, each containing one value to be inserted instead of each %-tag specified in
the format parameter, if any. There should be the same number of these arguments as the number of %-tags that expect a value.
public static int printf(java.lang.String format, java.lang.Object[] argptr)
System.out
format
- Format string to write to System.out
.argptr
- Depending on the format string, the function may expect a sequence of additional arguments, each containing one value to be inserted instead of each %-tag specified in
the format parameter, if any. There should be the same number of these arguments as the number of %-tags that expect a value.
public static int fprintf(java.io.PrintStream stream, java.lang.String format, java.lang.Object[] argptr)
stream
- The print stream to write to.format
- Format string to write to the stream.argptr
- Depending on the format string, the function may expect a sequence of additional arguments, each containing one value to be inserted instead of each %-tag specified in
the format parameter, if any. There should be the same number of these arguments as the number of %-tags that expect a value.
public static int fprintf(java.io.OutputStream stream, java.lang.String format, java.lang.Object[] argptr)
stream
- The print stream to write to.format
- Format string to write to the stream.argptr
- Depending on the format string, the function may expect a sequence of additional arguments, each containing one value to be inserted instead of each %-tag specified in
the format parameter, if any. There should be the same number of these arguments as the number of %-tags that expect a value.
public static int fprintf(Stream stream, java.lang.String format, java.lang.Object[] argptr)
stream
- The print stream to write to.format
- Format string to write to the stream.argptr
- Depending on the format string, the function may expect a sequence of additional arguments, each containing one value to be inserted instead of each %-tag specified in
the format parameter, if any. There should be the same number of these arguments as the number of %-tags that expect a value.
public static int fprintf(java.io.PrintStream stream, int count, java.lang.String format, java.lang.Object[] argptr)
stream
- The print stream to write to.count
- Maximum number of characters to write. If this is less then zero then it will not truncate the output.format
- Format string to write to the stream.argptr
- Depending on the format string, the function may expect a sequence of additional arguments, each containing one value to be inserted instead of each %-tag specified in
the format parameter, if any. There should be the same number of these arguments as the number of %-tags that expect a value.
public static int sscanf(java.lang.String str, java.lang.String format, java.lang.Object[] argptr)
str
- String that the function processes as its source to retrieve the data.format
- String describing the format of str.argptr
- The function expects a sequence of pointers as additional arguments, each one pointing to an object of the type specified by their
corresponding %-tag within the format string, in the same order.
public static int fscanf(Stream file, java.lang.String format, java.lang.Object[] argptr)
file
- The stream to read data from.format
- String describing the format of file.argptr
- The function expects a sequence of pointers as additional arguments, each one pointing to an object of the type specified by their
corresponding %-tag within the format string, in the same order.
public static int fscanf(java.io.InputStream file, java.lang.String format, java.lang.Object[] argptr)
file
- The stream to read data from.format
- String describing the format of file.argptr
- The function expects a sequence of pointers as additional arguments, each one pointing to an object of the type specified by their
corresponding %-tag within the format string, in the same order.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |