class ServletPrintWriter extends PrintWriter {

    public void writeEnd() {
        if (wasWriteEndAlreadyCalled) {
            throw new IllegalStateException("This method can be called once only.");
        }
        wasWriteEndAlreadyCalled = true;
    }

    public  ServletPrintWriter(final OutputStream outputStream);

}