Package com.mongodb

Class DefaultDBDecoder

java.lang.Object
org.bson.BasicBSONDecoder
com.mongodb.DefaultDBDecoder
All Implemented Interfaces:
DBDecoder, org.bson.BSONDecoder

public class DefaultDBDecoder extends org.bson.BasicBSONDecoder implements DBDecoder
An implementation of DBDecoder
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final DBDecoderFactory
    The DBDecoderFactory for DefaultDBDecoder instances.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    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(InputStream input, DBCollection collection)
    Decode a single DBObject belonging to the given collection from the given input stream.
    Get a callback for the given collection.
     

    Methods inherited from class org.bson.BasicBSONDecoder

    decode, decode, getDefaultUuidRepresentation, readObject, readObject, setDefaultUuidRepresentation

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    Methods inherited from interface org.bson.BSONDecoder

    decode, decode, readObject, readObject
  • Field Details

    • FACTORY

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

    • DefaultDBDecoder

      public DefaultDBDecoder()
  • Method Details

    • getDBCallback

      public DBCallback getDBCallback(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
    • 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
    • toString

      public String toString()
      Overrides:
      toString in class Object