Java api Learning Record 1 java. lang. *, apijava. lang.
Interface Appendable
Append
Appendable append (CharSequence csq) throws java. io. IOException
Append the specified character sequence to this Appendable. Sometimes the whole sequence may not be appended, depending on which class is used to implement the Character Sequence csq.
For example, if csq is an instance of CharBuffer, The subsequence to be appended is defined by the buffer location and restriction.
Parameter: csq-string sequence to be appended. If csq is null, four characters "null" are appended to the Appendable ".
Return: This Appendable reference throws: java. io. IOException-if an I/O error occurs
--------------------------------------------------------------------------------
Append
Appendable append (CharSequence csq, int start, int end) throws java. io. IOException
Append the subsequence of the specified character sequence to this Appendable. When csq is not null, out is used. calling this method in the form of append (csq, start, end) is the same as calling this method in the following form: out. append (csq. subSequence (start, end ))
Parameter: csq-sequence of characters to be appended. If csq is null, four characters "null" are appended, just as csq contains these characters. Start-index of the first character in The subsequence end-index of the character that follows the last character in The subsequence
Return: This Appendable reference throws: IndexOutOfBoundsException-If start or end is negative, and start is greater than end or end is greater than csq. length () java. io. IOException-if an I/O error occurs
--------------------------------------------------------------------------------
Append
Appendable append (char c) throws java. io. IOException append a specified character to this Appendable.
Parameter: c-character to be appended \
Return: This Appendable reference throws: java. io. IOException-if an I/O error occurs
Interface AutoCloseablevoid close () throws ExceptionThrows: Exception-if this resource cannot be closed
Automatically disables resources.