Overview | Package | Class | Tree | Deprecated | Index | Help
| Copyright © 2008 BEA Systems, Inc. All Rights Reserved
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.bea.content.manager
Class CM_InputStream

    java.lang.Object
      java.io.InputStream
          com.bea.content.manager.CM_InputStream

All Implemented Interfaces
  Closeable

    public class CM_InputStream

extends InputStream

Constructor Summary
`CM_InputStream(String propertyName, int nodeId)` Constructs an inputstream for a given property and node.
`CM_InputStream(String dataSourceName, String propertyName, int nodeId)` Constructs an inputstream for a given property and node.
`CM_InputStream(String dataSourceName, String propertyName, Long propertyId, int nodeId)` Constructs an inputstream for a given property and node.

Method Summary
`int` | `available()` Returns the number of bytes that can be read (or skipped over) from this input stream without blocking by the next caller of a method for this input stream.
`void` | `close()` Close input stream, close connection, and end transaction
`long` | `getBlobSize()` Returns the size of the blob if available.
`void` | `mark(int readLimit)` Marks the current position in this input stream.
`boolean` | `markSupported()` Tests if this input stream supports the `mark` and `reset` methods.
`int` | `read()` Reads the next byte of data from the input stream.
`int` | `read(byte[] b)` Reads some number of bytes from the input stream and stores them into the buffer array b.
`int` | `read(byte[] b, int off, int len)` Reads up to len bytes of data from the input stream into an array of bytes.
`void` | `reset()` Repositions this stream to the position at the time the `mark` method was last called on this input stream.
`long` | `skip(long n)` Skips over and discards `n` bytes of data from this input stream.

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

Constructor Detail

### CM_InputStream

    public CM_InputStream(String dataSourceName,
                          String propertyName,
                          int nodeId)

  Constructs an inputstream for a given property and node.

  Parameters
    `dataSourceName` - The name of the datasource which represents the tables where the CM tables exist.
    `propertyName` - The name of the property
    `nodeId` - The node id

### CM_InputStream

    public CM_InputStream(String dataSourceName,
                          String propertyName,
                          Long propertyId,
                          int nodeId)

  Constructs an inputstream for a given property and node.

  Parameters
    `dataSourceName` - The name of the datasource which represents the tables where the CM tables exist.
    `propertyName` - The name of the property
    `propertyId` - The id of the property
    `nodeId` - The node id

### CM_InputStream

    public CM_InputStream(String propertyName,
                          int nodeId)

  Constructs an inputstream for a given property and node. Uses the "contentDataSource".

  Parameters
    `propertyName` - The name of the property
    `nodeId` - The node id

Method Detail

### getBlobSize

    public long getBlobSize()

  Returns the size of the blob if available.

  Returns
    The blob size.

### markSupported

    public boolean markSupported()

  Tests if this input stream supports the `mark` and `reset` methods. Whether or not `mark` and `reset` are supported is an invariant property of a particular input stream instance. The `markSupported` method of `InputStream` returns `false`.

  Overrides:
    `markSupported` in class `InputStream`
  Returns
    `true` if this stream instance supports the mark and reset methods; `false` otherwise.

### mark

    public void mark(int readLimit)

  Marks the current position in this input stream. A subsequent call to the `reset` method repositions this stream at the last marked position so that subsequent reads re-read the same bytes.

  The `readlimit` arguments tells this input stream to allow that many bytes to be read before the mark position gets invalidated.

  The general contract of `mark` is that, if the method `markSupported` returns `true`, the stream somehow remembers all the bytes read after the call to `mark` and stands ready to supply those same bytes again if and whenever the method `reset` is called. However, the stream is not required to remember any data at all if more than `readlimit` bytes are read from the stream before `reset` is called.

  The `mark` method of `InputStream` does nothing.

  Overrides:
    `mark` in class `InputStream`
  Parameters
    `readLimit` - the maximum limit of bytes that can be read before the mark position becomes invalid.

### reset

    public void reset()
               throws IOException

  Repositions this stream to the position at the time the `mark` method was last called on this input stream.

  Overrides:
    `reset` in class `InputStream`
  Throws
    `IOException`

### skip

    public long skip(long n)
              throws IOException

  Skips over and discards `n` bytes of data from this input stream. The `skip` method may, for a variety of reasons, end up skipping over some smaller number of bytes, possibly `0`. This may result from any of a number of conditions; reaching end of file before `n` bytes have been skipped is only one possibility. The actual number of bytes skipped is returned. If `n` is negative, no bytes are skipped.

  Overrides:
    `skip` in class `InputStream`
  Throws
    `IOException`

### available

    public int available()
                  throws IOException

  Returns the number of bytes that can be read (or skipped over) from this input stream without blocking by the next caller of a method for this input stream. Honors the underlying database implementation.

  Overrides:
    `available` in class `InputStream`
  Throws
    `IOException`

### read

    public int read()
             throws IOException

  Reads the next byte of data from the input stream.

  Specified by:
    `read` in class `InputStream`
  Throws
    `IOException`

### read

    public int read(byte[] b)
             throws IOException

  Reads some number of bytes from the input stream and stores them into the buffer array b.

  Overrides:
    `read` in class `InputStream`
  Throws
    `IOException`

### read

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

  Reads up to len bytes of data from the input stream into an array of bytes.

  Overrides:
    `read` in class `InputStream`
  Throws
    `IOException`

### close

    public void close()
               throws IOException

  Close input stream, close connection, and end transaction

  Specified by:
    `close` in interface `Closeable`
  Overrides:
    `close` in class `InputStream`
  Throws
    `IOException`

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

Copyright © 2008 BEA Systems, Inc. All Rights Reserved