Package org.bson

Interface BsonReader

  • All Superinterfaces:
    java.lang.AutoCloseable, java.io.Closeable
    All Known Implementing Classes:
    AbstractBsonReader, BsonBinaryReader, BsonDocumentReader, JsonReader

    @Deprecated(since="2022-10-31")
    public interface BsonReader
    extends java.io.Closeable
    Deprecated.
    Usage of this API is not supported in AEM as a Cloud Service.
    An interface for reading a logical BSON document using a pull-oriented API.
    Since:
    3.0
    • Method Summary

      All Methods Instance Methods Abstract Methods Deprecated Methods 
      Modifier and Type Method Description
      void close()
      Deprecated.
       
      BsonType getCurrentBsonType()
      Deprecated.
       
      java.lang.String getCurrentName()
      Deprecated.
      Gets the most recently read name.
      BsonReaderMark getMark()
      Deprecated.
      Gets a mark representing the current state of the reader.
      void mark()
      Deprecated.
      Use getMark() instead
      int peekBinarySize()
      Deprecated.
      Peeks the size of the binary data that the reader is positioned at.
      byte peekBinarySubType()
      Deprecated.
      Peeks the subtype of the binary data that the reader is positioned at.
      BsonBinary readBinaryData()
      Deprecated.
      Reads BSON Binary data from the reader.
      BsonBinary readBinaryData​(java.lang.String name)
      Deprecated.
      Reads a BSON Binary data element from the reader.
      boolean readBoolean()
      Deprecated.
      Reads a BSON Boolean from the reader.
      boolean readBoolean​(java.lang.String name)
      Deprecated.
      Reads a BSON Boolean element from the reader.
      BsonType readBsonType()
      Deprecated.
      Reads a BSONType from the reader.
      long readDateTime()
      Deprecated.
      Reads a BSON DateTime from the reader.
      long readDateTime​(java.lang.String name)
      Deprecated.
      Reads a BSON DateTime element from the reader.
      BsonDbPointer readDBPointer()
      Deprecated.
      Reads a BSON DBPointer from the reader.
      BsonDbPointer readDBPointer​(java.lang.String name)
      Deprecated.
      Reads a BSON DBPointer element from the reader.
      Decimal128 readDecimal128()
      Deprecated.
      Reads a BSON Decimal128 from the reader.
      Decimal128 readDecimal128​(java.lang.String name)
      Deprecated.
      Reads a BSON Decimal128 element from the reader.
      double readDouble()
      Deprecated.
      Reads a BSON Double from the reader.
      double readDouble​(java.lang.String name)
      Deprecated.
      Reads a BSON Double element from the reader.
      void readEndArray()
      Deprecated.
      Reads the end of a BSON array from the reader.
      void readEndDocument()
      Deprecated.
      Reads the end of a BSON document from the reader.
      int readInt32()
      Deprecated.
      Reads a BSON Int32 from the reader.
      int readInt32​(java.lang.String name)
      Deprecated.
      Reads a BSON Int32 element from the reader.
      long readInt64()
      Deprecated.
      Reads a BSON Int64 from the reader.
      long readInt64​(java.lang.String name)
      Deprecated.
      Reads a BSON Int64 element from the reader.
      java.lang.String readJavaScript()
      Deprecated.
      Reads a BSON JavaScript from the reader.
      java.lang.String readJavaScript​(java.lang.String name)
      Deprecated.
      Reads a BSON JavaScript element from the reader.
      java.lang.String readJavaScriptWithScope()
      Deprecated.
      Reads a BSON JavaScript with scope from the reader (call readStartDocument next to read the scope).
      java.lang.String readJavaScriptWithScope​(java.lang.String name)
      Deprecated.
      Reads a BSON JavaScript with scope element from the reader (call readStartDocument next to read the scope).
      void readMaxKey()
      Deprecated.
      Reads a BSON MaxKey from the reader.
      void readMaxKey​(java.lang.String name)
      Deprecated.
      Reads a BSON MaxKey element from the reader.
      void readMinKey()
      Deprecated.
      Reads a BSON MinKey from the reader.
      void readMinKey​(java.lang.String name)
      Deprecated.
      Reads a BSON MinKey element from the reader.
      java.lang.String readName()
      Deprecated.
      Reads the name of an element from the reader.
      void readName​(java.lang.String name)
      Deprecated.
      Reads the name of an element from the reader.
      void readNull()
      Deprecated.
      Reads a BSON null from the reader.
      void readNull​(java.lang.String name)
      Deprecated.
      Reads a BSON null element from the reader.
      ObjectId readObjectId()
      Deprecated.
      Reads a BSON ObjectId from the reader.
      ObjectId readObjectId​(java.lang.String name)
      Deprecated.
      Reads a BSON ObjectId element from the reader.
      BsonRegularExpression readRegularExpression()
      Deprecated.
      Reads a BSON regular expression from the reader.
      BsonRegularExpression readRegularExpression​(java.lang.String name)
      Deprecated.
      Reads a BSON regular expression element from the reader.
      void readStartArray()
      Deprecated.
      Reads the start of a BSON array.
      void readStartDocument()
      Deprecated.
      Reads the start of a BSON document.
      java.lang.String readString()
      Deprecated.
      Reads a BSON String from the reader.
      java.lang.String readString​(java.lang.String name)
      Deprecated.
      Reads a BSON string element from the reader.
      java.lang.String readSymbol()
      Deprecated.
      Reads a BSON symbol from the reader.
      java.lang.String readSymbol​(java.lang.String name)
      Deprecated.
      Reads a BSON symbol element from the reader.
      BsonTimestamp readTimestamp()
      Deprecated.
      Reads a BSON timestamp from the reader.
      BsonTimestamp readTimestamp​(java.lang.String name)
      Deprecated.
      Reads a BSON timestamp element from the reader.
      void readUndefined()
      Deprecated.
      Reads a BSON undefined from the reader.
      void readUndefined​(java.lang.String name)
      Deprecated.
      Reads a BSON undefined element from the reader.
      void reset()
      Deprecated.
      Prefer getMark()
      void skipName()
      Deprecated.
      Skips the name (reader must be positioned on a name).
      void skipValue()
      Deprecated.
      Skips the value (reader must be positioned on a value).
    • Method Detail

      • getCurrentBsonType

        BsonType getCurrentBsonType()
        Deprecated.
        Returns:
        The current BsonType.
      • getCurrentName

        java.lang.String getCurrentName()
        Deprecated.
        Gets the most recently read name.
        Returns:
        the most recently read name
      • readBinaryData

        BsonBinary readBinaryData()
        Deprecated.
        Reads BSON Binary data from the reader.
        Returns:
        A Binary.
      • peekBinarySubType

        byte peekBinarySubType()
        Deprecated.
        Peeks the subtype of the binary data that the reader is positioned at. This operation is not permitted if the mark is already set.
        Returns:
        the subtype
        See Also:
        mark()
      • peekBinarySize

        int peekBinarySize()
        Deprecated.
        Peeks the size of the binary data that the reader is positioned at. This operation is not permitted if the mark is already set.
        Returns:
        the size of the binary data
        Since:
        3.4
        See Also:
        mark()
      • readBinaryData

        BsonBinary readBinaryData​(java.lang.String name)
        Deprecated.
        Reads a BSON Binary data element from the reader.
        Parameters:
        name - The name of the element.
        Returns:
        A Binary.
      • readBoolean

        boolean readBoolean()
        Deprecated.
        Reads a BSON Boolean from the reader.
        Returns:
        A Boolean.
      • readBoolean

        boolean readBoolean​(java.lang.String name)
        Deprecated.
        Reads a BSON Boolean element from the reader.
        Parameters:
        name - The name of the element.
        Returns:
        A Boolean.
      • readBsonType

        BsonType readBsonType()
        Deprecated.
        Reads a BSONType from the reader.
        Returns:
        A BSONType.
      • readDateTime

        long readDateTime()
        Deprecated.
        Reads a BSON DateTime from the reader.
        Returns:
        The number of milliseconds since the Unix epoch.
      • readDateTime

        long readDateTime​(java.lang.String name)
        Deprecated.
        Reads a BSON DateTime element from the reader.
        Parameters:
        name - The name of the element.
        Returns:
        The number of milliseconds since the Unix epoch.
      • readDouble

        double readDouble()
        Deprecated.
        Reads a BSON Double from the reader.
        Returns:
        A Double.
      • readDouble

        double readDouble​(java.lang.String name)
        Deprecated.
        Reads a BSON Double element from the reader.
        Parameters:
        name - The name of the element.
        Returns:
        A Double.
      • readEndArray

        void readEndArray()
        Deprecated.
        Reads the end of a BSON array from the reader.
      • readEndDocument

        void readEndDocument()
        Deprecated.
        Reads the end of a BSON document from the reader.
      • readInt32

        int readInt32()
        Deprecated.
        Reads a BSON Int32 from the reader.
        Returns:
        An Int32.
      • readInt32

        int readInt32​(java.lang.String name)
        Deprecated.
        Reads a BSON Int32 element from the reader.
        Parameters:
        name - The name of the element.
        Returns:
        An Int32.
      • readInt64

        long readInt64()
        Deprecated.
        Reads a BSON Int64 from the reader.
        Returns:
        An Int64.
      • readInt64

        long readInt64​(java.lang.String name)
        Deprecated.
        Reads a BSON Int64 element from the reader.
        Parameters:
        name - The name of the element.
        Returns:
        An Int64.
      • readDecimal128

        Decimal128 readDecimal128()
        Deprecated.
        Reads a BSON Decimal128 from the reader.
        Returns:
        A Decimal128
        Since:
        3.4
      • readDecimal128

        Decimal128 readDecimal128​(java.lang.String name)
        Deprecated.
        Reads a BSON Decimal128 element from the reader.
        Parameters:
        name - The name of the element.
        Returns:
        A Decimal128
        Since:
        3.4
      • readJavaScript

        java.lang.String readJavaScript()
        Deprecated.
        Reads a BSON JavaScript from the reader.
        Returns:
        A string.
      • readJavaScript

        java.lang.String readJavaScript​(java.lang.String name)
        Deprecated.
        Reads a BSON JavaScript element from the reader.
        Parameters:
        name - The name of the element.
        Returns:
        A string.
      • readJavaScriptWithScope

        java.lang.String readJavaScriptWithScope()
        Deprecated.
        Reads a BSON JavaScript with scope from the reader (call readStartDocument next to read the scope).
        Returns:
        A string.
      • readJavaScriptWithScope

        java.lang.String readJavaScriptWithScope​(java.lang.String name)
        Deprecated.
        Reads a BSON JavaScript with scope element from the reader (call readStartDocument next to read the scope).
        Parameters:
        name - The name of the element.
        Returns:
        A string.
      • readMaxKey

        void readMaxKey()
        Deprecated.
        Reads a BSON MaxKey from the reader.
      • readMaxKey

        void readMaxKey​(java.lang.String name)
        Deprecated.
        Reads a BSON MaxKey element from the reader.
        Parameters:
        name - The name of the element.
      • readMinKey

        void readMinKey()
        Deprecated.
        Reads a BSON MinKey from the reader.
      • readMinKey

        void readMinKey​(java.lang.String name)
        Deprecated.
        Reads a BSON MinKey element from the reader.
        Parameters:
        name - The name of the element.
      • readName

        java.lang.String readName()
        Deprecated.
        Reads the name of an element from the reader.
        Returns:
        The name of the element.
      • readName

        void readName​(java.lang.String name)
        Deprecated.
        Reads the name of an element from the reader.
        Parameters:
        name - The name of the element.
      • readNull

        void readNull()
        Deprecated.
        Reads a BSON null from the reader.
      • readNull

        void readNull​(java.lang.String name)
        Deprecated.
        Reads a BSON null element from the reader.
        Parameters:
        name - The name of the element.
      • readObjectId

        ObjectId readObjectId()
        Deprecated.
        Reads a BSON ObjectId from the reader.
        Returns:
        the ObjectId value
      • readObjectId

        ObjectId readObjectId​(java.lang.String name)
        Deprecated.
        Reads a BSON ObjectId element from the reader.
        Parameters:
        name - The name of the element.
        Returns:
        ObjectId.
      • readRegularExpression

        BsonRegularExpression readRegularExpression()
        Deprecated.
        Reads a BSON regular expression from the reader.
        Returns:
        A regular expression.
      • readRegularExpression

        BsonRegularExpression readRegularExpression​(java.lang.String name)
        Deprecated.
        Reads a BSON regular expression element from the reader.
        Parameters:
        name - The name of the element.
        Returns:
        A regular expression.
      • readDBPointer

        BsonDbPointer readDBPointer()
        Deprecated.
        Reads a BSON DBPointer from the reader.
        Returns:
        A DBPointer.
      • readDBPointer

        BsonDbPointer readDBPointer​(java.lang.String name)
        Deprecated.
        Reads a BSON DBPointer element from the reader.
        Parameters:
        name - The name of the element.
        Returns:
        A DBPointer.
      • readStartArray

        void readStartArray()
        Deprecated.
        Reads the start of a BSON array.
      • readStartDocument

        void readStartDocument()
        Deprecated.
        Reads the start of a BSON document.
      • readString

        java.lang.String readString()
        Deprecated.
        Reads a BSON String from the reader.
        Returns:
        A String.
      • readString

        java.lang.String readString​(java.lang.String name)
        Deprecated.
        Reads a BSON string element from the reader.
        Parameters:
        name - The name of the element.
        Returns:
        A String.
      • readSymbol

        java.lang.String readSymbol()
        Deprecated.
        Reads a BSON symbol from the reader.
        Returns:
        A string.
      • readSymbol

        java.lang.String readSymbol​(java.lang.String name)
        Deprecated.
        Reads a BSON symbol element from the reader.
        Parameters:
        name - The name of the element.
        Returns:
        A string.
      • readTimestamp

        BsonTimestamp readTimestamp()
        Deprecated.
        Reads a BSON timestamp from the reader.
        Returns:
        The combined timestamp/increment.
      • readTimestamp

        BsonTimestamp readTimestamp​(java.lang.String name)
        Deprecated.
        Reads a BSON timestamp element from the reader.
        Parameters:
        name - The name of the element.
        Returns:
        The combined timestamp/increment.
      • readUndefined

        void readUndefined()
        Deprecated.
        Reads a BSON undefined from the reader.
      • readUndefined

        void readUndefined​(java.lang.String name)
        Deprecated.
        Reads a BSON undefined element from the reader.
        Parameters:
        name - The name of the element.
      • skipName

        void skipName()
        Deprecated.
        Skips the name (reader must be positioned on a name).
      • skipValue

        void skipValue()
        Deprecated.
        Skips the value (reader must be positioned on a value).
      • mark

        @Deprecated
        void mark()
        Deprecated.
        Use getMark() instead
        Creates a bookmark in the BsonReader's input The previous mark must be cleared before creating a new one
      • getMark

        BsonReaderMark getMark()
        Deprecated.
        Gets a mark representing the current state of the reader.
        Returns:
        the mark
        Since:
        3.5
      • reset

        @Deprecated
        void reset()
        Deprecated.
        Prefer getMark()
        Go back to the state at the last mark and removes the mark
        Throws:
        BSONException - if no mark has been set
      • close

        void close()
        Deprecated.
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface java.io.Closeable