MCPcopy Create free account
hub / github.com/davidgiven/luje / Appendable

Interface Appendable

lib/java/lang/Appendable.java:35–87  ·  view source on GitHub ↗

Declares methods to append characters or character sequences. Any class that implements this interface can receive data formatted by a java.util.Formatter. The appended character or character sequence should be valid according to the rules described in {@link Character Unicode Character Repr

Source from the content-addressed store, hash-verified

33 * throw any exceptions at all and use error codes instead.
34 */
35public interface Appendable {
36
37 /**
38 * Appends the specified character.
39 *
40 * @param c
41 * the character to append.
42 * @return this {@code Appendable}.
43 * @throws IOException
44 * if an I/O error occurs.
45 */
46 Appendable append(char c) throws IOException;
47
48 /**
49 * Appends the character sequence {@code csq}. Implementation classes may
50 * not append the whole sequence, for example if the target is a buffer with
51 * limited size.
52 * <p>
53 * If {@code csq} is {@code null}, the characters "null" are appended.
54 *
55 * @param csq
56 * the character sequence to append.
57 * @return this {@code Appendable}.
58 * @throws IOException
59 * if an I/O error occurs.
60 */
61 Appendable append(CharSequence csq) throws IOException;
62
63 /**
64 * Appends a subsequence of {@code csq}.
65 * <p>
66 * If {@code csq} is not {@code null} then calling this method is equivalent
67 * to calling {@code append(csq.subSequence(start, end))}.
68 * <p>
69 * If {@code csq} is {@code null}, the characters "null" are appended.
70 *
71 * @param csq
72 * the character sequence to append.
73 * @param start
74 * the first index of the subsequence of {@code csq} that is
75 * appended.
76 * @param end
77 * the last index of the subsequence of {@code csq} that is
78 * appended.
79 * @return this {@code Appendable}.
80 * @throws IndexOutOfBoundsException
81 * if {@code start < 0}, {@code end < 0}, {@code start > end}
82 * or {@code end} is greater than the length of {@code csq}.
83 * @throws IOException
84 * if an I/O error occurs.
85 */
86 Appendable append(CharSequence csq, int start, int end) throws IOException;
87}

Callers 4

toStringMethod · 0.65
toURIMethod · 0.65
getAbsoluteNameMethod · 0.65
deepToStringImplMethod · 0.65

Implementers 5

StringBufferlib/java/lang/StringBuffer.java
StringBuilderlib/java/lang/StringBuilder.java
PrintStreamlib/java/io/PrintStream.java
Writerlib/java/io/Writer.java
CharBufferlib/java/nio/CharBuffer.java

Calls

no outgoing calls

Tested by

no test coverage detected