Home
last modified time | relevance | path

Searched refs:byteString (Results 1 – 25 of 33) sorted by relevance

12

/external/okhttp/okio/okio/src/test/java/okio/
DByteStringTest.java39 ByteString byteString = ByteString.of(bytes, 2, 9); in ofCopyRange() local
42 assertEquals("llo, Worl", byteString.utf8()); in ofCopyRange()
46 ByteString byteString = ByteString.decodeHex("ab12"); in getByte() local
47 assertEquals(-85, byteString.getByte(0)); in getByte()
48 assertEquals(18, byteString.getByte(1)); in getByte()
52 ByteString byteString = ByteString.decodeHex("ab12"); in getByteOutOfBounds() local
54 byteString.getByte(2); in getByteOutOfBounds()
61 ByteString byteString = ByteString.decodeHex("000102"); in equals() local
62 assertTrue(byteString.equals(byteString)); in equals()
63 assertTrue(byteString.equals(ByteString.decodeHex("000102"))); in equals()
[all …]
DSegmentSharingTest.java39 ByteString byteString = concatenateBuffers(xs, ys, zs).snapshot(); in snapshotsAreEquivalent() local
40 assertEquivalent(byteString, concatenateBuffers(xs, ys + zs).snapshot()); in snapshotsAreEquivalent()
41 assertEquivalent(byteString, concatenateBuffers(xs + ys + zs).snapshot()); in snapshotsAreEquivalent()
42 assertEquivalent(byteString, ByteString.encodeUtf8(xs + ys + zs)); in snapshotsAreEquivalent()
46 ByteString byteString = concatenateBuffers(xs, ys, zs).snapshot(); in snapshotGetByte() local
47 assertEquals('x', byteString.getByte(0)); in snapshotGetByte()
48 assertEquals('x', byteString.getByte(xs.length() - 1)); in snapshotGetByte()
49 assertEquals('y', byteString.getByte(xs.length())); in snapshotGetByte()
50 assertEquals('y', byteString.getByte(xs.length() + ys.length() - 1)); in snapshotGetByte()
51 assertEquals('z', byteString.getByte(xs.length() + ys.length())); in snapshotGetByte()
[all …]
/external/protobuf/java/core/src/test/java/com/google/protobuf/
DByteStringTest.java100 ByteString byteString = ByteString.copyFrom(bytes, 500, 200); in testCopyFrom_BytesOffsetSize() local
102 isArrayRange(byteString.toByteArray(), bytes, 500, 200)); in testCopyFrom_BytesOffsetSize()
107 ByteString byteString = ByteString.copyFrom(bytes); in testCopyFrom_Bytes() local
109 isArray(byteString.toByteArray(), bytes)); in testCopyFrom_Bytes()
117 ByteString byteString = ByteString.copyFrom(byteBuffer, 200); in testCopyFrom_ByteBufferSize() local
119 isArrayRange(byteString.toByteArray(), bytes, 500, 200)); in testCopyFrom_ByteBufferSize()
127 ByteString byteString = ByteString.copyFrom(byteBuffer); in testCopyFrom_ByteBuffer() local
129 isArrayRange(byteString.toByteArray(), bytes, 500, bytes.length - 500)); in testCopyFrom_ByteBuffer()
134 ByteString byteString = ByteString.copyFrom(testString, UTF_16); in testCopyFrom_StringEncoding() local
137 isArrayRange(byteString.toByteArray(), testBytes, 0, testBytes.length)); in testCopyFrom_StringEncoding()
[all …]
DRopeByteStringTest.java158 ByteString byteString = in testToString_raisesException() local
160 byteString.toString("invalid"); in testToString_raisesException()
167 ByteString byteString = RopeByteString.concatenate(ByteString.copyFromUtf8("foo"), in testToString_raisesException() local
169 byteString.toString("invalid"); in testToString_raisesException()
DAbstractMessageTest.java535 ByteString byteString = ByteString.copyFromUtf8("some text"); in testCheckByteStringIsUtf8OnUtf8() local
536 AbstractMessageLite.checkByteStringIsUtf8(byteString); in testCheckByteStringIsUtf8OnUtf8()
541 ByteString byteString = in testCheckByteStringIsUtf8OnNonUtf8() local
544 AbstractMessageLite.checkByteStringIsUtf8(byteString); in testCheckByteStringIsUtf8OnNonUtf8()
/external/pdfium/fxbarcode/
Dcbc_ean13.cpp42 ByteString byteString = encodeContents.UTF8Encode(); in Preprocess() local
43 int32_t checksum = pWriter->CalcChecksum(byteString); in Preprocess()
44 byteString += checksum - 0 + '0'; in Preprocess()
45 encodeContents = byteString.UTF8Decode(); in Preprocess()
61 ByteString byteString = encodeContents.UTF8Encode(); in Encode() local
65 pWriter->Encode(byteString, format, outWidth, outHeight)); in Encode()
Dcbc_upca.cpp41 ByteString byteString = encodeContents.UTF8Encode(); in Preprocess() local
42 int32_t checksum = pWriter->CalcChecksum(byteString); in Preprocess()
43 byteString += checksum - 0 + '0'; in Preprocess()
44 encodeContents = byteString.UTF8Decode(); in Preprocess()
60 ByteString byteString = encodeContents.UTF8Encode(); in Encode() local
66 pWriter->Encode(byteString, format, outWidth, outHeight)); in Encode()
Dcbc_ean8.cpp41 ByteString byteString = encodeContents.UTF8Encode(); in Preprocess() local
42 int32_t checksum = pWriter->CalcChecksum(byteString); in Preprocess()
59 ByteString byteString = encodeContents.UTF8Encode(); in Encode() local
63 pWriter->Encode(byteString, format, outWidth, outHeight)); in Encode()
Dcbc_code128.cpp52 ByteString byteString = encodeContents.UTF8Encode(); in Encode() local
54 pWriter->Encode(byteString, format, outWidth, outHeight)); in Encode()
Dcbc_code39.cpp45 ByteString byteString = filtercontents.UTF8Encode(); in Encode() local
47 pWriter->Encode(byteString, format, outWidth, outHeight)); in Encode()
Dcbc_codabar.cpp58 ByteString byteString = filtercontents.UTF8Encode(); in Encode() local
62 pWriter->Encode(byteString, format, outWidth, outHeight)); in Encode()
/external/okhttp/okio/okio/src/main/java/okio/
DByteString.java86 ByteString byteString = new ByteString(s.getBytes(Util.UTF_8)); in encodeUtf8() local
87 byteString.utf8 = s; in encodeUtf8()
88 return byteString; in encodeUtf8()
336 @Override public int compareTo(ByteString byteString) { in compareTo() argument
338 int sizeB = byteString.size(); in compareTo()
341 int byteB = byteString.getByte(i) & 0xff; in compareTo()
363 ByteString byteString = ByteString.read(in, dataLength); in readObject() local
367 field.set(this, byteString.data); in readObject()
DRealBufferedSink.java49 @Override public BufferedSink write(ByteString byteString) throws IOException { in write() argument
51 buffer.write(byteString); in write()
DBufferedSink.java30 BufferedSink write(ByteString byteString) throws IOException; in write() argument
/external/okhttp/repackaged/okio/okio/src/main/java/com/android/okhttp/okio/
DByteString.java88 ByteString byteString = new ByteString(s.getBytes(Util.UTF_8)); in encodeUtf8() local
89 byteString.utf8 = s; in encodeUtf8()
90 return byteString; in encodeUtf8()
338 @Override public int compareTo(ByteString byteString) { in compareTo() argument
340 int sizeB = byteString.size(); in compareTo()
343 int byteB = byteString.getByte(i) & 0xff; in compareTo()
365 ByteString byteString = ByteString.read(in, dataLength); in readObject() local
369 field.set(this, byteString.data); in readObject()
DRealBufferedSink.java50 @Override public BufferedSink write(ByteString byteString) throws IOException { in write() argument
52 buffer.write(byteString); in write()
DBufferedSink.java32 BufferedSink write(ByteString byteString) throws IOException; in write() argument
/external/cldr/tools/cldr-unittest/src/org/unicode/cldr/unittest/
DTestStringByteConverter.java123 StringByteConverter byteString = type == Type.utf8 ? new Utf8StringByteConverter() in testString() local
126 int byteLen = byteString.toBytes(test, bytes, 0); in testString()
129 byteString.clear(); in testString()
132 int byteCount = byteString.toBytes(test.charAt(i), bytes2, 0); in testString()
156 byteString.fromBytes(bytes, 0, byteLen, chars); in testString()
/external/conscrypt/openjdk/src/test/java/org/conscrypt/
DSSLUtilsTest.java98 String byteString = Byte.toString(b); in testGetClientKeyType() local
102 assertEquals(byteString, "RSA", keyType); in testGetClientKeyType()
105 assertEquals(byteString, "EC", keyType); in testGetClientKeyType()
108 assertNull(byteString, keyType); in testGetClientKeyType()
/external/conscrypt/repackaged/openjdk/src/test/java/com/android/org/conscrypt/
DSSLUtilsTest.java102 String byteString = Byte.toString(b); in testGetClientKeyType() local
106 assertEquals(byteString, "RSA", keyType); in testGetClientKeyType()
109 assertEquals(byteString, "EC", keyType); in testGetClientKeyType()
112 assertNull(byteString, keyType); in testGetClientKeyType()
/external/cldr/tools/java/org/unicode/cldr/util/
DStateDictionary.java37 private final StringByteConverter byteString; field in StateDictionary
61 this.byteString = byteConverter; in StateDictionary()
280 final private byte[] matchByteBuffer = new byte[byteString
302 byteString.clear(); in setOffset()
329 matchByteBufferLength = byteString.toBytes(ch, matchByteBuffer, 0); in next()
335 matchByteBufferLength = byteString.toBytes(matchByteBuffer, 0); in next()
597 byteString.fromBytes(soFar, 0, len, buffer); in stringFromBytes()
/external/protobuf/java/core/src/main/java/com/google/protobuf/
DRopeByteString.java377 LeafByteString byteString = pieces.next(); in asReadOnlyByteBufferList() local
378 result.add(byteString.asReadOnlyByteBuffer()); in asReadOnlyByteBufferList()
617 private void insert(ByteString byteString) { in insert() argument
618 int depthBin = getDepthBinForLength(byteString.size()); in insert()
626 prefixesStack.push(byteString); in insert()
639 newTree = new RopeByteString(newTree, byteString); in insert()
DAbstractMessageLite.java112 protected static void checkByteStringIsUtf8(ByteString byteString) in checkByteStringIsUtf8() argument
114 if (!byteString.isValidUtf8()) { in checkByteStringIsUtf8()
DInternal.java172 public static boolean isValidUtf8(ByteString byteString) { in isValidUtf8() argument
173 return byteString.isValidUtf8(); in isValidUtf8()
DByteString.java1023 for (ByteString byteString : cachedFlushBuffers) { in writeTo()
1024 byteString.writeTo(out); in writeTo()

12