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

## org.modeshape.common.util
Class SizeMeasuringInputStream

    java.lang.Object
      java.io.InputStream
          org.modeshape.common.util.SizeMeasuringInputStream

All Implemented Interfaces:
  Closeable

    public class SizeMeasuringInputStream

extends InputStream

An `InputStream` implementation that can wrap another input stream and determine the number of bytes read.

Constructor Summary
`SizeMeasuringInputStream(InputStream stream, AtomicLong size)`

Method Summary
`int` | `available()`
`void` | `close()`
`void` | `mark(int readlimit)`
`boolean` | `markSupported()`
`int` | `read()`
`int` | `read(byte[] b)`
`int` | `read(byte[] b, int off, int len)`
`void` | `reset()`

Methods inherited from class java.io.InputStream
`skip`

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

Constructor Detail

### SizeMeasuringInputStream

    public SizeMeasuringInputStream(InputStream stream,
                                    AtomicLong size)

Method Detail

### read

    public int read()
             throws IOException

  Specified by:
    `read` in class `InputStream`
  Throws:
    `IOException`
  See Also:
    `InputStream.read()`

### read

    public int read(byte[] b,
                    int off,
                    int len)
             throws IOException

  Overrides:
    `read` in class `InputStream`
  Throws:
    `IOException`
  See Also:
    `InputStream.read(byte[], int, int)`

### read

    public int read(byte[] b)
             throws IOException

  Overrides:
    `read` in class `InputStream`
  Throws:
    `IOException`
  See Also:
    `InputStream.read(byte[])`

### mark

    public void mark(int readlimit)

  Overrides:
    `mark` in class `InputStream`
  See Also:
    `InputStream.mark(int)`

### markSupported

    public boolean markSupported()

  Overrides:
    `markSupported` in class `InputStream`
  See Also:
    `InputStream.markSupported()`

### available

    public int available()
                  throws IOException

  Overrides:
    `available` in class `InputStream`
  Throws:
    `IOException`
  See Also:
    `InputStream.available()`

### reset

    public void reset()
               throws IOException

  Overrides:
    `reset` in class `InputStream`
  Throws:
    `IOException`
  See Also:
    `InputStream.reset()`

### close

    public void close()
               throws IOException

  Specified by:
    `close` in interface `Closeable`
  Overrides:
    `close` in class `InputStream`
  Throws:
    `IOException`
  See Also:
    `InputStream.close()`

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

Copyright © 2008-2011 JBoss, a division of Red Hat. All Rights Reserved.