org.infinispan.schematic.internal.document

## Class BsonReader

- java.lang.Object
- - org.infinispan.schematic.internal.document.BsonReader

-     @ThreadSafe
      public class BsonReader
      extends Object

  A component that reads BSON representations and constructs the in-memory `Document` representation.

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `protected static class` | `BsonReader.Reader`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected static DocumentValueFactory` | `VALUE_FACTORY`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `BsonReader()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `Document` | `read(DataInput input)` Read the binary BSON representation from supplied input stream and construct the `Document` representation.
    `Document` | `read(InputStream stream)` Read the binary BSON representation from supplied input stream and construct the `Document` representation.
    `Array` | `readArray(DataInput input)` Read the binary BSON representation from supplied input stream and construct the `Document` representation.
    `Array` | `readArray(InputStream stream)` Read the binary BSON representation from supplied input stream and construct the `Array` representation.

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

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

- - ### Field Detail

    - #### VALUE_FACTORY

          protected static final DocumentValueFactory VALUE_FACTORY

  - ### Constructor Detail

    - #### BsonReader

          public BsonReader()

  - ### Method Detail

    - #### read

          public Document read(InputStream stream)
                        throws IOException

      Read the binary BSON representation from supplied input stream and construct the `Document` representation.
      Parameters:
        `stream` - the input stream; may not be null
      Returns:
        the in-memory `Document` representation
      Throws:
        `IOException` - if there was a problem reading from the stream

    - #### read

          public Document read(DataInput input)
                        throws IOException

      Read the binary BSON representation from supplied input stream and construct the `Document` representation.
      Parameters:
        `input` - the input stream; may not be null
      Returns:
        the in-memory `Document` representation
      Throws:
        `IOException` - if there was a problem reading from the stream

    - #### readArray

          public Array readArray(InputStream stream)
                          throws IOException

      Read the binary BSON representation from supplied input stream and construct the `Array` representation.
      Parameters:
        `stream` - the input stream; may not be null
      Returns:
        the in-memory `Document` representation
      Throws:
        `IOException` - if there was a problem reading from the stream

    - #### readArray

          public Array readArray(DataInput input)
                          throws IOException

      Read the binary BSON representation from supplied input stream and construct the `Document` representation.
      Parameters:
        `input` - the input stream; may not be null
      Returns:
        the in-memory `Document` representation
      Throws:
        `IOException` - if there was a problem reading from the stream

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