Package com.mongodb

Class LazyDBDecoder

java.lang.Object
org.bson.LazyBSONDecoder
com.mongodb.LazyDBDecoder
All Implemented Interfaces:
DBDecoder, BSONDecoder

public class LazyDBDecoder extends LazyBSONDecoder implements DBDecoder
A decoder for LazyDBObject instances.
  • Field Details

    • FACTORY

      public static final DBDecoderFactory FACTORY
      The DBDecoderFactory for LazyDBDecoder instances.
  • Constructor Details

    • LazyDBDecoder

      public LazyDBDecoder()
  • Method Details

    • 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(InputStream in) throws IOException
      Specified by:
      readObject in interface BSONDecoder
      Overrides:
      readObject in class LazyBSONDecoder
      Throws:
      IOException
    • decode

      public com.mongodb.DBObject decode(InputStream input, DBCollection collection) throws 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:
      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