Java File Append appendTo(StringBuffer sb, CharSequence s)

Here you can find the source of appendTo(StringBuffer sb, CharSequence s)

Description

append To

License

Open Source License

Declaration

static StringBuffer appendTo(StringBuffer sb, CharSequence s) 

Method Source Code

//package com.java2s;
// License as published by the Free Software Foundation; either

import java.io.IOException;

import java.io.Writer;

public class Main {
    static StringBuffer appendTo(StringBuffer sb, CharSequence s) {
        return appendTo(sb, s, 0, s.length());
    }/*from   w ww .  j  a v a  2 s . com*/

    static StringBuffer appendTo(StringBuffer sb, CharSequence s, int start, int end) {
        while (start < end) {
            sb.append(s.charAt(start));
            start++;
        }
        return sb;
    }

    static Writer appendTo(Writer writer, CharSequence s) throws IOException {
        return appendTo(writer, s, 0, s.length());
    }

    static Writer appendTo(Writer writer, CharSequence s, int start, int end) throws IOException {
        while (start < end) {
            writer.write(s.charAt(start));
            start++;
        }
        return writer;
    }
}

Related

  1. appendFilePart(File dstFile, byte[] bytes)
  2. appendHex(A sb, byte[] array, int offset, int len, char sep)
  3. appendHexJavaScriptRepresentation(Appendable out, int codePoint)
  4. appendHexJavaScriptRepresentation(StringBuilder sb, char c)
  5. appendTo(String fileName, String str)
  6. appendToArray(final File[] original, final File[] toAppend)
  7. appendToCollection(final Vector original, final File[] toAppend)
  8. appendToFileName(File file, String str)
  9. appendToken(StringBuilder path, String token, boolean skipEmpty, boolean skipSeparator)