We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 681a437 commit 9311359Copy full SHA for 9311359
bson/src/main/org/bson/io/OutputBuffer.java
@@ -197,6 +197,14 @@ public void writeLong(final long value) {
197
writeInt64(value);
198
}
199
200
+ /**
201
+ * Writes the characters of a string to the buffer as UTF-8 bytes.
202
+ *
203
+ * @param str the string to write.
204
+ * @param checkForNullCharacters if true, check for and disallow null characters in the string.
205
+ * @return the total number of bytes written.
206
+ * @throws BsonSerializationException if checkForNullCharacters is true and the string contains a null character.
207
+ */
208
protected int writeCharacters(final String str, final boolean checkForNullCharacters) {
209
int len = str.length();
210
int total = 0;
0 commit comments