fr.gedeon.telnetservice.util
Class AbstractPrintStream

java.lang.Object
  extended by java.io.OutputStream
      extended by java.io.FilterOutputStream
          extended by java.io.PrintStream
              extended by fr.gedeon.telnetservice.util.AbstractPrintStream
All Implemented Interfaces:
Closeable, Flushable, Appendable
Direct Known Subclasses:
StringBufferPrintStream, VT100PrintStream

public abstract class AbstractPrintStream
extends PrintStream

Abstracts the minimal implementation methods by extension of PrintStream.
Implementing a customized PrintStream requires the implementation of the following methods:

See Also:
StringBufferPrintStream, VT100PrintStream

Field Summary
 
Fields inherited from class java.io.FilterOutputStream
out
 
Constructor Summary
AbstractPrintStream(File file)
           
AbstractPrintStream(File file, String csn)
           
AbstractPrintStream(OutputStream out)
           
AbstractPrintStream(OutputStream out, boolean autoFlush)
           
AbstractPrintStream(OutputStream out, boolean autoFlush, String encoding)
           
AbstractPrintStream(String fileName)
           
AbstractPrintStream(String fileName, String csn)
           
 
Method Summary
protected  void _write(byte[] buf, int off, int len)
          Use this method to delegate calls to those with similar signature from PrintStream.
protected  void _write(int b)
          Use this method to delegate calls to those with similar signature from PrintStream.
abstract  void write(byte[] buf, int off, int len)
           
abstract  void write(int b)
           
 
Methods inherited from class java.io.PrintStream
append, append, append, checkError, close, flush, format, format, print, print, print, print, print, print, print, print, print, printf, printf, println, println, println, println, println, println, println, println, println, println, setError
 
Methods inherited from class java.io.FilterOutputStream
write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractPrintStream

public AbstractPrintStream(File file,
                           String csn)
                    throws FileNotFoundException,
                           UnsupportedEncodingException
Throws:
FileNotFoundException
UnsupportedEncodingException

AbstractPrintStream

public AbstractPrintStream(File file)
                    throws FileNotFoundException
Throws:
FileNotFoundException

AbstractPrintStream

public AbstractPrintStream(OutputStream out,
                           boolean autoFlush,
                           String encoding)
                    throws UnsupportedEncodingException
Throws:
UnsupportedEncodingException

AbstractPrintStream

public AbstractPrintStream(OutputStream out,
                           boolean autoFlush)

AbstractPrintStream

public AbstractPrintStream(OutputStream out)

AbstractPrintStream

public AbstractPrintStream(String fileName,
                           String csn)
                    throws FileNotFoundException,
                           UnsupportedEncodingException
Throws:
FileNotFoundException
UnsupportedEncodingException

AbstractPrintStream

public AbstractPrintStream(String fileName)
                    throws FileNotFoundException
Throws:
FileNotFoundException
Method Detail

write

public abstract void write(int b)
Overrides:
write in class PrintStream

write

public abstract void write(byte[] buf,
                           int off,
                           int len)
Overrides:
write in class PrintStream

_write

protected void _write(int b)
Use this method to delegate calls to those with similar signature from PrintStream. e.g. in situations where data is gathered on output, or other output is prepended or appended.


_write

protected void _write(byte[] buf,
                      int off,
                      int len)
Use this method to delegate calls to those with similar signature from PrintStream. e.g. in situations where data is gathered on output, or other output is prepended or appended.



Copyright © 2008. All Rights Reserved.