File tree Expand file tree Collapse file tree
driver/src/main/com/mongodb Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2222import java .io .InputStream ;
2323
2424/**
25- * TODO Documentation needed .
25+ * An interface for decoders of BSON into instances of DBObject that belong to a DBCollection .
2626 */
2727public interface DBDecoder extends BSONDecoder {
2828
29+ /**
30+ * Get a callback for the given collection.
31+ *
32+ * @param collection the collection
33+ * @return the callback
34+ */
2935 DBCallback getDBCallback (DBCollection collection );
3036
37+ /**
38+ * Decode a single DBObject belonging to the given collectoin from the given input stream.
39+ *
40+ * @param in the input stream
41+ * @param collection the collection
42+ * @return the DBObject
43+ * @throws IOException
44+ */
3145 DBObject decode (InputStream in , DBCollection collection ) throws IOException ;
3246
47+ /**
48+ * Decode a single DBObject belonging to the given collectoin from the given array of bytes.
49+ *
50+ * @param bytes the byte array
51+ * @param collection the collection
52+ * @return the DBObject
53+ * @throws IOException
54+ */
3355 DBObject decode (byte [] bytes , DBCollection collection );
3456}
Original file line number Diff line number Diff line change 2525import java .util .List ;
2626
2727/**
28- * TODO Documentation .
28+ * An implementation of DBCallback that decodes into a DBObject .
2929 */
3030public class DefaultDBCallback extends BasicBSONCallback implements DBCallback {
3131
Original file line number Diff line number Diff line change 2222import java .io .InputStream ;
2323
2424/**
25- * TODO Documentation
25+ * An implementation of DBDecoder
2626 */
2727public class DefaultDBDecoder extends BasicBSONDecoder implements DBDecoder {
2828
You can’t perform that action at this time.
0 commit comments