Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## rabbit.io
Class MaxSizeOutputStream

    java.lang.Object
      java.io.OutputStream
          rabbit.io.MaxSizeOutputStream

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

    public class MaxSizeOutputStream

extends java.io.OutputStream

A class that doesnt create outputstreams of more than a specified amount of data, the rest is simply swallowed

Constructor Summary
`MaxSizeOutputStream(java.io.OutputStream os, long l)` Creates a new MaxSizeOutputStream with a given limit and connects it to a given stream.

Method Summary
`void` | `close()` Close this stream.
`void` | `flush()` Write any pending data.
`void` | `write(byte[] b)` Write a byte array to this stream.
`void` | `write(byte[] b, int off, int len)` Write a byte array to this stream.
`void` | `write(int b)` Write a byte to this stream.

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

Constructor Detail

### MaxSizeOutputStream

    public MaxSizeOutputStream(java.io.OutputStream os,
                               long l)

  Creates a new MaxSizeOutputStream with a given limit and connects it to a given stream.

Method Detail

### write

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

  Write a byte to this stream.

  Specified by:
    `write` in class `java.io.OutputStream`
  Parameters:
    `b` - the byte to write.
  Throws:
    `java.io.IOException` - if the underlying stream does.

### write

    public void write(byte[] b)
               throws java.io.IOException

  Write a byte array to this stream.

  Overrides:
    `write` in class `java.io.OutputStream`
  Parameters:
    `b` - the byte array to write.
  Throws:
    `java.io.IOException` - if the underlying stream does.

### write

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

  Write a byte array to this stream.

  Overrides:
    `write` in class `java.io.OutputStream`
  Parameters:
    `b` - the byte to write.
    `off` - the starting offset.
    `len` - the number of bytes to write.
  Throws:
    `java.io.IOException` - if the underlying stream does.

### flush

    public void flush()
               throws java.io.IOException

  Write any pending data.

  Specified by:
    `flush` in interface `java.io.Flushable`
  Overrides:
    `flush` in class `java.io.OutputStream`
  Throws:
    `java.io.IOException` - if the underlying stream does.

### close

    public void close()
               throws java.io.IOException

  Close this stream.

  Specified by:
    `close` in interface `java.io.Closeable`
  Overrides:
    `close` in class `java.io.OutputStream`
  Throws:
    `java.io.IOException` - if the underlying stream does.

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD