Package org.bson

Class AbstractBsonReader

  • All Implemented Interfaces:
    java.io.Closeable, java.lang.AutoCloseable, BsonReader
    Direct Known Subclasses:
    BsonBinaryReader, BsonDocumentReader, JsonReader

    @Deprecated(since="2022-10-31")
    public abstract class AbstractBsonReader
    extends java.lang.Object
    implements BsonReader
    Deprecated.
    Usage of this API is not supported in AEM as a Cloud Service.
    Abstract base class for BsonReader implementations.
    Since:
    3.0
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  AbstractBsonReader.State
      Deprecated.
      The state of a reader.
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      void close()
      Deprecated.
      Closes the reader.
      BsonType getCurrentBsonType()
      Deprecated.
       
      java.lang.String getCurrentName()
      Deprecated.
      Gets the most recently read name.
      AbstractBsonReader.State getState()
      Deprecated.
       
      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.
      abstract 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 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).
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • getCurrentName

        public java.lang.String getCurrentName()
        Deprecated.
        Description copied from interface: BsonReader
        Gets the most recently read name.
        Specified by:
        getCurrentName in interface BsonReader
        Returns:
        the most recently read name
      • close

        public void close()
        Deprecated.
        Closes the reader.
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface BsonReader
        Specified by:
        close in interface java.io.Closeable
      • readBinaryData

        public BsonBinary readBinaryData()
        Deprecated.
        Description copied from interface: BsonReader
        Reads BSON Binary data from the reader.
        Specified by:
        readBinaryData in interface BsonReader
        Returns:
        A Binary.
      • peekBinarySubType

        public byte peekBinarySubType()
        Deprecated.
        Description copied from interface: BsonReader
        Peeks the subtype of the binary data that the reader is positioned at. This operation is not permitted if the mark is already set.
        Specified by:
        peekBinarySubType in interface BsonReader
        Returns:
        the subtype
        See Also:
        BsonReader.mark()
      • peekBinarySize

        public int peekBinarySize()
        Deprecated.
        Description copied from interface: BsonReader
        Peeks the size of the binary data that the reader is positioned at. This operation is not permitted if the mark is already set.
        Specified by:
        peekBinarySize in interface BsonReader
        Returns:
        the size of the binary data
        See Also:
        BsonReader.mark()
      • readBoolean

        public boolean readBoolean()
        Deprecated.
        Description copied from interface: BsonReader
        Reads a BSON Boolean from the reader.
        Specified by:
        readBoolean in interface BsonReader
        Returns:
        A Boolean.
      • readBsonType

        public abstract BsonType readBsonType()
        Deprecated.
        Description copied from interface: BsonReader
        Reads a BSONType from the reader.
        Specified by:
        readBsonType in interface BsonReader
        Returns:
        A BSONType.
      • readDateTime

        public long readDateTime()
        Deprecated.
        Description copied from interface: BsonReader
        Reads a BSON DateTime from the reader.
        Specified by:
        readDateTime in interface BsonReader
        Returns:
        The number of milliseconds since the Unix epoch.
      • readDouble

        public double readDouble()
        Deprecated.
        Description copied from interface: BsonReader
        Reads a BSON Double from the reader.
        Specified by:
        readDouble in interface BsonReader
        Returns:
        A Double.
      • readEndArray

        public void readEndArray()
        Deprecated.
        Description copied from interface: BsonReader
        Reads the end of a BSON array from the reader.
        Specified by:
        readEndArray in interface BsonReader
      • readEndDocument

        public void readEndDocument()
        Deprecated.
        Description copied from interface: BsonReader
        Reads the end of a BSON document from the reader.
        Specified by:
        readEndDocument in interface BsonReader
      • readInt32

        public int readInt32()
        Deprecated.
        Description copied from interface: BsonReader
        Reads a BSON Int32 from the reader.
        Specified by:
        readInt32 in interface BsonReader
        Returns:
        An Int32.
      • readInt64

        public long readInt64()
        Deprecated.
        Description copied from interface: BsonReader
        Reads a BSON Int64 from the reader.
        Specified by:
        readInt64 in interface BsonReader
        Returns:
        An Int64.
      • readDecimal128

        public Decimal128 readDecimal128()
        Deprecated.
        Description copied from interface: BsonReader
        Reads a BSON Decimal128 from the reader.
        Specified by:
        readDecimal128 in interface BsonReader
        Returns:
        A Decimal128
      • readJavaScript

        public java.lang.String readJavaScript()
        Deprecated.
        Description copied from interface: BsonReader
        Reads a BSON JavaScript from the reader.
        Specified by:
        readJavaScript in interface BsonReader
        Returns:
        A string.
      • readJavaScriptWithScope

        public java.lang.String readJavaScriptWithScope()
        Deprecated.
        Description copied from interface: BsonReader
        Reads a BSON JavaScript with scope from the reader (call readStartDocument next to read the scope).
        Specified by:
        readJavaScriptWithScope in interface BsonReader
        Returns:
        A string.
      • readMaxKey

        public void readMaxKey()
        Deprecated.
        Description copied from interface: BsonReader
        Reads a BSON MaxKey from the reader.
        Specified by:
        readMaxKey in interface BsonReader
      • readMinKey

        public void readMinKey()
        Deprecated.
        Description copied from interface: BsonReader
        Reads a BSON MinKey from the reader.
        Specified by:
        readMinKey in interface BsonReader
      • readNull

        public void readNull()
        Deprecated.
        Description copied from interface: BsonReader
        Reads a BSON null from the reader.
        Specified by:
        readNull in interface BsonReader
      • readObjectId

        public ObjectId readObjectId()
        Deprecated.
        Description copied from interface: BsonReader
        Reads a BSON ObjectId from the reader.
        Specified by:
        readObjectId in interface BsonReader
        Returns:
        the ObjectId value
      • readStartArray

        public void readStartArray()
        Deprecated.
        Description copied from interface: BsonReader
        Reads the start of a BSON array.
        Specified by:
        readStartArray in interface BsonReader
      • readStartDocument

        public void readStartDocument()
        Deprecated.
        Description copied from interface: BsonReader
        Reads the start of a BSON document.
        Specified by:
        readStartDocument in interface BsonReader
      • readString

        public java.lang.String readString()
        Deprecated.
        Description copied from interface: BsonReader
        Reads a BSON String from the reader.
        Specified by:
        readString in interface BsonReader
        Returns:
        A String.
      • readSymbol

        public java.lang.String readSymbol()
        Deprecated.
        Description copied from interface: BsonReader
        Reads a BSON symbol from the reader.
        Specified by:
        readSymbol in interface BsonReader
        Returns:
        A string.
      • readTimestamp

        public BsonTimestamp readTimestamp()
        Deprecated.
        Description copied from interface: BsonReader
        Reads a BSON timestamp from the reader.
        Specified by:
        readTimestamp in interface BsonReader
        Returns:
        The combined timestamp/increment.
      • readUndefined

        public void readUndefined()
        Deprecated.
        Description copied from interface: BsonReader
        Reads a BSON undefined from the reader.
        Specified by:
        readUndefined in interface BsonReader
      • skipName

        public void skipName()
        Deprecated.
        Description copied from interface: BsonReader
        Skips the name (reader must be positioned on a name).
        Specified by:
        skipName in interface BsonReader
      • skipValue

        public void skipValue()
        Deprecated.
        Description copied from interface: BsonReader
        Skips the value (reader must be positioned on a value).
        Specified by:
        skipValue in interface BsonReader
      • readBinaryData

        public BsonBinary readBinaryData​(java.lang.String name)
        Deprecated.
        Description copied from interface: BsonReader
        Reads a BSON Binary data element from the reader.
        Specified by:
        readBinaryData in interface BsonReader
        Parameters:
        name - The name of the element.
        Returns:
        A Binary.
      • readBoolean

        public boolean readBoolean​(java.lang.String name)
        Deprecated.
        Description copied from interface: BsonReader
        Reads a BSON Boolean element from the reader.
        Specified by:
        readBoolean in interface BsonReader
        Parameters:
        name - The name of the element.
        Returns:
        A Boolean.
      • readDateTime

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

        public double readDouble​(java.lang.String name)
        Deprecated.
        Description copied from interface: BsonReader
        Reads a BSON Double element from the reader.
        Specified by:
        readDouble in interface BsonReader
        Parameters:
        name - The name of the element.
        Returns:
        A Double.
      • readInt32

        public int readInt32​(java.lang.String name)
        Deprecated.
        Description copied from interface: BsonReader
        Reads a BSON Int32 element from the reader.
        Specified by:
        readInt32 in interface BsonReader
        Parameters:
        name - The name of the element.
        Returns:
        An Int32.
      • readInt64

        public long readInt64​(java.lang.String name)
        Deprecated.
        Description copied from interface: BsonReader
        Reads a BSON Int64 element from the reader.
        Specified by:
        readInt64 in interface BsonReader
        Parameters:
        name - The name of the element.
        Returns:
        An Int64.
      • readDecimal128

        public Decimal128 readDecimal128​(java.lang.String name)
        Deprecated.
        Description copied from interface: BsonReader
        Reads a BSON Decimal128 element from the reader.
        Specified by:
        readDecimal128 in interface BsonReader
        Parameters:
        name - The name of the element.
        Returns:
        A Decimal128
      • readJavaScript

        public java.lang.String readJavaScript​(java.lang.String name)
        Deprecated.
        Description copied from interface: BsonReader
        Reads a BSON JavaScript element from the reader.
        Specified by:
        readJavaScript in interface BsonReader
        Parameters:
        name - The name of the element.
        Returns:
        A string.
      • readJavaScriptWithScope

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

        public void readMaxKey​(java.lang.String name)
        Deprecated.
        Description copied from interface: BsonReader
        Reads a BSON MaxKey element from the reader.
        Specified by:
        readMaxKey in interface BsonReader
        Parameters:
        name - The name of the element.
      • readMinKey

        public void readMinKey​(java.lang.String name)
        Deprecated.
        Description copied from interface: BsonReader
        Reads a BSON MinKey element from the reader.
        Specified by:
        readMinKey in interface BsonReader
        Parameters:
        name - The name of the element.
      • readName

        public java.lang.String readName()
        Deprecated.
        Description copied from interface: BsonReader
        Reads the name of an element from the reader.
        Specified by:
        readName in interface BsonReader
        Returns:
        The name of the element.
      • readName

        public void readName​(java.lang.String name)
        Deprecated.
        Description copied from interface: BsonReader
        Reads the name of an element from the reader.
        Specified by:
        readName in interface BsonReader
        Parameters:
        name - The name of the element.
      • readNull

        public void readNull​(java.lang.String name)
        Deprecated.
        Description copied from interface: BsonReader
        Reads a BSON null element from the reader.
        Specified by:
        readNull in interface BsonReader
        Parameters:
        name - The name of the element.
      • readObjectId

        public ObjectId readObjectId​(java.lang.String name)
        Deprecated.
        Description copied from interface: BsonReader
        Reads a BSON ObjectId element from the reader.
        Specified by:
        readObjectId in interface BsonReader
        Parameters:
        name - The name of the element.
        Returns:
        ObjectId.
      • readRegularExpression

        public BsonRegularExpression readRegularExpression​(java.lang.String name)
        Deprecated.
        Description copied from interface: BsonReader
        Reads a BSON regular expression element from the reader.
        Specified by:
        readRegularExpression in interface BsonReader
        Parameters:
        name - The name of the element.
        Returns:
        A regular expression.
      • readDBPointer

        public BsonDbPointer readDBPointer​(java.lang.String name)
        Deprecated.
        Description copied from interface: BsonReader
        Reads a BSON DBPointer element from the reader.
        Specified by:
        readDBPointer in interface BsonReader
        Parameters:
        name - The name of the element.
        Returns:
        A DBPointer.
      • readString

        public java.lang.String readString​(java.lang.String name)
        Deprecated.
        Description copied from interface: BsonReader
        Reads a BSON string element from the reader.
        Specified by:
        readString in interface BsonReader
        Parameters:
        name - The name of the element.
        Returns:
        A String.
      • readSymbol

        public java.lang.String readSymbol​(java.lang.String name)
        Deprecated.
        Description copied from interface: BsonReader
        Reads a BSON symbol element from the reader.
        Specified by:
        readSymbol in interface BsonReader
        Parameters:
        name - The name of the element.
        Returns:
        A string.
      • readTimestamp

        public BsonTimestamp readTimestamp​(java.lang.String name)
        Deprecated.
        Description copied from interface: BsonReader
        Reads a BSON timestamp element from the reader.
        Specified by:
        readTimestamp in interface BsonReader
        Parameters:
        name - The name of the element.
        Returns:
        The combined timestamp/increment.
      • readUndefined

        public void readUndefined​(java.lang.String name)
        Deprecated.
        Description copied from interface: BsonReader
        Reads a BSON undefined element from the reader.
        Specified by:
        readUndefined in interface BsonReader
        Parameters:
        name - The name of the element.