Skip to content

Commit 3819082

Browse files
committed
Added some javadoc for decoders
1 parent 3f7ca6b commit 3819082

3 files changed

Lines changed: 25 additions & 3 deletions

File tree

driver/src/main/com/mongodb/DBDecoder.java

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,35 @@
2222
import 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
*/
2727
public 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
}

driver/src/main/com/mongodb/DefaultDBCallback.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
import java.util.List;
2626

2727
/**
28-
* TODO Documentation.
28+
* An implementation of DBCallback that decodes into a DBObject.
2929
*/
3030
public class DefaultDBCallback extends BasicBSONCallback implements DBCallback {
3131

driver/src/main/com/mongodb/DefaultDBDecoder.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
import java.io.InputStream;
2323

2424
/**
25-
* TODO Documentation
25+
* An implementation of DBDecoder
2626
*/
2727
public class DefaultDBDecoder extends BasicBSONDecoder implements DBDecoder {
2828

0 commit comments

Comments
 (0)