Home
last modified time | relevance | path

Searched refs:byteString (Results 1 – 25 of 34) 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/compatibility_tests/v2.5.0/tests/src/main/java/com/google/protobuf/test/
DByteStringTest.java99 ByteString byteString = ByteString.copyFrom(bytes, 500, 200); in testCopyFrom_BytesOffsetSize() local
101 isArrayRange(byteString.toByteArray(), bytes, 500, 200)); in testCopyFrom_BytesOffsetSize()
106 ByteString byteString = ByteString.copyFrom(bytes); in testCopyFrom_Bytes() local
108 isArray(byteString.toByteArray(), bytes)); in testCopyFrom_Bytes()
116 ByteString byteString = ByteString.copyFrom(byteBuffer, 200); in testCopyFrom_ByteBufferSize() local
118 isArrayRange(byteString.toByteArray(), bytes, 500, 200)); in testCopyFrom_ByteBufferSize()
126 ByteString byteString = ByteString.copyFrom(byteBuffer); in testCopyFrom_ByteBuffer() local
128 isArrayRange(byteString.toByteArray(), bytes, 500, bytes.length - 500)); in testCopyFrom_ByteBuffer()
133 ByteString byteString = ByteString.copyFrom(testString, UTF_16); in testCopyFrom_StringEncoding() local
136 isArrayRange(byteString.toByteArray(), testBytes, 0, testBytes.length)); in testCopyFrom_StringEncoding()
[all …]
/external/cbor-java/src/test/java/co/nstant/in/cbor/model/
DByteStringTest.java29 ByteString byteString = new ByteString(bytes); in shouldEquals() local
30 assertTrue(byteString.equals(byteString)); in shouldEquals()
36 ByteString byteString = new ByteString(bytes); in shouldNotEquals() local
37 assertFalse(byteString.equals(new Object())); in shouldNotEquals()
44 ByteString byteString = new ByteString(bytes); in shouldHashcode() local
45 assertEquals(byteString.hashCode(), superClass.hashCode() ^ Arrays.hashCode(bytes)); in shouldHashcode()
51 ByteString byteString = new ByteString(bytes); in shouldNotClone() local
52 assertEquals(byteString.getBytes(), bytes); in shouldNotClone()
DAbstractByteStringTest.java40 ByteString byteString = (ByteString) dataItem; in shouldDecode() local
41 Assert.assertArrayEquals(value, byteString.getBytes()); in shouldDecode()
/external/protobuf/java/core/src/test/java/com/google/protobuf/
DByteStringTest.java134 ByteString byteString = ByteString.copyFrom(bytes, 500, 200); in testCopyFrom_BytesOffsetSize() local
137 isArrayRange(byteString.toByteArray(), bytes, 500, 200)); in testCopyFrom_BytesOffsetSize()
142 ByteString byteString = ByteString.copyFrom(bytes); in testCopyFrom_Bytes() local
144 "copyFrom must contain the expected bytes", isArray(byteString.toByteArray(), bytes)); in testCopyFrom_Bytes()
152 ByteString byteString = ByteString.copyFrom(byteBuffer, 200); in testCopyFrom_ByteBufferSize() local
155 isArrayRange(byteString.toByteArray(), bytes, 500, 200)); in testCopyFrom_ByteBufferSize()
163 ByteString byteString = ByteString.copyFrom(byteBuffer); in testCopyFrom_ByteBuffer() local
166 isArrayRange(byteString.toByteArray(), bytes, 500, bytes.length - 500)); in testCopyFrom_ByteBuffer()
171 ByteString byteString = ByteString.copyFrom(testString, UTF_16); in testCopyFrom_StringEncoding() local
175 isArrayRange(byteString.toByteArray(), testBytes, 0, testBytes.length)); in testCopyFrom_StringEncoding()
[all …]
DRopeByteStringTest.java186 ByteString byteString = RopeByteString.newInstanceForTest(ByteString.EMPTY, ByteString.EMPTY); in testToString_raisesException() local
187 byteString.toString("invalid"); in testToString_raisesException()
194 ByteString byteString = in testToString_raisesException() local
197 byteString.toString("invalid"); in testToString_raisesException()
DAbstractMessageTest.java539 ByteString byteString = ByteString.copyFromUtf8("some text"); in testCheckByteStringIsUtf8OnUtf8() local
540 AbstractMessageLite.checkByteStringIsUtf8(byteString); in testCheckByteStringIsUtf8OnUtf8()
545 ByteString byteString = in testCheckByteStringIsUtf8OnNonUtf8() local
548 AbstractMessageLite.checkByteStringIsUtf8(byteString); in testCheckByteStringIsUtf8OnNonUtf8()
/external/cbor-java/src/main/java/co/nstant/in/cbor/decoder/
DByteStringDecoder.java26 ByteString byteString = new ByteString(null); in decode() local
27 byteString.setChunked(true); in decode()
28 return byteString; in decode()
46 ByteString byteString = (ByteString) dataItem; in decodeInfinitiveLength() local
47 byte[] byteArray = byteString.getBytes(); in decodeInfinitiveLength()
/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/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()
/external/cbor-java/src/main/java/co/nstant/in/cbor/encoder/
DByteStringEncoder.java18 public void encode(ByteString byteString) throws CborException { in encode() argument
19 byte[] bytes = byteString.getBytes(); in encode()
20 if (byteString.isChunked()) { in encode()
/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/pdfium/fxbarcode/
Dcbc_codabar.cpp43 ByteString byteString = m_renderContents.ToUTF8(); in Encode() local
46 pWriter->Encode(byteString, format, outWidth, outHeight)); in Encode()
Dcbc_code39.cpp45 ByteString byteString = filtercontents.ToUTF8(); in Encode() local
47 pWriter->Encode(byteString, format, outWidth, outHeight)); in Encode()
Dcbc_code128.cpp48 ByteString byteString = m_renderContents.ToUTF8(); in Encode() local
50 pWriter->Encode(byteString, format, outWidth, outHeight)); in Encode()
/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/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/cbor-java/src/test/java/co/nstant/in/cbor/examples/
DExample14Test.java47 ByteString byteString = (ByteString) b; in shouldDecode() local
49 0x00, 0x00, 0x00, 0x00, 0x00 }, byteString.getBytes()); in shouldDecode()
DExample12Test.java47 ByteString byteString = (ByteString) b; in shouldDecode() local
49 0x00, 0x00, 0x00, 0x00, 0x00 }, byteString.getBytes()); in shouldDecode()
/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.java417 LeafByteString byteString = pieces.next(); in asReadOnlyByteBufferList() local
418 result.add(byteString.asReadOnlyByteBuffer()); in asReadOnlyByteBufferList()
657 private void insert(ByteString byteString) { in insert() argument
658 int depthBin = getDepthBinForLength(byteString.size()); in insert()
666 prefixesStack.push(byteString); in insert()
678 newTree = new RopeByteString(newTree, byteString); in insert()

12