/// <summary> /// Appends a subsequence of the specified character sequence to this writer. /// /// <para> An invocation of this method of the form <tt>out.append(csq, start, /// end)</tt> when <tt>csq</tt> is not <tt>null</tt>, behaves in /// exactly the same way as the invocation /// /// <pre> /// out.write(csq.subSequence(start, end).toString()) </pre> /// /// </para> /// </summary> /// <param name="csq"> /// The character sequence from which a subsequence will be /// appended. If <tt>csq</tt> is <tt>null</tt>, then characters /// will be appended as if <tt>csq</tt> contained the four /// characters <tt>"null"</tt>. /// </param> /// <param name="start"> /// The index of the first character in the subsequence /// </param> /// <param name="end"> /// The index of the character following the last character in the /// subsequence /// </param> /// <returns> This writer /// </returns> /// <exception cref="IndexOutOfBoundsException"> /// If <tt>start</tt> or <tt>end</tt> are negative, <tt>start</tt> /// is greater than <tt>end</tt>, or <tt>end</tt> is greater than /// <tt>csq.length()</tt> /// /// @since 1.5 </exception> public override PrintWriter Append(CharSequence csq, int start, int end) { CharSequence cs = (csq == null ? "null" : csq); Write(cs.SubSequence(start, end).ToString()); return(this); }
/// <summary> /// Appends a subsequence of the specified character sequence to this output /// stream. /// /// <para> An invocation of this method of the form <tt>out.append(csq, start, /// end)</tt> when <tt>csq</tt> is not <tt>null</tt>, behaves in /// exactly the same way as the invocation /// /// <pre> /// out.print(csq.subSequence(start, end).toString()) </pre> /// /// </para> /// </summary> /// <param name="csq"> /// The character sequence from which a subsequence will be /// appended. If <tt>csq</tt> is <tt>null</tt>, then characters /// will be appended as if <tt>csq</tt> contained the four /// characters <tt>"null"</tt>. /// </param> /// <param name="start"> /// The index of the first character in the subsequence /// </param> /// <param name="end"> /// The index of the character following the last character in the /// subsequence /// </param> /// <returns> This output stream /// </returns> /// <exception cref="IndexOutOfBoundsException"> /// If <tt>start</tt> or <tt>end</tt> are negative, <tt>start</tt> /// is greater than <tt>end</tt>, or <tt>end</tt> is greater than /// <tt>csq.length()</tt> /// /// @since 1.5 </exception> public virtual PrintStream Append(CharSequence csq, int start, int end) { CharSequence cs = (csq == null ? "null" : csq); Write(cs.SubSequence(start, end).ToString()); return(this); }