com.amazon.redshift.util

## Class StreamWrapper

- java.lang.Object
- - com.amazon.redshift.util.StreamWrapper

    public class StreamWrapper
    extends Object

Wrapper around a length-limited InputStream.

Author:
  Oliver Jowett (oliver@opencloud.com)

### Constructor Summary

Constructors
Constructor and Description
`StreamWrapper(byte[] data, int offset, int length)`
`StreamWrapper(InputStream stream)`
`StreamWrapper(InputStream stream, int length)`

### Method Summary

All Methods Instance Methods Concrete Methods
`byte[]` `getBytes()`
`int` `getLength()`
`int` `getOffset()`
`InputStream` `getStream()`
`String` `toString()`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

### Constructor Detail

#### StreamWrapper

    public StreamWrapper(byte[] data,
                         int offset,
                         int length)

#### StreamWrapper

    public StreamWrapper(InputStream stream,
                         int length)

#### StreamWrapper

    public StreamWrapper(InputStream stream)
                  throws RedshiftException

Throws:
  `RedshiftException`

### Method Detail

#### getStream

    public InputStream getStream()

#### getLength

    public int getLength()

#### getOffset

    public int getOffset()

#### getBytes

    public byte[] getBytes()

#### toString

    public String toString()

Overrides:
  `toString` in class `Object`