SK.gnome.dwarf.mail.utils
Class TopOutputStream

java.lang.Object
  extended byjava.io.OutputStream
      extended byjava.io.FilterOutputStream
          extended bySK.gnome.dwarf.mail.utils.TopOutputStream

public class TopOutputStream
extends java.io.FilterOutputStream

Prints out only the limited number of lines after the first empty line occured.

The filtered data must use the CRLF sequence as line separator.


Field Summary
 
Fields inherited from class java.io.FilterOutputStream
out
 
Constructor Summary
TopOutputStream(java.io.OutputStream out, int limit)
          Creates a new TopOutputStream.
 
Method Summary
 void write(byte[] b, int off, int len)
           
 void write(int b)
           
 
Methods inherited from class java.io.FilterOutputStream
close, flush, write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TopOutputStream

public TopOutputStream(java.io.OutputStream out,
                       int limit)
Creates a new TopOutputStream.

Parameters:
out - the filtered output stream
limit - the line number limit
Method Detail

write

public void write(int b)
           throws java.io.IOException
Throws:
java.io.IOException

write

public void write(byte[] b,
                  int off,
                  int len)
           throws java.io.IOException
Throws:
java.io.IOException


Copyright (c) 2004-2005, Gnome Ltd. All rights reserved.