Skip to content

Commit eb02f87

Browse files
committed
JAVA-901: add protected getBytes() as a replacement for _input field access
1 parent 5e98c07 commit eb02f87

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

src/main/org/bson/LazyBSONObject.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -672,6 +672,10 @@ protected int getOffset(){
672672
return _doc_start_offset;
673673
}
674674

675+
protected byte[] getBytes() {
676+
return _input.array();
677+
}
678+
675679
@Override
676680
public boolean equals(Object o) {
677681
if (this == o) return true;
@@ -711,7 +715,7 @@ public String toString(){
711715
protected final int _doc_start_offset;
712716

713717
/**
714-
* @deprecated This field is NOT a part of public API and will be dropped in 3.x versions.
718+
* @deprecated Please use {@link #getBytes()} to access underlying bytes.
715719
*/
716720
@Deprecated
717721
protected final BSONByteBuffer _input; // TODO - Guard this with synchronicity?

0 commit comments

Comments
 (0)