Home
last modified time | relevance | path

Searched refs:ReadableBuffers (Results 1 – 14 of 14) sorted by relevance

/external/grpc-grpc-java/core/src/test/java/io/grpc/internal/
DGzipInflatingBufferTest.java108 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 …]
DReadableBuffersTest.java42 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 …]
DCompositeReadableBufferTest.java56 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()
DReadableBuffersArrayTest.java20 import static io.grpc.internal.ReadableBuffers.wrap;
48 return ReadableBuffers.wrap(msg.getBytes(UTF_8), 0, msg.length()); in buffer()
DHttp2ClientStreamTransportStateTest.java109 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()
DAbstractServerStreamTest.java122 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()
DReadableBuffersByteBufferTest.java31 return ReadableBuffers.wrap(ByteBuffer.wrap(msg.getBytes(UTF_8))); in buffer()
DMessageDeframerTest.java114 super.addGzippedBytes(ReadableBuffers.wrap(gzippedOutputStream.toByteArray())); in setUp()
255 deframer.deframe(ReadableBuffers.wrap( in largerFrameSize()
532 return ReadableBuffers.wrap(bytes);
DAbstractClientStreamTest.java328 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()
DApplicationThreadDeframerTest.java67 ReadableBuffer frame = ReadableBuffers.wrap(new byte[1]); in deframeInvokesMessagesAvailableOnListener()
/external/grpc-grpc-java/core/src/main/java/io/grpc/internal/
DMessageDeframer.java333 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()
DReadableBuffers.java32 public final class ReadableBuffers { class
337 private ReadableBuffers() {} in ReadableBuffers() method in ReadableBuffers
DHttp2ClientStreamTransportState.java134 + ReadableBuffers.readAsString(frame, errorCharset)); in transportDataReceived()
/external/grpc-grpc-java/cronet/src/main/java/io/grpc/cronet/
DCronetClientStream.java38 import io.grpc.internal.ReadableBuffers;
291 super.transportDataReceived(ReadableBuffers.wrap(buffer), endOfStream); in transportDataReceived()