Class RtfNilOutputStream
- java.lang.Object
-
- java.io.OutputStream
-
- com.lowagie.text.rtf.document.output.RtfNilOutputStream
-
- All Implemented Interfaces:
java.io.Closeable
,java.io.Flushable
,java.lang.AutoCloseable
public final class RtfNilOutputStream extends java.io.OutputStream
The RtfNilOutputStream is a dummy output stream that sends all bytes to the big byte bucket in the sky. It is used to improve speed in those situations where processing is required, but the results are not needed.- Version:
- $Id: RtfNilOutputStream.java 3361 2008-05-11 12:28:57Z hallm $
-
-
Field Summary
Fields Modifier and Type Field Description private long
size
The number of bytes theoretically written is stored.
-
Constructor Summary
Constructors Constructor Description RtfNilOutputStream()
Constructs a newRtfNilOutputStream
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description long
getSize()
Gets the number of bytes that were written.void
write(byte[] b, int off, int len)
Write abyte[]
.void
write(int b)
Write an int.
-
-
-
Method Detail
-
getSize
public long getSize()
Gets the number of bytes that were written.- Returns:
- The number of bytes that were written.
-
write
public void write(int b)
Write an int. The size is incremented, but the actual data is thrown away.- Specified by:
write
in classjava.io.OutputStream
-
write
public void write(byte[] b, int off, int len)
Write abyte[]
. The size is incremented, but the actual data is thrown away.- Overrides:
write
in classjava.io.OutputStream
-
-