Package com.mongodb

Class LazyDBDecoder

  • All Implemented Interfaces:
    DBDecoder, org.bson.BSONDecoder


    public class LazyDBDecoder
    extends org.bson.LazyBSONDecoder
    implements DBDecoder
    A decoder for LazyDBObject instances.
    • Constructor Summary

      Constructors 
      Constructor Description
      LazyDBDecoder​()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      com.mongodb.DBObject decode​(byte[] bytes, DBCollection collection)
      Decode a single DBObject belonging to the given collection from the given array of bytes.
      com.mongodb.DBObject decode​(java.io.InputStream input, DBCollection collection)
      Decode a single DBObject belonging to the given collection from the given input stream.
      DBCallback getDBCallback​(DBCollection collection)
      Get a callback for the given collection.
      com.mongodb.DBObject readObject​(java.io.InputStream in)  
      • Methods inherited from interface org.bson.BSONDecoder

        decode, decode, readObject
      • Methods inherited from class org.bson.LazyBSONDecoder

        decode, decode, readObject
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • LazyDBDecoder

        public LazyDBDecoder​()
    • Method Detail

      • getDBCallback

        public DBCallback getDBCallback​(@Nullable
                                        DBCollection collection)
        Description copied from interface: DBDecoder
        Get a callback for the given collection.
        Specified by:
        getDBCallback in interface DBDecoder
        Parameters:
        collection - the collection
        Returns:
        the callback
      • readObject

        public com.mongodb.DBObject readObject​(java.io.InputStream in)
                                        throws java.io.IOException
        Specified by:
        readObject in interface org.bson.BSONDecoder
        Overrides:
        readObject in class org.bson.LazyBSONDecoder
        Throws:
        java.io.IOException
      • decode

        public com.mongodb.DBObject decode​(java.io.InputStream input,
                                           DBCollection collection)
                                    throws java.io.IOException
        Description copied from interface: DBDecoder
        Decode a single DBObject belonging to the given collection from the given input stream.
        Specified by:
        decode in interface DBDecoder
        Parameters:
        input - the input stream
        collection - the collection
        Returns:
        the DBObject
        Throws:
        java.io.IOException - may throw an exception while decoding from the InputStream
      • decode

        public com.mongodb.DBObject decode​(byte[] bytes,
                                           DBCollection collection)
        Description copied from interface: DBDecoder
        Decode a single DBObject belonging to the given collection from the given array of bytes.
        Specified by:
        decode in interface DBDecoder
        Parameters:
        bytes - the byte array
        collection - the collection
        Returns:
        the DBObject