Saturday, February 25, 2017

Java lang Appendable

Java lang Appendable



It is a public abstract interface. Many classes and interfaces are extending this abstract interface for different purposes.


SuperClass of Appendable:-

From java.lang package -

StringBuffer

StringBuilder

From java.io package -

BufferedWriter

CharArrayWriter

FileWriter

FilterWriter

OutputStreamWriter

PipedWriter

PrintStream

PrintWriter

StringWriter

Writer

From java.nio package - 

CharBuffer

From java.rmi.server package -

LogStream

All the above classes and interfaces are designed for different purposes and used all abstract method defined in the AbstractStringBuilder class for their own way of implementing the code by overriding these four methods.  


Methods of AbstractStringBuilder class


public abstract Appendable append(CharSequence cs) throws IOException;

public abstract Appendable append(CharSequence cs, int i, int j)  throws IOException;

public abstract Appendable append(char cs) throws IOException;




Available link for download