All Packages Class Hierarchy This Package Previous Next Index
Class gnu.inet.tftp.LineBufferedOutputStream
java.lang.Object
|
+----java.io.OutputStream
|
+----java.io.FilterOutputStream
|
+----gnu.inet.tftp.LineBufferedOutputStream
- public class LineBufferedOutputStream
- extends FilterOutputStream
LineBufferedOutputStream
A class to buffer output to a stream based on lines and a fixed buffer.
This class is based on code written by the GNU Classpath project. It is
taken from BufferedOutputStream.java by Aaron M. Renn (arenn@urbanophile.com)
as part of the java.io package and it is licensed under GPL.
Note: There is no reason it has be in this namespace but it is for
convience.
- Version:
- 0.1
- Author:
- Mark Benvenuto
-
buf
-
-
count
-
-
LineBufferedOutputStream(OutputStream)
- Create a new LineBufferedOutputStream
-
LineBufferedOutputStream(OutputStream, int)
- Create a new LineBufferedOutputStream
-
flush()
- Flushes the buffer line by line
and then does a complete flush for the remaining data
-
write(byte[], int, int)
- Writes bytes buf to the internal buffer and flushes it if
it is too big
-
write(int)
- Writes byte b to the internal buffer and flushes it if
it is too big
buf
protected byte buf[]
count
protected int count
LineBufferedOutputStream
public LineBufferedOutputStream(OutputStream out)
- Create a new LineBufferedOutputStream
- Parameters:
- out - OutputStream to buffer
LineBufferedOutputStream
public LineBufferedOutputStream(OutputStream out,
int size)
- Create a new LineBufferedOutputStream
- Parameters:
- out - OutputStream to buffer
- size - Size of internal buffer to hold data
flush
public synchronized void flush() throws IOException
- Flushes the buffer line by line
and then does a complete flush for the remaining data
- Overrides:
- flush in class FilterOutputStream
write
public synchronized void write(int b) throws IOException
- Writes byte b to the internal buffer and flushes it if
it is too big
- Parameters:
- b - a byte to write
- Overrides:
- write in class FilterOutputStream
write
public synchronized void write(byte buf[],
int offset,
int len) throws IOException
- Writes bytes buf to the internal buffer and flushes it if
it is too big
- Parameters:
- buf - bytes to write
- offset - from where to start write
- len - length of byte to write
- Overrides:
- write in class FilterOutputStream
All Packages Class Hierarchy This Package Previous Next Index