/external/grpc-grpc-java/core/src/test/java/io/grpc/internal/ |
D | ReadableBuffersTest.java | 42 ReadableBuffer buffer = ReadableBuffers.empty(); in empty_returnsEmptyBuffer() 48 ReadableBuffers.readArray(null); in readArray_checksNotNull() 53 ReadableBuffer buffer = ReadableBuffers.wrap(MSG_BYTES); in readArray_returnsBufferArray() 54 assertArrayEquals(new byte[]{'h', 'e', 'l', 'l', 'o'}, ReadableBuffers.readArray(buffer)); in readArray_returnsBufferArray() 59 ReadableBuffer buffer = ReadableBuffers.wrap(MSG_BYTES); in readAsString_returnsString() 60 assertEquals("hello", ReadableBuffers.readAsString(buffer, UTF_8)); in readAsString_returnsString() 65 ReadableBuffers.readAsString(null, UTF_8); in readAsString_checksNotNull() 70 ReadableBuffer buffer = ReadableBuffers.wrap(MSG_BYTES); in readAsStringUtf8_returnsString() 71 assertEquals("hello", ReadableBuffers.readAsStringUtf8(buffer)); in readAsStringUtf8_returnsString() 76 ReadableBuffers.readAsStringUtf8(null); in readAsStringUtf8_checksNotNull() [all …]
|
D | GzipInflatingBufferTest.java | 108 gzipInflatingBuffer.addGzippedBytes(ReadableBuffers.wrap(gzippedData)); in gzipInflateWorks() 119 gzipInflatingBuffer.addGzippedBytes(ReadableBuffers.wrap(gzippedData, 0, initialBytes)); in splitGzipStreamWorks() 128 ReadableBuffers.wrap(gzippedData, initialBytes, gzippedData.length - initialBytes)); in splitGzipStreamWorks() 137 gzipInflatingBuffer.addGzippedBytes(ReadableBuffers.wrap(gzippedData)); in inflateBytesObeysOffsetAndLength() 159 gzipInflatingBuffer.addGzippedBytes(ReadableBuffers.wrap(gzippedData)); in concatenatedStreamsWorks() 160 gzipInflatingBuffer.addGzippedBytes(ReadableBuffers.wrap(gzippedTruncatedData)); in concatenatedStreamsWorks() 161 gzipInflatingBuffer.addGzippedBytes(ReadableBuffers.wrap(gzippedData)); in concatenatedStreamsWorks() 162 gzipInflatingBuffer.addGzippedBytes(ReadableBuffers.wrap(gzippedTruncatedData)); in concatenatedStreamsWorks() 186 gzipInflatingBuffer.addGzippedBytes(ReadableBuffers.wrap(gzippedData)); in requestingTooManyBytesStillReturnsEndOfBlock() 200 gzipInflatingBuffer.addGzippedBytes(ReadableBuffers.wrap(gzippedData)); in closeStopsDecompression() [all …]
|
D | CompositeReadableBufferTest.java | 56 composite.addBuffer(ReadableBuffers.wrap(EXPECTED_VALUE.getBytes(UTF_8))); in singleBufferShouldSucceed() 58 assertEquals(EXPECTED_VALUE, ReadableBuffers.readAsStringUtf8(composite)); in singleBufferShouldSucceed() 74 composite.addBuffer(ReadableBuffers.wrap(new byte[0])); in readUnsignedByteShouldSkipZeroLengthBuffer() 76 composite.addBuffer(ReadableBuffers.wrap(in)); in readUnsignedByteShouldSkipZeroLengthBuffer() 174 composite.addBuffer(ReadableBuffers.wrap(part.getBytes(UTF_8))); in splitAndAdd()
|
D | ReadableBuffersArrayTest.java | 20 import static io.grpc.internal.ReadableBuffers.wrap; 48 return ReadableBuffers.wrap(msg.getBytes(UTF_8), 0, msg.length()); in buffer()
|
D | Http2ClientStreamTransportStateTest.java | 109 state.transportDataReceived(ReadableBuffers.empty(), true); in transportHeadersReceived_noHttpStatus() 124 state.transportDataReceived(ReadableBuffers.empty(), true); in transportHeadersReceived_wrongContentType_200() 140 state.transportDataReceived(ReadableBuffers.empty(), true); in transportHeadersReceived_wrongContentType_401() 182 state.transportDataReceived(ReadableBuffers.empty(), true); in transportHeadersReceived_twice() 202 state.transportDataReceived(ReadableBuffers.empty(), true); in transportHeadersReceived_unknownAndTwiceLogsSecondHeaders() 215 state.transportDataReceived(ReadableBuffers.wrap(testString.getBytes(US_ASCII)), true); in transportDataReceived_noHeaderReceived() 230 state.transportDataReceived(ReadableBuffers.wrap(testString.getBytes(US_ASCII)), true); in transportDataReceived_debugData()
|
D | ReadableBuffersByteBufferTest.java | 31 return ReadableBuffers.wrap(ByteBuffer.wrap(msg.getBytes(UTF_8))); in buffer()
|
D | AbstractServerStreamTest.java | 122 stream.transportState().inboundDataReceived(ReadableBuffers.wrap(new byte[] {1}), false); in queuedBytesInDeframerShouldNotBlockComplete() 143 stream.transportState().inboundDataReceived(ReadableBuffers.wrap(new byte[] {1}), false); in queuedBytesInDeframerShouldNotBlockTransportReportStatus() 163 stream.transportState().inboundDataReceived(ReadableBuffers.wrap(new byte[] {1}), true); in partialMessageAtEndOfStreamShouldFail()
|
D | MessageDeframerTest.java | 114 super.addGzippedBytes(ReadableBuffers.wrap(gzippedOutputStream.toByteArray())); in setUp() 255 deframer.deframe(ReadableBuffers.wrap( in largerFrameSize() 532 return ReadableBuffers.wrap(bytes);
|
D | AbstractClientStreamTest.java | 328 stream.transportState().deframe(ReadableBuffers.wrap(new byte[] {0, 0, 0, 0, 2, 1})); in rstStreamClosesStream() 347 stream.transportState().deframe(ReadableBuffers.wrap(new byte[] {0, 0, 0, 0, 2, 1})); in trailerOkWithTruncatedMessage() 364 stream.transportState().deframe(ReadableBuffers.wrap(new byte[] {0, 0, 0, 0, 2, 1})); in trailerNotOkWithTruncatedMessage()
|
D | ApplicationThreadDeframerTest.java | 67 ReadableBuffer frame = ReadableBuffers.wrap(new byte[1]); in deframeInvokesMessagesAvailableOnListener()
|
/external/grpc-grpc-java/core/src/main/java/io/grpc/internal/ |
D | MessageDeframer.java | 333 nextFrame.addBuffer(ReadableBuffers.wrap(inflatedBuffer, inflatedIndex, n)); in readRequiredBytes() 417 return ReadableBuffers.openStream(nextFrame, true); in getUncompressedBody() 430 decompressor.decompress(ReadableBuffers.openStream(nextFrame, true)); in getCompressedBody()
|
D | ReadableBuffers.java | 32 public final class ReadableBuffers { class 337 private ReadableBuffers() {} in ReadableBuffers() method in ReadableBuffers
|
D | Http2ClientStreamTransportState.java | 134 + ReadableBuffers.readAsString(frame, errorCharset)); in transportDataReceived()
|
/external/grpc-grpc-java/cronet/src/main/java/io/grpc/cronet/ |
D | CronetClientStream.java | 38 import io.grpc.internal.ReadableBuffers; 291 super.transportDataReceived(ReadableBuffers.wrap(buffer), endOfStream); in transportDataReceived()
|