## com.lowagie.text.rtf.document.output
Class RtfNilOutputStream

    java.lang.Object
      java.io.OutputStream
          com.lowagie.text.rtf.document.output.RtfNilOutputStream

All Implemented Interfaces:
  java.io.Closeable, java.io.Flushable

    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$
Author:
  Thomas Bickel (tmb99@inode.at), Mark Hall (Mark.Hall@mail.room3b.eu)

Field Summary
`private long` `size` The number of bytes theoretically written is stored.

Constructor Summary
`RtfNilOutputStream()` Constructs a new `RtfNilOutputStream`.

Method Summary
`long` `getSize()` Gets the number of bytes that were written.
`void` `write(byte[] b, int off, int len)` Write a `byte[]`.
`void` `write(int b)` Write an int.

Methods inherited from class java.io.OutputStream
`close, flush, write`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### size

    private long size

  The number of bytes theoretically written is stored.

Constructor Detail

### RtfNilOutputStream

    public RtfNilOutputStream()

  Constructs a new `RtfNilOutputStream`.

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 class `java.io.OutputStream`

### write

    public void write(byte[] b,
                      int off,
                      int len)

  Write a `byte[]`. The size is incremented, but the actual data is thrown away.

  Overrides:
    `write` in class `java.io.OutputStream`

Hosted by Hostbasket