public void writeToOutputStream ( OutputStream os ) throws IOException { if ( sb == null ) { throw new IllegalStateException ( "No interal StringBuffer" ) ; } byte [ ] b ; try { b = getBytes ( ) ; } catch ( UnsupportedEncodingException e ) { throw new RuntimeException ( e ) ; } os . write ( b ) ; }
Write the contents of the page to the client .