All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class Acme.APrintStream

java.lang.Object
   |
   +----java.io.OutputStream
           |
           +----java.io.FilterOutputStream
                   |
                   +----java.io.PrintStream
                           |
                           +----Acme.APrintStream

public class APrintStream
extends PrintStream
More efficient PrintStream.

This class reimplements two methods from PrintStream, resulting in vastly improved performance.

The two reimplemented methods are:

In the standard PrintStream, these are implemented by writing each character with a separate call to write(int b). All we do here is make a single write(byte[] b, int off, int len) call instead, avoiding all that routine-call overhead for each character.

The API is identical to java.io.PrintStream.

Fetch the software.
Fetch the entire Acme package.


Constructor Index

 o APrintStream(OutputStream)
 o APrintStream(OutputStream, boolean)

Method Index

 o print(char[])
 o print(String)

Constructors

 o APrintStream
 public APrintStream(OutputStream out)
 o APrintStream
 public APrintStream(OutputStream out,
                     boolean autoflush)

Methods

 o print
 public void print(String s)
Overrides:
print in class PrintStream
 o print
 public void print(char c[])
Overrides:
print in class PrintStream

All Packages  Class Hierarchy  This Package  Previous  Next  Index

ACME Java  ACME Labs