Skip to content

Commit 8e9ffd9

Browse files
committed
JAVA-329: made default Binary constructor use type 0
1 parent 6ed192d commit 8e9ffd9

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

src/main/org/bson/types/Binary.java

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,19 @@
2626
*/
2727
public class Binary {
2828

29+
/**
30+
* Creates a Binary object with the default binary type of 0
31+
* @param data raw data
32+
*/
33+
public Binary( byte[] data ){
34+
this((byte)0, data);
35+
}
36+
37+
/**
38+
* Creates a Binary object
39+
* @param type type of the field as encoded in BSON
40+
* @param data raw data
41+
*/
2942
public Binary( byte type , byte[] data ){
3043
_type = type;
3144
_data = data;

0 commit comments

Comments
 (0)