Template design pattern in JDK, could not find a method defining set of methods to be executed in order

A simple example is java.io.OutputStream. The template method is public void write(byte b[], int off, int len). It calls the abstract method public abstract void write(int b), which must be implemented by a subclass of OutputStream. In this case the invariant portion of the template is the basic error handling that is common to every … Read more