Home
last modified time | relevance | path

Searched refs:writableBytes (Results 1 – 13 of 13) sorted by relevance

/external/grpc-grpc-java/okhttp/src/main/java/io/grpc/okhttp/
DOkHttpWritableBuffer.java25 private int writableBytes; field in OkHttpWritableBuffer
30 writableBytes = capacity; in OkHttpWritableBuffer()
36 writableBytes -= length; in write()
43 writableBytes -= 1; in write()
48 public int writableBytes() { in writableBytes() method in OkHttpWritableBuffer
49 return writableBytes; in writableBytes()
/external/grpc-grpc-java/alts/src/main/java/io/grpc/alts/internal/
DAltsChannelCrypter.java62 ByteBuf plainBuf = outBuf.slice(outBuf.writerIndex(), outBuf.writableBytes()); in encrypt()
68 verify(outBuf.writableBytes() == plainBuf.readableBytes() + TAG_LENGTH); in encrypt()
69 ByteBuffer out = outBuf.internalNioBuffer(outBuf.writerIndex(), outBuf.writableBytes()); in encrypt()
85 ByteBuf cipherTextAndTag = out.slice(out.writerIndex(), out.writableBytes()); in decrypt()
100 checkArgument(bytesRead == out.writableBytes()); in decrypt()
103 ByteBuffer outBuffer = out.internalNioBuffer(out.writerIndex(), out.writableBytes()); in decrypt()
115 verify(out.writableBytes() == TAG_LENGTH); in decrypt()
DAltsTsiFrameProtector.java255 int headerBytesToRead = Math.min(in.readableBytes(), header.writableBytes()); in handleHeader()
342 verify(out.writableBytes() == suffixBytes); in handlePayload()
348 verify(out.writableBytes() == suffixBytes); in handlePayload()
400 checkArgument(len <= in.writableBytes()); in writeSlice()
/external/grpc-grpc-java/core/src/test/java/io/grpc/internal/
DWritableBufferTestBase.java60 buffer().write(new byte[buffer().writableBytes()], 1, buffer().writableBytes()); in testWriteSrcIndexAndLengthExceedWritableBytes()
65 int before = buffer().writableBytes(); in testWritableAndReadableBytes()
68 assertEquals(5, before - buffer().writableBytes()); in testWritableAndReadableBytes()
DMessageFramerTest.java417 public int writableBytes() {
450 return Arrays.hashCode(data) + writableBytes() + readableBytes();
/external/grpc-grpc-java/okhttp/src/test/java/io/grpc/okhttp/
DOkHttpWritableBufferAllocatorTest.java45 assertEquals(4096, buffer.writableBytes()); in testCapacity()
52 assertEquals(1024 * 1024, buffer.writableBytes()); in testInitialCapacityHasMaximum()
59 assertEquals(4097, buffer.writableBytes()); in testIsExactBelowMaxCapacity()
/external/grpc-grpc-java/netty/src/test/java/io/grpc/netty/
DNettyWritableBufferAllocatorTest.java47 assertEquals(4096, buffer.writableBytes()); in testCapacityHasMinimum()
54 assertEquals(9000, buffer.writableBytes()); in testCapacityIsExactAboveMinimum()
62 assertEquals(1024 * 1024, buffer.writableBytes()); in testCapacityIsCappedAtMaximum()
/external/grpc-grpc-java/netty/src/main/java/io/grpc/netty/
DNettyWritableBuffer.java44 public int writableBytes() { in writableBytes() method in NettyWritableBuffer
45 return bytebuf.writableBytes(); in writableBytes()
/external/grpc-grpc-java/cronet/src/test/java/io/grpc/cronet/
DCronetWritableBufferAllocatorTest.java33 assertEquals(1000, buffer.writableBytes()); in testAllocate()
42 assertEquals(1024 * 1024, buffer.writableBytes()); in testAllocateLargeBuffer()
/external/grpc-grpc-java/core/src/main/java/io/grpc/internal/
DMessageFramer.java280 if (buffer != null && buffer.writableBytes() == 0) { in writeRaw()
287 int toWrite = min(len, buffer.writableBytes()); in writeRaw()
394 if (current != null && current.writableBytes() > 0) { in write()
410 int canWrite = Math.min(len, current.writableBytes()); in write()
DWritableBuffer.java46 int writableBytes(); in writableBytes() method
/external/grpc-grpc-java/cronet/src/main/java/io/grpc/cronet/
DCronetWritableBuffer.java41 public int writableBytes() { in writableBytes() method in CronetWritableBuffer
/external/grpc-grpc-java/alts/src/test/java/io/grpc/alts/internal/
DByteBufTestUtils.java66 Preconditions.checkArgument(len <= in.writableBytes()); in writeSlice()