com.informix.jdbc

## Class IfxLobInputStream

- java.lang.Object
- - java.io.InputStream
  - - com.informix.jdbc.IfxLobInputStream

All Implemented Interfaces:
  java.io.Closeable, java.lang.AutoCloseable

    public class IfxLobInputStream
    extends java.io.InputStream

JDBC 2.0 A IfxInputStream is a subclass of InputStream.

### Constructor Summary

Constructors
Constructor and Description
`IfxLobInputStream(IfxConnection connection, IfxLocator loPtr)` Constructor Construct an IfxLobInputStream instance
`IfxLobInputStream(IfxConnection connection, IfxLocator loPtr, long size)`

### Method Summary

Methods
`int` `available()` Returns the number of bytes that can be read from this file input stream without blocking.
`void` `close()` Closes this input stream and releases any system resources associated with the stream.
`protected java.io.InputStream` `getStream()`
`boolean` `markSupported()` Tests if this Input Stream supports the mark method.
`int` `read()` Reads a byte of data from this input stream.
`int` `read(byte[] b)` Reads upto b.length bytes of data from this input Stream into an array of bytes.
`int` `read(byte[] b, int off, int len)` Reads upto len bytes of data from this input Stream into an array of bytes.
`void` `reset()` Reset the Large object current reading point to the begining
`long` `skip(long n)` Skips over and discards n bytes of data from the input stream.

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

`mark`

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

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

### Constructor Detail

#### IfxLobInputStream

    public IfxLobInputStream(IfxConnection connection,
                     IfxLocator loPtr)
                      throws java.sql.SQLException,
                             java.io.IOException

Constructor Construct an IfxLobInputStream instance

Parameters:
  `IfxConnection` -
  `IfxLocator` -
Throws:
  `java.sql.SQLException` - If object instance cannot be instantiated
  `java.io.IOException`

#### IfxLobInputStream

    public IfxLobInputStream(IfxConnection connection,
                     IfxLocator loPtr,
                     long size)
                      throws java.sql.SQLException,
                             java.io.IOException

Throws:
  `java.sql.SQLException`
  `java.io.IOException`

### Method Detail

#### read

    public int read()
             throws java.io.IOException

Reads a byte of data from this input stream.

Specified by:
  `read` in class `java.io.InputStream`
Returns:
  the next byte of data, or -1 if the end of the lob is reached.
Throws:
  `java.io.IOException` - if an I/O error occurs.

#### read

    public int read(byte[] b)
             throws java.io.IOException

Reads upto b.length bytes of data from this input Stream into an array of bytes. This method blocks until some input is available.

Overrides:
  `read` in class `java.io.InputStream`
Parameters:
  `b` - the buffer into which the data is read.
Returns:
  the total number of bytes read into the buffer, or -1, if there is no more data because the end of lob has been reached.
Throws:
  `java.io.IOException` - If an I/O error has occurred.

#### read

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

Reads upto len bytes of data from this input Stream into an array of bytes. This method blocks until some input is available.

Overrides:
  `read` in class `java.io.InputStream`
Parameters:
  `b` - the buffer into which the data is read.
  `off` - the start offset of the data - the offset into b at which we should start writing.
  `len` - the maximum number of bytes read.
Returns:
  the total number of bytes read into the buffer, or -1, if there is no more data because the end of lob has been reached.
Throws:
  `java.io.IOException` - If an I/O error has occurred.

#### skip

    public long skip(long n)
              throws java.io.IOException

Skips over and discards n bytes of data from the input stream. The skip method may, for a variety of reasons, end up skipping over some smaller number of bytes, possibly 0. The actual number of bytes skipped is returned.

Overrides:
  `skip` in class `java.io.InputStream`
Parameters:
  `n` - the number of bytes to be skipped.
Returns:
  the actual number of bytes skipped.
Throws:
  `java.io.IOException` - if an I/O error occurs.

#### reset

    public void reset()
               throws java.io.IOException

Reset the Large object current reading point to the begining

Overrides:
  `reset` in class `java.io.InputStream`
Throws:
  `java.io.IOException` - if an I/O error occurs.

#### markSupported

    public boolean markSupported()

Tests if this Input Stream supports the mark method.

Overrides:
  `markSupported` in class `java.io.InputStream`
Returns:
  false. Note : This Input Stream however supports reset.

#### available

    public int available()
                  throws java.io.IOException

Returns the number of bytes that can be read from this file input stream without blocking.

Overrides:
  `available` in class `java.io.InputStream`
Returns:
  the number of bytes that can be read from this file input stream without blocking.
Throws:
  `java.io.IOException` - if an I/O error occurs.

#### close

    public void close()
               throws java.io.IOException

Closes this input stream and releases any system resources associated with the 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.

#### getStream

    protected java.io.InputStream getStream()
                                     throws java.sql.SQLException

Throws:
  `java.sql.SQLException`