Permalink
Browse files

Added braces

  • Loading branch information...
1 parent 648c21a commit 4ee2f8254e026cb21d9904c6a5c4cdd744ad5d77 @sjoerdmulder sjoerdmulder committed Feb 15, 2013
Showing with 20 additions and 10 deletions.
  1. +20 −10 src/main/org/bson/types/Binary.java
@@ -27,51 +27,61 @@
import java.util.Arrays;
/**
- generic binary holder
+ * generic binary holder
*/
public class Binary implements Serializable {
private static final long serialVersionUID = 7902997490338209467L;
/**
* Creates a Binary object with the default binary type of 0
+ *
* @param data raw data
*/
- public Binary( byte[] data ){
+ public Binary(byte[] data) {
this(BSON.B_GENERAL, data);
}
/**
* Creates a Binary object
+ *
* @param type type of the field as encoded in BSON
* @param data raw data
*/
- public Binary( byte type , byte[] data ){
+ public Binary(byte type, byte[] data) {
_type = type;
_data = data;
}
- public byte getType(){
+ public byte getType() {
return _type;
}
- public byte[] getData(){
+ public byte[] getData() {
return _data;
}
- public int length(){
+ public int length() {
return _data.length;
}
@Override
public boolean equals(Object o) {
- if (this == o) return true;
- if (!(o instanceof Binary)) return false;
+ if (this == o) {
+ return true;
+ }
+ if (!(o instanceof Binary)) {
+ return false;
+ }
Binary binary = (Binary) o;
- if (_type != binary._type) return false;
- if (!Arrays.equals(_data, binary._data)) return false;
+ if (_type != binary._type) {
+ return false;
+ }
+ if (!Arrays.equals(_data, binary._data)) {
+ return false;
+ }
return true;
}

0 comments on commit 4ee2f82

Please sign in to comment.