Package org.bson
Class AbstractBsonReader
java.lang.Object
org.bson.AbstractBsonReader
- All Implemented Interfaces:
Closeable
,AutoCloseable
,BsonReader
- Direct Known Subclasses:
BsonBinaryReader
,BsonDocumentReader
,JsonReader
@Deprecated(since="2022-10-31")
public abstract class AbstractBsonReader
extends 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 ClassesModifier and TypeClassDescriptionstatic enum
Deprecated.The state of a reader. -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
Deprecated.Closes the reader.Deprecated.Deprecated.Gets the most recently read name.getState()
Deprecated.int
Deprecated.Peeks the size of the binary data that the reader is positioned at.byte
Deprecated.Peeks the subtype of the binary data that the reader is positioned at.Deprecated.Reads BSON Binary data from the reader.readBinaryData
(String name) Deprecated.Reads a BSON Binary data element from the reader.boolean
Deprecated.Reads a BSON Boolean from the reader.boolean
readBoolean
(String name) Deprecated.Reads a BSON Boolean element from the reader.abstract BsonType
Deprecated.Reads a BSONType from the reader.long
Deprecated.Reads a BSON DateTime from the reader.long
readDateTime
(String name) Deprecated.Reads a BSON DateTime element from the reader.Deprecated.Reads a BSON DBPointer from the reader.readDBPointer
(String name) Deprecated.Reads a BSON DBPointer element from the reader.Deprecated.Reads a BSON Decimal128 from the reader.readDecimal128
(String name) Deprecated.Reads a BSON Decimal128 element from the reader.double
Deprecated.Reads a BSON Double from the reader.double
readDouble
(String name) Deprecated.Reads a BSON Double element from the reader.void
Deprecated.Reads the end of a BSON array from the reader.void
Deprecated.Reads the end of a BSON document from the reader.int
Deprecated.Reads a BSON Int32 from the reader.int
Deprecated.Reads a BSON Int32 element from the reader.long
Deprecated.Reads a BSON Int64 from the reader.long
Deprecated.Reads a BSON Int64 element from the reader.Deprecated.Reads a BSON JavaScript from the reader.readJavaScript
(String name) Deprecated.Reads a BSON JavaScript element from the reader.Deprecated.Reads a BSON JavaScript with scope from the reader (call readStartDocument next to read the scope).Deprecated.Reads a BSON JavaScript with scope element from the reader (call readStartDocument next to read the scope).void
Deprecated.Reads a BSON MaxKey from the reader.void
readMaxKey
(String name) Deprecated.Reads a BSON MaxKey element from the reader.void
Deprecated.Reads a BSON MinKey from the reader.void
readMinKey
(String name) Deprecated.Reads a BSON MinKey element from the reader.readName()
Deprecated.Reads the name of an element from the reader.void
Deprecated.Reads the name of an element from the reader.void
readNull()
Deprecated.Reads a BSON null from the reader.void
Deprecated.Reads a BSON null element from the reader.Deprecated.Reads a BSON ObjectId from the reader.readObjectId
(String name) Deprecated.Reads a BSON ObjectId element from the reader.Deprecated.Reads a BSON regular expression from the reader.readRegularExpression
(String name) Deprecated.Reads a BSON regular expression element from the reader.void
Deprecated.Reads the start of a BSON array.void
Deprecated.Reads the start of a BSON document.Deprecated.Reads a BSON String from the reader.readString
(String name) Deprecated.Reads a BSON string element from the reader.Deprecated.Reads a BSON symbol from the reader.readSymbol
(String name) Deprecated.Reads a BSON symbol element from the reader.Deprecated.Reads a BSON timestamp from the reader.readTimestamp
(String name) Deprecated.Reads a BSON timestamp element from the reader.void
Deprecated.Reads a BSON undefined from the reader.void
readUndefined
(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
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
Methods inherited from interface org.bson.BsonReader
getMark, mark, reset
-
Method Details
-
getCurrentBsonType
Deprecated.- Specified by:
getCurrentBsonType
in interfaceBsonReader
- Returns:
- The current BsonType.
-
getCurrentName
Deprecated.Description copied from interface:BsonReader
Gets the most recently read name.- Specified by:
getCurrentName
in interfaceBsonReader
- Returns:
- the most recently read name
-
getState
Deprecated.- Returns:
- The current state of the reader.
-
close
public void close()Deprecated.Closes the reader.- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceBsonReader
- Specified by:
close
in interfaceCloseable
-
readBinaryData
Deprecated.Description copied from interface:BsonReader
Reads BSON Binary data from the reader.- Specified by:
readBinaryData
in interfaceBsonReader
- 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 interfaceBsonReader
- Returns:
- the subtype
- See Also:
-
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 interfaceBsonReader
- Returns:
- the size of the binary data
- See Also:
-
readBoolean
public boolean readBoolean()Deprecated.Description copied from interface:BsonReader
Reads a BSON Boolean from the reader.- Specified by:
readBoolean
in interfaceBsonReader
- Returns:
- A Boolean.
-
readBsonType
Deprecated.Description copied from interface:BsonReader
Reads a BSONType from the reader.- Specified by:
readBsonType
in interfaceBsonReader
- Returns:
- A BSONType.
-
readDateTime
public long readDateTime()Deprecated.Description copied from interface:BsonReader
Reads a BSON DateTime from the reader.- Specified by:
readDateTime
in interfaceBsonReader
- 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 interfaceBsonReader
- 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 interfaceBsonReader
-
readEndDocument
public void readEndDocument()Deprecated.Description copied from interface:BsonReader
Reads the end of a BSON document from the reader.- Specified by:
readEndDocument
in interfaceBsonReader
-
readInt32
public int readInt32()Deprecated.Description copied from interface:BsonReader
Reads a BSON Int32 from the reader.- Specified by:
readInt32
in interfaceBsonReader
- Returns:
- An Int32.
-
readInt64
public long readInt64()Deprecated.Description copied from interface:BsonReader
Reads a BSON Int64 from the reader.- Specified by:
readInt64
in interfaceBsonReader
- Returns:
- An Int64.
-
readDecimal128
Deprecated.Description copied from interface:BsonReader
Reads a BSON Decimal128 from the reader.- Specified by:
readDecimal128
in interfaceBsonReader
- Returns:
- A Decimal128
-
readJavaScript
Deprecated.Description copied from interface:BsonReader
Reads a BSON JavaScript from the reader.- Specified by:
readJavaScript
in interfaceBsonReader
- Returns:
- A 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 interfaceBsonReader
- Returns:
- A string.
-
readMaxKey
public void readMaxKey()Deprecated.Description copied from interface:BsonReader
Reads a BSON MaxKey from the reader.- Specified by:
readMaxKey
in interfaceBsonReader
-
readMinKey
public void readMinKey()Deprecated.Description copied from interface:BsonReader
Reads a BSON MinKey from the reader.- Specified by:
readMinKey
in interfaceBsonReader
-
readNull
public void readNull()Deprecated.Description copied from interface:BsonReader
Reads a BSON null from the reader.- Specified by:
readNull
in interfaceBsonReader
-
readObjectId
Deprecated.Description copied from interface:BsonReader
Reads a BSON ObjectId from the reader.- Specified by:
readObjectId
in interfaceBsonReader
- Returns:
- the
ObjectId
value
-
readRegularExpression
Deprecated.Description copied from interface:BsonReader
Reads a BSON regular expression from the reader.- Specified by:
readRegularExpression
in interfaceBsonReader
- Returns:
- A regular expression.
-
readDBPointer
Deprecated.Description copied from interface:BsonReader
Reads a BSON DBPointer from the reader.- Specified by:
readDBPointer
in interfaceBsonReader
- Returns:
- A DBPointer.
-
readStartArray
public void readStartArray()Deprecated.Description copied from interface:BsonReader
Reads the start of a BSON array.- Specified by:
readStartArray
in interfaceBsonReader
-
readStartDocument
public void readStartDocument()Deprecated.Description copied from interface:BsonReader
Reads the start of a BSON document.- Specified by:
readStartDocument
in interfaceBsonReader
-
readString
Deprecated.Description copied from interface:BsonReader
Reads a BSON String from the reader.- Specified by:
readString
in interfaceBsonReader
- Returns:
- A String.
-
readSymbol
Deprecated.Description copied from interface:BsonReader
Reads a BSON symbol from the reader.- Specified by:
readSymbol
in interfaceBsonReader
- Returns:
- A string.
-
readTimestamp
Deprecated.Description copied from interface:BsonReader
Reads a BSON timestamp from the reader.- Specified by:
readTimestamp
in interfaceBsonReader
- 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 interfaceBsonReader
-
skipName
public void skipName()Deprecated.Description copied from interface:BsonReader
Skips the name (reader must be positioned on a name).- Specified by:
skipName
in interfaceBsonReader
-
skipValue
public void skipValue()Deprecated.Description copied from interface:BsonReader
Skips the value (reader must be positioned on a value).- Specified by:
skipValue
in interfaceBsonReader
-
readBinaryData
Deprecated.Description copied from interface:BsonReader
Reads a BSON Binary data element from the reader.- Specified by:
readBinaryData
in interfaceBsonReader
- Parameters:
name
- The name of the element.- Returns:
- A Binary.
-
readBoolean
Deprecated.Description copied from interface:BsonReader
Reads a BSON Boolean element from the reader.- Specified by:
readBoolean
in interfaceBsonReader
- Parameters:
name
- The name of the element.- Returns:
- A Boolean.
-
readDateTime
Deprecated.Description copied from interface:BsonReader
Reads a BSON DateTime element from the reader.- Specified by:
readDateTime
in interfaceBsonReader
- Parameters:
name
- The name of the element.- Returns:
- The number of milliseconds since the Unix epoch.
-
readDouble
Deprecated.Description copied from interface:BsonReader
Reads a BSON Double element from the reader.- Specified by:
readDouble
in interfaceBsonReader
- Parameters:
name
- The name of the element.- Returns:
- A Double.
-
readInt32
Deprecated.Description copied from interface:BsonReader
Reads a BSON Int32 element from the reader.- Specified by:
readInt32
in interfaceBsonReader
- Parameters:
name
- The name of the element.- Returns:
- An Int32.
-
readInt64
Deprecated.Description copied from interface:BsonReader
Reads a BSON Int64 element from the reader.- Specified by:
readInt64
in interfaceBsonReader
- Parameters:
name
- The name of the element.- Returns:
- An Int64.
-
readDecimal128
Deprecated.Description copied from interface:BsonReader
Reads a BSON Decimal128 element from the reader.- Specified by:
readDecimal128
in interfaceBsonReader
- Parameters:
name
- The name of the element.- Returns:
- A Decimal128
-
readJavaScript
Deprecated.Description copied from interface:BsonReader
Reads a BSON JavaScript element from the reader.- Specified by:
readJavaScript
in interfaceBsonReader
- Parameters:
name
- The name of the element.- Returns:
- A string.
-
readJavaScriptWithScope
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 interfaceBsonReader
- Parameters:
name
- The name of the element.- Returns:
- A string.
-
readMaxKey
Deprecated.Description copied from interface:BsonReader
Reads a BSON MaxKey element from the reader.- Specified by:
readMaxKey
in interfaceBsonReader
- Parameters:
name
- The name of the element.
-
readMinKey
Deprecated.Description copied from interface:BsonReader
Reads a BSON MinKey element from the reader.- Specified by:
readMinKey
in interfaceBsonReader
- Parameters:
name
- The name of the element.
-
readName
Deprecated.Description copied from interface:BsonReader
Reads the name of an element from the reader.- Specified by:
readName
in interfaceBsonReader
- Returns:
- The name of the element.
-
readName
Deprecated.Description copied from interface:BsonReader
Reads the name of an element from the reader.- Specified by:
readName
in interfaceBsonReader
- Parameters:
name
- The name of the element.
-
readNull
Deprecated.Description copied from interface:BsonReader
Reads a BSON null element from the reader.- Specified by:
readNull
in interfaceBsonReader
- Parameters:
name
- The name of the element.
-
readObjectId
Deprecated.Description copied from interface:BsonReader
Reads a BSON ObjectId element from the reader.- Specified by:
readObjectId
in interfaceBsonReader
- Parameters:
name
- The name of the element.- Returns:
- ObjectId.
-
readRegularExpression
Deprecated.Description copied from interface:BsonReader
Reads a BSON regular expression element from the reader.- Specified by:
readRegularExpression
in interfaceBsonReader
- Parameters:
name
- The name of the element.- Returns:
- A regular expression.
-
readDBPointer
Deprecated.Description copied from interface:BsonReader
Reads a BSON DBPointer element from the reader.- Specified by:
readDBPointer
in interfaceBsonReader
- Parameters:
name
- The name of the element.- Returns:
- A DBPointer.
-
readString
Deprecated.Description copied from interface:BsonReader
Reads a BSON string element from the reader.- Specified by:
readString
in interfaceBsonReader
- Parameters:
name
- The name of the element.- Returns:
- A String.
-
readSymbol
Deprecated.Description copied from interface:BsonReader
Reads a BSON symbol element from the reader.- Specified by:
readSymbol
in interfaceBsonReader
- Parameters:
name
- The name of the element.- Returns:
- A string.
-
readTimestamp
Deprecated.Description copied from interface:BsonReader
Reads a BSON timestamp element from the reader.- Specified by:
readTimestamp
in interfaceBsonReader
- Parameters:
name
- The name of the element.- Returns:
- The combined timestamp/increment.
-
readUndefined
Deprecated.Description copied from interface:BsonReader
Reads a BSON undefined element from the reader.- Specified by:
readUndefined
in interfaceBsonReader
- Parameters:
name
- The name of the element.
-