Home
last modified time | relevance | path

Searched refs:readUtf8 (Results 1 – 25 of 36) sorted by relevance

12

/external/okhttp/okio/okio/src/test/java/okio/
DBufferTest.java46 assertEquals("abcd", buffer.readUtf8(4)); in readAndWriteUtf8()
48 assertEquals("ef", buffer.readUtf8(2)); in readAndWriteUtf8()
51 buffer.readUtf8(1); in readAndWriteUtf8()
106 assertEquals(repeat('a', 999), buffer.readUtf8(999)); // a...a in multipleSegmentBuffers()
107 assertEquals("a" + repeat('b', 2500) + "c", buffer.readUtf8(2502)); // ab...bc in multipleSegmentBuffers()
108 assertEquals(repeat('c', 4998), buffer.readUtf8(4998)); // c...c in multipleSegmentBuffers()
109 assertEquals("c" + repeat('d', 10000) + "e", buffer.readUtf8(10002)); // cd...de in multipleSegmentBuffers()
110 assertEquals(repeat('e', 24998), buffer.readUtf8(24998)); // e...e in multipleSegmentBuffers()
111 assertEquals("e" + repeat('f', 50000), buffer.readUtf8(50001)); // ef...f in multipleSegmentBuffers()
169 assertEquals(expected.toString(), buffer.readUtf8(expected.length())); in moveBytesBetweenBuffers()
[all …]
DBufferedSinkTest.java105 assertEquals(repeat('a', Segment.SIZE - 1), data.readUtf8(Segment.SIZE - 1));
136 assertEquals(repeat('a', Segment.SIZE - 4), data.readUtf8(Segment.SIZE - 4));
146 assertEquals(repeat('a', Segment.SIZE - 3), data.readUtf8(Segment.SIZE - 3));
202 assertEquals("abcdef", data.readUtf8());
211 assertEquals("abcd", data.readUtf8());
212 assertEquals("ef", source.readUtf8());
225 assertEquals("abcdabcd", data.readUtf8());
239 assertEquals("abcd", data.readUtf8());
273 assertEquals("a" + repeat('b', 9998) + "c", data.readUtf8());
300 String actual = data.readUtf8();
[all …]
DOkioTest.java45 assertEquals("Hello, java.io file!", source.readUtf8()); in readWriteFile()
64 assertEquals("Hello, java.io file!", source.readUtf8()); in appendFile()
108 assertEquals("abb", sink.readUtf8(3)); in sourceFromInputStream()
112 assertEquals(repeat('b', Segment.SIZE), sink.readUtf8()); in sourceFromInputStream()
116 assertEquals(repeat('b', Segment.SIZE - 2) + "c", sink.readUtf8()); in sourceFromInputStream()
DSegmentSharingTest.java69 assertEquals(xs + ys + zs, out.readUtf8()); in snapshotWriteToOutputStream()
128 assertEquals("abcdef", bufferA.readUtf8()); in mutateAfterClone()
129 assertEquals("abcDEF", bufferB.readUtf8()); in mutateAfterClone()
134 assertEquals(ys, bufferA.readUtf8(ys.length())); in concatenateSegmentsCanCombine()
140 assertEquals(us + vs, bufferA.readUtf8()); in concatenateSegmentsCanCombine()
141 assertEquals(ws, bufferB.readUtf8()); in concatenateSegmentsCanCombine()
142 assertEquals(us + xs, bufferC.readUtf8()); in concatenateSegmentsCanCombine()
DDeflaterSinkTest.java40 assertEquals(original, inflated.readUtf8()); in deflateWithClose()
52 assertEquals(original, inflated.readUtf8()); in deflateWithSyncFlush()
64 assertEquals(original, inflated.readUtf8()); in deflateWellCompressed()
87 assertEquals(repeat('a', byteCount), inflate(buffer).readUtf8(byteCount)); in multipleSegmentsWithoutCompression()
104 assertEquals(original, inflated.readUtf8()); in deflateIntoNonemptySink()
DBufferedSourceTest.java224 assertEquals("abcdef", sink.readUtf8()); in readAll()
258 assertEquals(repeat('a', 9999), sink.readUtf8()); in readFully()
259 assertEquals("a", source.readUtf8()); in readFully()
272 assertEquals("Hi", sink.readUtf8()); in readFullyTooShortThrows()
358 assertEquals("d", source.readUtf8(1)); in readByteArrayPartial()
369 assertEquals("d", source.readUtf8(1)); in readByteStringPartial()
389 assertEquals("aa", source.readUtf8(2)); in readUtf8SpansSegments()
394 assertEquals(repeat('a', Segment.SIZE), source.readUtf8(Segment.SIZE)); in readUtf8Segment()
399 assertEquals(repeat('a', Segment.SIZE + 10), source.readUtf8(Segment.SIZE + 10)); in readUtf8PartialBuffer()
404 assertEquals(repeat('a', Segment.SIZE * 2), source.readUtf8()); in readUtf8EntireBuffer()
[all …]
DInflaterSourceTest.java35 assertEquals("God help us, we're in the hands of engineers.", inflated.readUtf8()); in inflate()
68 assertEquals(original, inflated.readUtf8()); in inflateWellCompressed()
87 assertEquals("God help us, we're in the hands of engineers.", inflated.readUtf8()); in inflateIntoNonemptySink()
DGzipSinkTest.java35 assertEquals(original, inflated.readUtf8()); in gzipGunzip()
DRealBufferedSourceTest.java101 assertEquals("ab", bufferedSource.buffer().readUtf8(2)); in requireIncludesBufferBytes()
DGzipSourceTest.java101 assertEquals("It's a UNIX system! I know this!", gunzipped.readUtf8()); in assertGzipped()
/external/okhttp/okhttp-tests/src/test/java/com/squareup/okhttp/
DFormEncodingBuilderTest.java39 assertEquals(expected, out.readUtf8()); in urlEncoding()
52 assertEquals(expected, out.readUtf8()); in addEncoded()
65 assertEquals(expected, buffer.readUtf8()); in encodedPair()
80 assertEquals(expected, buffer.readUtf8()); in encodeMultiplePairs()
91 assertEquals(expected, buffer.readUtf8()); in buildEmptyForm()
179 return buffer.readUtf8(buffer.size() - 1); // Skip the "c" suffix. in formEncode()
DMultipartBuilderTest.java51 assertEquals(expected, buffer.readUtf8()); in singlePart()
82 assertEquals(expected, buffer.readUtf8()); in threeParts()
139 assertEquals(expected, buffer.readUtf8()); in fieldAndTwoFiles()
178 assertEquals(expected, buffer.readUtf8()); in stringEscapingIsWeird()
222 assertEquals(expected, buffer.readUtf8()); in streamingPartHasNoLength()
DCallTest.java239 assertEquals("def", recordedRequest.getBody().readUtf8()); in post()
329 assertEquals(body, recordedRequest1.getBody().readUtf8()); in postBodyRetransmittedAfterAuthorizationFail()
334 assertEquals(body, recordedRequest2.getBody().readUtf8()); in postBodyRetransmittedAfterAuthorizationFail()
412 assertEquals("def", recordedRequest.getBody().readUtf8()); in deleteWithRequestBody()
429 assertEquals("def", recordedRequest.getBody().readUtf8()); in put()
458 assertEquals("def", recordedRequest.getBody().readUtf8()); in patch()
486 assertEquals("abc", recordedRequest.getBody().readUtf8()); in unspecifiedRequestBodyContentTypeDoesNotGetDefault()
751 assertEquals("abc", body1.readUtf8()); in reusedSourcesGetIndependentTimeoutInstances()
758 assertEquals("def", body2.readUtf8()); in reusedSourcesGetIndependentTimeoutInstances()
994 assertEquals("def", recordedRequest.getBody().readUtf8()); in post_Async()
[all …]
DRecordingCallback.java43 … responses.add(new RecordedResponse(response.request(), response, null, buffer.readUtf8(), null)); in onResponse()
DWebPlatformUrlTestData.java147 result.append((char) Integer.parseInt(in.readUtf8(4), 16));
DInterceptorTest.java243 assertEquals("ABC", recordedRequest.getBody().readUtf8()); in rewriteRequestToServer()
550 original.writeUtf8(source.readUtf8(byteCount).toUpperCase(Locale.US));
565 sink.writeUtf8(mixedCase.readUtf8().toUpperCase(Locale.US));
DURLConnectionTest.java314 assertEquals("body", server.takeRequest().getBody().readUtf8()); in testRequestBodySurvivesRetries()
1363 assertEquals(body, request.getBody().readUtf8());
1402 assertEquals("ABCD", request.getBody().readUtf8());
1450 assertEquals(body, recordedRequest1.getBody().readUtf8());
1455 assertEquals(body, recordedRequest2.getBody().readUtf8());
1682 assertEquals("ABCD", request.getBody().readUtf8());
1719 assertEquals("ABCD", request.getBody().readUtf8());
2035 assertEquals("ABCD", page1.getBody().readUtf8());
2145 assertEquals("ABCD", page1.getBody().readUtf8());
2288 assertEquals("ABC", request.getBody().readUtf8());
[all …]
DSocksProxy.java158 String domainName = fromSource.readUtf8(domainNameLength); in acceptCommand()
/external/okhttp/okio/okio/src/main/java/okio/
DRealBufferedSource.java162 @Override public String readUtf8() throws IOException { in readUtf8() method in RealBufferedSource
164 return buffer.readUtf8(); in readUtf8()
167 @Override public String readUtf8(long byteCount) throws IOException { in readUtf8() method in RealBufferedSource
169 return buffer.readUtf8(byteCount); in readUtf8()
189 return buffer.size != 0 ? readUtf8(buffer.size) : null; in readUtf8Line()
DBufferedSource.java142 String readUtf8() throws IOException; in readUtf8() method
148 String readUtf8(long byteCount) throws IOException; in readUtf8() method
DBuffer.java438 throw new NumberFormatException("Number too large: " + buffer.readUtf8());
505 throw new NumberFormatException("Number too large: " + buffer.readUtf8());
548 @Override public String readUtf8() {
556 @Override public String readUtf8(long byteCount) throws EOFException {
598 return size != 0 ? readUtf8(size) : null;
618 String result = readUtf8((newline - 1));
624 String result = readUtf8(newline);
/external/okhttp/samples/guide/src/main/java/com/squareup/okhttp/recipes/
DWebSocketEcho.java52 System.out.println("MESSAGE: " + payload.readUtf8()); in onMessage()
64 System.out.println("PONG: " + payload.readUtf8()); in onPong()
/external/okhttp/okhttp-ws-tests/src/test/java/com/squareup/okhttp/internal/ws/
DWebSocketReaderTest.java163 assertEquals("Hello", sink.readUtf8()); in serverHelloTwoChunks()
279 assertEquals("Hel", sink.readUtf8()); in closeExhaustsMessage()
301 assertEquals("He", sink.readUtf8()); in closeExhaustsMessageOverControlFrames()
/external/okhttp/okhttp-apache/src/test/java/com/squareup/okhttp/apache/
DOkApacheClientTest.java101 assertEquals("Hello, world!", request.getBody().readUtf8()); in postByteEntity()
114 assertEquals("Hello, world!", request.getBody().readUtf8()); in postInputStreamEntity()
277 return buffer.readUtf8(); in gunzip()
/external/okhttp/mockwebserver/src/main/java/com/squareup/okhttp/mockwebserver/
DRecordedRequest.java107 return getBody().readUtf8(); in getUtf8Body()

12