SimpleServlets v5.5.0

com.simpleservlets.htmlobjects
Class ByteArrayHTMLPrinter

java.lang.Object
  extended by com.simpleservlets.htmlobjects.ByteArrayHTMLPrinter
All Implemented Interfaces:
HTMLPrinter

public class ByteArrayHTMLPrinter
extends Object
implements HTMLPrinter

Implementation of HTMLPrinter that collect bytes in an internal byte[]. See HTMLUtil's send methods for convenient ways of sending entire pages.

Author:
Paul Hyde

Constructor Summary
ByteArrayHTMLPrinter()
           
 
Method Summary
 byte[] getBytes()
           
 void out(String s)
          Appends the specified string to the output.
 void outln(String s)
          Appends the specified string to the output followed by HTMLString.NEWLINE.
 int size()
           
 int writeTo(OutputStream os)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ByteArrayHTMLPrinter

public ByteArrayHTMLPrinter()
Method Detail

size

public int size()

writeTo

public int writeTo(OutputStream os)
            throws IOException
Throws:
IOException

getBytes

public byte[] getBytes()

out

public void out(String s)
Description copied from interface: HTMLPrinter
Appends the specified string to the output.

Specified by:
out in interface HTMLPrinter

outln

public void outln(String s)
Description copied from interface: HTMLPrinter
Appends the specified string to the output followed by HTMLString.NEWLINE.

Specified by:
outln in interface HTMLPrinter

SimpleServlets v5.5.0

Copyright © 2001-2007 Programix Incorporated. All rights reserved. SimpleServlets is free and is OSI Certified Open Source Software under the BSD license.