Home
last modified time | relevance | path

Searched refs:isValidUtf8 (Results 1 – 21 of 21) sorted by relevance

/external/protobuf/java/core/src/test/java/com/google/protobuf/
DIsValidUtf8Test.java102 assertTrue(asBytes("").isValidUtf8()); in testSomeSequences()
105 assertTrue(asBytes("\u0000abc\u007f").isValidUtf8()); in testSomeSequences()
108 assertTrue(asBytes("\u00a2\u00a2").isValidUtf8()); in testSomeSequences()
111 assertTrue(asBytes("\u020ac\u020ac").isValidUtf8()); in testSomeSequences()
114 assertTrue(asBytes("\u024B62\u024B62").isValidUtf8()); in testSomeSequences()
117 assertTrue(asBytes("a\u020ac\u00a2b\\u024B62u020acc\u00a2de\u024B62").isValidUtf8()); in testSomeSequences()
133 assertTrue(not ^ Utf8.isValidUtf8(realBytes)); in assertValidUtf8()
134 assertTrue(not ^ Utf8.isValidUtf8(realBytes, 0, bytes.length)); in assertValidUtf8()
137 assertTrue(not ^ leaf.isValidUtf8()); in assertValidUtf8()
138 assertTrue(not ^ sub.isValidUtf8()); in assertValidUtf8()
[all …]
DUtf8Test.java102 assertEquals("isValidUtf8[ARRAY]", valid, safeProcessor.isValidUtf8(data, 0, data.length)); in assertIsValid()
104 "isValidUtf8[ARRAY_UNSAFE]", valid, unsafeProcessor.isValidUtf8(data, 0, data.length)); in assertIsValid()
110 safeProcessor.isValidUtf8(buffer, buffer.position(), buffer.remaining())); in assertIsValid()
119 safeProcessor.isValidUtf8(buffer, buffer.position(), buffer.remaining())); in assertIsValid()
123 unsafeProcessor.isValidUtf8(buffer, buffer.position(), buffer.remaining())); in assertIsValid()
DIsValidUtf8TestUtil.java269 boolean isRoundTrippable = bs.isValidUtf8();
279 assertEquals(isRoundTrippable, Utf8.isValidUtf8(bytes));
280 assertEquals(isRoundTrippable, Utf8.isValidUtf8(bytes, 0, numBytes));
318 assertEquals(isRoundTrippable, x.isValidUtf8());
331 assertEquals(isRoundTrippable, ropeADope.isValidUtf8());
398 boolean isRoundTrippable = factory.newByteString(bytes).isValidUtf8();
DDecodeUtf8Test.java33 if (!bs.isValidUtf8()) { in testOneByte()
47 if (!bs.isValidUtf8()) { in testTwoBytes()
67 if (!bs.isValidUtf8()) { in testThreeBytes()
/external/protobuf/java/core/src/main/java/com/google/protobuf/
DInternal.java175 public static boolean isValidUtf8(ByteString byteString) { in isValidUtf8() method in Internal
176 return byteString.isValidUtf8(); in isValidUtf8()
180 public static boolean isValidUtf8(byte[] byteArray) { in isValidUtf8() method in Internal
181 return Utf8.isValidUtf8(byteArray); in isValidUtf8()
DNioByteString.java178 public boolean isValidUtf8() { in isValidUtf8() method in NioByteString
179 return Utf8.isValidUtf8(buffer); in isValidUtf8()
DUtf8.java146 public static boolean isValidUtf8(byte[] bytes) { in isValidUtf8() method in Utf8
147 return processor.isValidUtf8(bytes, 0, bytes.length); in isValidUtf8()
158 public static boolean isValidUtf8(byte[] bytes, int index, int limit) { in isValidUtf8() method in Utf8
159 return processor.isValidUtf8(bytes, index, limit); in isValidUtf8()
306 static boolean isValidUtf8(ByteBuffer buffer) { in isValidUtf8() method in Utf8
307 return processor.isValidUtf8(buffer, buffer.position(), buffer.remaining()); in isValidUtf8()
389 final boolean isValidUtf8(byte[] bytes, int index, int limit) { in isValidUtf8() method in Utf8.Processor
416 final boolean isValidUtf8(ByteBuffer buffer, int index, int limit) { in isValidUtf8() method in Utf8.Processor
DLazyStringArrayList.java118 if (bs.isValidUtf8()) { in get()
125 if (Internal.isValidUtf8(ba)) { in get()
DByteString.java838 public abstract boolean isValidUtf8(); in isValidUtf8() method
1385 public final boolean isValidUtf8() { in isValidUtf8() method in LiteralByteString
1387 return Utf8.isValidUtf8(bytes, offset, offset + size()); in isValidUtf8()
DAbstractMessageLite.java134 if (!byteString.isValidUtf8()) { in checkByteStringIsUtf8()
DArrayDecoders.java619 if (!Utf8.isValidUtf8(data, position, position + length)) { in decodeStringListRequireUtf8()
638 if (!Utf8.isValidUtf8(data, position, position + nextLength)) { in decodeStringListRequireUtf8()
DRopeByteString.java463 public boolean isValidUtf8() { in isValidUtf8() method
DBinaryReader.java226 if (requireUtf8 && !Utf8.isValidUtf8(buffer, pos, pos + size)) { in readStringInternal()
DMessageSchema.java4755 && !Utf8.isValidUtf8(data, position, position + length)) { in parseOneofField()
/external/grpc-grpc-java/services/src/generated/test/java/io/grpc/reflection/testing/
DDynamicReply.java103 if (bs.isValidUtf8()) { in getMessage()
438 if (bs.isValidUtf8()) { in getMessage()
DDynamicRequest.java103 if (bs.isValidUtf8()) { in getMessage()
438 if (bs.isValidUtf8()) { in getMessage()
DReply.java103 if (bs.isValidUtf8()) { in getMessage()
438 if (bs.isValidUtf8()) { in getMessage()
DRequest.java103 if (bs.isValidUtf8()) { in getMessage()
438 if (bs.isValidUtf8()) { in getMessage()
DThirdLevelType.java104 if (bs.isValidUtf8()) { in getMessage()
479 if (bs.isValidUtf8()) { in getMessage()
DTypeWithExtensions.java104 if (bs.isValidUtf8()) { in getMessage()
479 if (bs.isValidUtf8()) { in getMessage()
/external/protobuf/ruby/src/main/java/com/google/protobuf/jruby/
DSentinelOuterClass.java210 if (bs.isValidUtf8()) { in getDefaultString()
538 if (bs.isValidUtf8()) { in getDefaultString()