BlobBuffer.BlobInputStream (jTDS API)
Date: 2013-06-08

net.sourceforge.jtds.util

## Class BlobBuffer.BlobInputStream

- java.lang.Object
- - java.io.InputStream
  - - net.sourceforge.jtds.util.BlobBuffer.BlobInputStream

- All Implemented Interfaces:
    java.io.Closeable, java.lang.AutoCloseable
  Enclosing class:
    BlobBuffer

      private class BlobBuffer.BlobInputStream
      extends java.io.InputStream

  An `InputStream` over the BLOB buffer.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `private boolean` | `open`
    `private int` | `readPtr`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `BlobBuffer.BlobInputStream(long pos)` Costructs an `InputStream` object over the BLOB buffer.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `available()` Returns the number of bytes available to read.
    `void` | `close()` Closes the output stream.
    `protected void` | `finalize()` Ensures underlying BLOB file can be closed even if user does not close this stream.
    `int` | `read()` Reads the next byte from the stream.
    `int` | `read(byte[] bytes, int offset, int len)` Reads a bytes from the stream.

    - ### Methods inherited from class java.io.InputStream

      `mark, markSupported, read, reset, skip`

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

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

- - ### Field Detail

    - #### readPtr

          private int readPtr

    - #### open

          private boolean open

  - ### Constructor Detail

    - #### BlobBuffer.BlobInputStream

          public BlobBuffer.BlobInputStream(long pos)
                                     throws java.io.IOException

      Costructs an `InputStream` object over the BLOB buffer.
      Parameters:
        `pos` - the starting position (from 0)
      Throws:
        `java.io.IOException` - if an I/O error occurs

  - ### Method Detail

    - #### finalize

          protected void finalize()
                           throws java.lang.Throwable

      Ensures underlying BLOB file can be closed even if user does not close this stream.
      Overrides:
        `finalize` in class `java.lang.Object`
      Throws:
        `java.lang.Throwable`

    - #### available

          public int available()
                        throws java.io.IOException

      Returns the number of bytes available to read.
      Overrides:
        `available` in class `java.io.InputStream`
      Throws:
        `java.io.IOException` - if an I/O error occurs

    - #### read

          public int read()
                   throws java.io.IOException

      Reads the next byte from the stream.
      Specified by:
        `read` in class `java.io.InputStream`
      Returns:
        the next byte as an `int` or -1 if at EOF
      Throws:
        `java.io.IOException` - if an I/O error occurs

    - #### read

          public int read(byte[] bytes,
                 int offset,
                 int len)
                   throws java.io.IOException

      Reads a bytes from the stream.
      Overrides:
        `read` in class `java.io.InputStream`
      Parameters:
        `bytes` - the byte array to fill
        `offset` - the start position in the byte array
        `len` - the number of bytes to read
      Returns:
        the number of bytes read or -1 if at end of file
      Throws:
        `java.io.IOException` - if an I/O error occurs

    - #### close

          public void close()
                     throws java.io.IOException

      Closes the output stream.
      Specified by:
        `close` in interface `java.io.Closeable`
      Specified by:
        `close` in interface `java.lang.AutoCloseable`
      Overrides:
        `close` in class `java.io.InputStream`
      Throws:
        `java.io.IOException` - if an I/O error occurs

Generated on June 8 2013