Home
last modified time | relevance | path

Searched refs:Utf8 (Results 1 – 11 of 11) sorted by relevance

/frameworks/opt/gamesdk/third_party/protobuf-3.0.0/java/core/src/test/java/com/google/protobuf/
DIsValidUtf8TestUtil.java273 assertEquals(isRoundTrippable, Utf8.isValidUtf8(bytes));
274 assertEquals(isRoundTrippable, Utf8.isValidUtf8(bytes, 0, numBytes));
285 int state1 = Utf8.partialIsValidUtf8(Utf8.COMPLETE, bytes, 0, i);
286 int state2 = Utf8.partialIsValidUtf8(state1, bytes, i, j);
287 int state3 = Utf8.partialIsValidUtf8(state2, bytes, j, numBytes);
288 if (isRoundTrippable != (state3 == Utf8.COMPLETE)) {
292 assertEquals(isRoundTrippable, (state3 == Utf8.COMPLETE));
303 assertEquals(state3, x.partialIsValidUtf8(Utf8.COMPLETE, 0, numBytes));
305 assertEquals(state1, x.partialIsValidUtf8(Utf8.COMPLETE, 0, i));
306 assertEquals(state1, x.substring(0, i).partialIsValidUtf8(Utf8.COMPLETE, 0, i));
DIsValidUtf8Test.java145 assertTrue(not ^ Utf8.isValidUtf8(realBytes)); in assertValidUtf8()
146 assertTrue(not ^ Utf8.isValidUtf8(realBytes, 0, bytes.length)); in assertValidUtf8()
DCodedOutputStreamTest.java389 != CodedOutputStream.computeUInt32SizeNoTag(string.length() * Utf8.MAX_BYTES_PER_CHAR));
410 2, CodedOutputStream.computeUInt32SizeNoTag(string.length() * Utf8.MAX_BYTES_PER_CHAR));
411 assertEquals(bufferSize, string.length() * Utf8.MAX_BYTES_PER_CHAR);
/frameworks/opt/gamesdk/third_party/protobuf-3.0.0/java/core/src/main/java/com/google/protobuf/
DCodedOutputStream.java35 import com.google.protobuf.Utf8.UnpairedSurrogateException;
856 length = Utf8.encodedLength(value); in computeStringSizeNoTag()
1441 final int maxLength = value.length() * Utf8.MAX_BYTES_PER_CHAR; in writeStringNoTag()
1446 int newPosition = Utf8.encode(value, buffer, position, spaceLeft()); in writeStringNoTag()
1454 int length = Utf8.encodedLength(value); in writeStringNoTag()
1456 position = Utf8.encode(value, buffer, position, spaceLeft()); in writeStringNoTag()
1756 final int maxEncodedSize = value.length() * Utf8.MAX_BYTES_PER_CHAR; in writeStringNoTag()
1776 final int length = Utf8.encodedLength(value); in writeStringNoTag()
1810 Utf8.encodeUtf8(value, buffer); in encode()
2176 final int maxLength = value.length() * Utf8.MAX_BYTES_PER_CHAR; in writeStringNoTag()
[all …]
DNioByteString.java177 return Utf8.isValidUtf8(buffer); in isValidUtf8()
182 return Utf8.partialIsValidUtf8(state, buffer, offset, offset + length); in partialIsValidUtf8()
DRopeByteString.java419 int leftPartial = left.partialIsValidUtf8(Utf8.COMPLETE, 0, leftLength); in isValidUtf8()
421 return state == Utf8.COMPLETE; in isValidUtf8()
DUtf8.java79 final class Utf8 { class
666 Utf8.encode(in, out.array(), offset + out.position(), out.remaining()); in encodeUtf8()
1572 private Utf8() {} in Utf8() method in Utf8
DByteString.java1337 return Utf8.isValidUtf8(bytes, offset, offset + size()); in isValidUtf8()
1343 return Utf8.partialIsValidUtf8(state, bytes, index, index + length); in partialIsValidUtf8()
DInternal.java180 return Utf8.isValidUtf8(byteArray); in isValidUtf8()
DCodedInputStream.java411 if (!Utf8.isValidUtf8(bytes, pos, pos + size)) { in readStringRequireUtf8()
/frameworks/opt/gamesdk/third_party/protobuf-3.0.0/
DMakefile.am266 java/core/src/main/java/com/google/protobuf/Utf8.java \