public static StringBuilder makePage ( final String htmlheader , final String title , final String subtitle , final String body ) { final StringBuilder buf = new StringBuilder ( BOILERPLATE_LENGTH + ( htmlheader == null ? 0 : htmlheader . length ( ) ) + title . length ( ) + subtitle . length ( ) + body . length ( ) ) ; buf . append ( PAGE_HEADER_START ) . append ( title ) . append ( PAGE_HEADER_MID ) ; if ( htmlheader != null ) { buf . append ( htmlheader ) ; } buf . append ( PAGE_HEADER_END_BODY_START ) . append ( subtitle ) . append ( PAGE_BODY_MID ) . append ( body ) . append ( PAGE_FOOTER ) ; return buf ; }
Easy way to generate a small simple HTML page .