Home
last modified time | relevance | path

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

12

/third_party/protobuf/java/core/src/test/java/com/google/protobuf/
DIsValidUtf8TestUtil.java279 assertEquals(isRoundTrippable, Utf8.isValidUtf8(bytes));
280 assertEquals(isRoundTrippable, Utf8.isValidUtf8(bytes, 0, numBytes));
283 assertEquals(s, Utf8.decodeUtf8(bytes, 0, numBytes));
300 int state1 = Utf8.partialIsValidUtf8(Utf8.COMPLETE, bytes, 0, i);
301 int state2 = Utf8.partialIsValidUtf8(state1, bytes, i, j);
302 int state3 = Utf8.partialIsValidUtf8(state2, bytes, j, numBytes);
303 if (isRoundTrippable != (state3 == Utf8.COMPLETE)) {
307 assertEquals(isRoundTrippable, (state3 == Utf8.COMPLETE));
319 assertEquals(state3, x.partialIsValidUtf8(Utf8.COMPLETE, 0, numBytes));
321 assertEquals(state1, x.partialIsValidUtf8(Utf8.COMPLETE, 0, i));
[all …]
DUtf8Test.java43 private static final Utf8.Processor safeProcessor = new Utf8.SafeProcessor();
44 private static final Utf8.Processor unsafeProcessor = new Utf8.UnsafeProcessor();
202 private static byte[] encodeToByteArray(String message, int length, Utf8.Processor processor) { in encodeToByteArray()
209 String message, int length, boolean direct, Utf8.Processor processor) { in encodeToByteBuffer()
DIsValidUtf8Test.java133 assertTrue(not ^ Utf8.isValidUtf8(realBytes)); in assertValidUtf8()
134 assertTrue(not ^ Utf8.isValidUtf8(realBytes, 0, bytes.length)); in assertValidUtf8()
DDecodeUtf8Test.java3 import com.google.protobuf.Utf8.Processor;
4 import com.google.protobuf.Utf8.SafeProcessor;
5 import com.google.protobuf.Utf8.UnsafeProcessor;
DCodedOutputStreamTest.java413 != CodedOutputStream.computeUInt32SizeNoTag(string.length() * Utf8.MAX_BYTES_PER_CHAR));
435 2, CodedOutputStream.computeUInt32SizeNoTag(string.length() * Utf8.MAX_BYTES_PER_CHAR));
436 assertEquals(bufferSize, string.length() * Utf8.MAX_BYTES_PER_CHAR);
/third_party/rust/crates/autocfg/src/
Derror.rs22 ErrorKind::Utf8(ref e) => Some(e), in cause()
33 ErrorKind::Utf8(ref e) => e.fmt(f), in fmt()
43 Utf8(str::Utf8Error), enumerator
61 kind: ErrorKind::Utf8(e), in from_utf8()
/third_party/protobuf/java/core/src/main/java/com/google/protobuf/
DCodedOutputStream.java39 import com.google.protobuf.Utf8.UnpairedSurrogateException;
842 length = Utf8.encodedLength(value); in computeStringSizeNoTag()
1482 final int maxLength = value.length() * Utf8.MAX_BYTES_PER_CHAR; in writeStringNoTag()
1487 int newPosition = Utf8.encode(value, buffer, position, spaceLeft()); in writeStringNoTag()
1495 int length = Utf8.encodedLength(value); in writeStringNoTag()
1497 position = Utf8.encode(value, buffer, position, spaceLeft()); in writeStringNoTag()
1811 final int maxEncodedSize = value.length() * Utf8.MAX_BYTES_PER_CHAR; in writeStringNoTag()
1831 final int length = Utf8.encodedLength(value); in writeStringNoTag()
1865 Utf8.encodeUtf8(value, buffer); in encode()
2167 int maxEncodedSize = value.length() * Utf8.MAX_BYTES_PER_CHAR; in writeStringNoTag()
[all …]
DNioByteString.java179 return Utf8.isValidUtf8(buffer); in isValidUtf8()
184 return Utf8.partialIsValidUtf8(state, buffer, offset, offset + length); in partialIsValidUtf8()
DRopeByteString.java480 int leftPartial = left.partialIsValidUtf8(Utf8.COMPLETE, 0, leftLength); in isValidUtf8()
482 return state == Utf8.COMPLETE; in isValidUtf8()
DArrayDecoders.java210 registers.object1 = Utf8.decodeUtf8(data, position, length); in decodeStringRequireUtf8()
619 if (!Utf8.isValidUtf8(data, position, position + length)) { in decodeStringListRequireUtf8()
638 if (!Utf8.isValidUtf8(data, position, position + nextLength)) { in decodeStringListRequireUtf8()
DByteString.java1406 return Utf8.isValidUtf8(bytes, offset, offset + size()); in isValidUtf8()
1412 return Utf8.partialIsValidUtf8(state, bytes, index, index + length); in partialIsValidUtf8()
DUtf8.java76 final class Utf8 { class
771 int endIndex = Utf8.encode(in, out.array(), offset + out.position(), out.remaining()); in encodeUtf8()
1975 private Utf8() {} in Utf8() method in Utf8
DCodedInputStream.java809 String result = Utf8.decodeUtf8(buffer, pos, size); in readStringRequireUtf8()
1528 String result = Utf8.decodeUtf8(buffer, bufferPos, size); in readStringRequireUtf8()
2298 return Utf8.decodeUtf8(bytes, tempPos, size); in readStringRequireUtf8()
3378 String result = Utf8.decodeUtf8(currentByteBuffer, bufferPos, size); in readStringRequireUtf8()
3385 return Utf8.decodeUtf8(bytes, 0, size); in readStringRequireUtf8()
DInternal.java181 return Utf8.isValidUtf8(byteArray); in isValidUtf8()
DBinaryWriter.java1360 throw new Utf8.UnpairedSurrogateException(i - 1, i); in writeString()
1895 throw new Utf8.UnpairedSurrogateException(i - 1, i); in writeString()
2442 throw new Utf8.UnpairedSurrogateException(i - 1, i); in writeString()
2981 throw new Utf8.UnpairedSurrogateException(i - 1, i); in writeString()
DBinaryReader.java226 if (requireUtf8 && !Utf8.isValidUtf8(buffer, pos, pos + size)) { in readStringInternal()
/third_party/cef/libcef/common/
Dstring_util.cc15 cef_string.FromString(source.Utf8()); in GetCefString()
46 const std::string& string = source.Utf8(); in CreateSharedMemoryRegion()
/third_party/rust/crates/cxx/gen/src/
Derror.rs22 Utf8(PathBuf, Utf8Error), enumerator
31 Error::Utf8(path, _) => write!(f, "Failed to read file `{}`", path.display()), in fmt()
41 Error::Utf8(_, err) => Some(err), in source()
Dmod.rs117 Err(err) => Err(Error::Utf8(path.to_owned(), err.utf8_error())), in read_to_string()
/third_party/cef/libcef/renderer/
Drender_frame_util.cc35 return frame->AssignedName().Utf8(); in GetName()
Ddom_node_impl.cc83 if (base::LowerCaseEqualsASCII(element.AttributeLocalName(i).Utf8(), in IsEditable()
85 if (base::LowerCaseEqualsASCII(element.AttributeValue(i).Utf8(), in IsEditable()
/third_party/cef/libcef/renderer/extensions/
Dextensions_renderer_client.cc106 if (params.mime_type.Utf8() != content::kBrowserPluginMimeType) in OverrideCreatePlugin()
/third_party/protobuf/java/core/
DBUILD89 "src/main/java/com/google/protobuf/Utf8.java",
/third_party/cef/libcef/renderer/alloy/
Dalloy_content_renderer_client.cc382 std::string orig_mime_type = params.mime_type.Utf8(); in OverrideCreatePlugin()
/third_party/protobuf/
DMakefile.am400 java/core/src/main/java/com/google/protobuf/Utf8.java \

12