Home
last modified time | relevance | path

Searched refs:byteCount (Results 1 – 25 of 294) sorted by relevance

12345678910>>...12

/external/okio/okio/src/jvmMain/kotlin/okio/
DBuffer.kt93 override fun write(data: ByteArray, offset: Int, byteCount: Int) { in <lambda>()
94 this@Buffer.write(data, offset, byteCount) in <lambda>()
112 override fun require(byteCount: Long) { in <lambda>()
113 if (size < byteCount) throw EOFException() in <lambda>()
116 override fun request(byteCount: Long) = size >= byteCount in <lambda>()
132 override fun read(sink: ByteArray, offset: Int, byteCount: Int): Int { in <lambda>()
133 return this@Buffer.read(sink, offset, byteCount) in <lambda>()
150 byteCount: Long = size - offset in <lambda>()
153 var byteCount = byteCount in <lambda>() variable
154 checkOffsetAndCount(size, offset, byteCount) in <lambda>()
[all …]
DRealBufferedSource.kt65 override fun read(sink: Buffer, byteCount: Long): Long = commonRead(sink, byteCount) in buffer()
67 override fun require(byteCount: Long): Unit = commonRequire(byteCount) in buffer()
68 override fun request(byteCount: Long): Boolean = commonRequest(byteCount) in buffer()
71 override fun readByteString(byteCount: Long): ByteString = commonReadByteString(byteCount) in buffer()
74 override fun readByteArray(byteCount: Long): ByteArray = commonReadByteArray(byteCount) in buffer()
77 override fun read(sink: ByteArray, offset: Int, byteCount: Int): Int = in buffer()
78 commonRead(sink, offset, byteCount) in buffer()
89 override fun readFully(sink: Buffer, byteCount: Long): Unit = commonReadFully(sink, byteCount) in readFully()
92 override fun readUtf8(byteCount: Long): String = commonReadUtf8(byteCount) in readFully()
99 override fun readString(byteCount: Long, charset: Charset): String { in readString()
[all …]
DThrottler.kt74 internal fun take(byteCount: Long): Long { in take()
75 require(byteCount > 0) in take()
80 val byteCountOrWaitNanos = byteCountOrWaitNanos(now, byteCount) in take()
93 internal fun byteCountOrWaitNanos(now: Long, byteCount: Long): Long { in byteCountOrWaitNanos()
94 if (bytesPerSecond == 0L) return byteCount // No limits. in byteCountOrWaitNanos()
100 if (immediateBytes >= byteCount) { in byteCountOrWaitNanos()
101 allocatedUntil = now + idleInNanos + byteCount.bytesToNanos() in byteCountOrWaitNanos()
102 return byteCount in byteCountOrWaitNanos()
112 val minByteCount = minOf(waitByteCount, byteCount) in byteCountOrWaitNanos()
137 override fun read(sink: Buffer, byteCount: Long): Long { in source()
[all …]
DSegmentedByteString.kt53 forEachSegment { data, offset, byteCount -> in <lambda>() method
54 update(data, offset, byteCount) in <lambda>()
65 forEachSegment { data, offset, byteCount -> in <lambda>() method
66 mac.update(data, offset, byteCount) in <lambda>()
89 forEachSegment { data, offset, byteCount -> in <lambda>() method
90 out.write(data, offset, byteCount) in <lambda>()
94 override fun write(buffer: Buffer, offset: Int, byteCount: Int): Unit = in <lambda>()
95 commonWrite(buffer, offset, byteCount) in <lambda>()
101 byteCount: Int in <lambda>()
102 ): Boolean = commonRangeEquals(offset, other, otherOffset, byteCount) in <lambda>()
[all …]
/external/okhttp/repackaged/okio/okio/src/main/java/com/android/okhttp/okio/
DBuffer.java75 @Override public void write(byte[] data, int offset, int byteCount) { in outputStream() argument
76 Buffer.this.write(data, offset, byteCount); in outputStream()
103 @Override public void require(long byteCount) throws EOFException {
104 if (size < byteCount) throw new EOFException();
107 @Override public boolean request(long byteCount) {
108 return size >= byteCount;
118 @Override public int read(byte[] sink, int offset, int byteCount) {
119 return Buffer.this.read(sink, offset, byteCount);
144 public Buffer copyTo(OutputStream out, long offset, long byteCount) throws IOException {
146 checkOffsetAndCount(size, offset, byteCount);
[all …]
DRealBufferedSource.java45 @Override public long read(Buffer sink, long byteCount) throws IOException { in read() argument
47 if (byteCount < 0) throw new IllegalArgumentException("byteCount < 0: " + byteCount); in read()
55 long toRead = Math.min(byteCount, buffer.size); in read()
64 @Override public void require(long byteCount) throws IOException { in require() argument
65 if (!request(byteCount)) throw new EOFException(); in require()
68 @Override public boolean request(long byteCount) throws IOException { in request() argument
69 if (byteCount < 0) throw new IllegalArgumentException("byteCount < 0: " + byteCount); in request()
71 while (buffer.size < byteCount) { in request()
87 @Override public ByteString readByteString(long byteCount) throws IOException { in readByteString() argument
88 require(byteCount); in readByteString()
[all …]
DSegment.java110 public Segment split(int byteCount) { in split() argument
111 if (byteCount <= 0 || byteCount > limit - pos) throw new IllegalArgumentException(); in split()
113 prefix.limit = prefix.pos + byteCount; in split()
114 pos += byteCount; in split()
126 int byteCount = limit - pos; in compact() local
128 if (byteCount > availableByteCount) return; // Cannot compact: not enough writable space. in compact()
129 writeTo(prev, byteCount); in compact()
135 public void writeTo(Segment sink, int byteCount) { in writeTo() argument
137 if (sink.limit + byteCount > SIZE) { in writeTo()
140 if (sink.limit + byteCount - sink.pos > SIZE) throw new IllegalArgumentException(); in writeTo()
[all …]
/external/okhttp/okio/okio/src/main/java/okio/
DBuffer.java73 @Override public void write(byte[] data, int offset, int byteCount) { in outputStream() argument
74 Buffer.this.write(data, offset, byteCount); in outputStream()
101 @Override public void require(long byteCount) throws EOFException {
102 if (size < byteCount) throw new EOFException();
105 @Override public boolean request(long byteCount) {
106 return size >= byteCount;
116 @Override public int read(byte[] sink, int offset, int byteCount) {
117 return Buffer.this.read(sink, offset, byteCount);
142 public Buffer copyTo(OutputStream out, long offset, long byteCount) throws IOException {
144 checkOffsetAndCount(size, offset, byteCount);
[all …]
DRealBufferedSource.java44 @Override public long read(Buffer sink, long byteCount) throws IOException { in read() argument
46 if (byteCount < 0) throw new IllegalArgumentException("byteCount < 0: " + byteCount); in read()
54 long toRead = Math.min(byteCount, buffer.size); in read()
63 @Override public void require(long byteCount) throws IOException { in require() argument
64 if (!request(byteCount)) throw new EOFException(); in require()
67 @Override public boolean request(long byteCount) throws IOException { in request() argument
68 if (byteCount < 0) throw new IllegalArgumentException("byteCount < 0: " + byteCount); in request()
70 while (buffer.size < byteCount) { in request()
86 @Override public ByteString readByteString(long byteCount) throws IOException { in readByteString() argument
87 require(byteCount); in readByteString()
[all …]
DSegment.java109 public Segment split(int byteCount) { in split() argument
110 if (byteCount <= 0 || byteCount > limit - pos) throw new IllegalArgumentException(); in split()
112 prefix.limit = prefix.pos + byteCount; in split()
113 pos += byteCount; in split()
125 int byteCount = limit - pos; in compact() local
127 if (byteCount > availableByteCount) return; // Cannot compact: not enough writable space. in compact()
128 writeTo(prev, byteCount); in compact()
134 public void writeTo(Segment sink, int byteCount) { in writeTo() argument
136 if (sink.limit + byteCount > SIZE) { in writeTo()
139 if (sink.limit + byteCount - sink.pos > SIZE) throw new IllegalArgumentException(); in writeTo()
[all …]
DGzipSink.java65 @Override public void write(Buffer source, long byteCount) throws IOException { in write() argument
66 if (byteCount < 0) throw new IllegalArgumentException("byteCount < 0: " + byteCount); in write()
67 if (byteCount == 0) return; in write()
69 updateCrc(source, byteCount); in write()
70 deflaterSink.write(source, byteCount); in write()
130 private void updateCrc(Buffer buffer, long byteCount) { in updateCrc() argument
131 for (Segment head = buffer.head; byteCount > 0; head = head.next) { in updateCrc()
132 int segmentLength = (int) Math.min(byteCount, head.limit - head.pos); in updateCrc()
134 byteCount -= segmentLength; in updateCrc()
/external/okio/okio/src/commonMain/kotlin/okio/internal/
DSegmentedByteString.kt57 action: (data: ByteArray, offset: Int, byteCount: Int) -> Unit in forEachSegment()
79 action: (data: ByteArray, offset: Int, byteCount: Int) -> Unit in forEachSegment()
88 val byteCount = minOf(endIndex, segmentOffset + segmentSize) - pos in forEachSegment() constant
90 action(segments[s], offset, byteCount) in forEachSegment()
91 pos += byteCount in forEachSegment()
142 forEachSegment { data, offset, byteCount -> in commonGetSize() method
145 endIndex = offset + byteCount in commonGetSize()
147 resultPos += byteCount in commonGetSize()
152 internal inline fun SegmentedByteString.commonWrite(buffer: Buffer, offset: Int, byteCount: Int) { in commonWrite()
153 forEachSegment(offset, offset + byteCount) { data, offset, byteCount -> in commonWrite() method
[all …]
DRealBufferedSource.kt34 internal inline fun RealBufferedSource.commonRead(sink: Buffer, byteCount: Long): Long { in commonRead()
35 require(byteCount >= 0L) { "byteCount < 0: $byteCount" } in commonRead()
43 val toRead = minOf(byteCount, buffer.size) in commonRead()
52 internal inline fun RealBufferedSource.commonRequire(byteCount: Long) { in commonRequire()
53 if (!request(byteCount)) throw EOFException() in commonRequire()
56 internal inline fun RealBufferedSource.commonRequest(byteCount: Long): Boolean { in commonRequest()
57 require(byteCount >= 0L) { "byteCount < 0: $byteCount" } in commonRequest()
59 while (buffer.size < byteCount) { in commonRequest()
75 internal inline fun RealBufferedSource.commonReadByteString(byteCount: Long): ByteString { in commonReadByteString()
76 require(byteCount) in commonReadByteString()
[all …]
DBuffer.kt237 byteCount: Long in commonCopyTo()
240 var byteCount = byteCount in commonCopyTo() variable
241 checkOffsetAndCount(size, offset, byteCount) in commonCopyTo()
242 if (byteCount == 0L) return this in commonCopyTo()
244 out.size += byteCount in commonCopyTo()
254 while (byteCount > 0L) { in commonCopyTo()
257 copy.limit = minOf(copy.pos + byteCount.toInt(), copy.limit) in commonCopyTo()
265 byteCount -= (copy.limit - copy.pos).toLong() in commonCopyTo()
417 internal inline fun Buffer.commonSkip(byteCount: Long) { in commonClear()
418 var byteCount = byteCount in commonClear() variable
[all …]
DRealBufferedSink.kt30 internal inline fun RealBufferedSink.commonWrite(source: Buffer, byteCount: Long) { in commonWrite()
32 buffer.write(source, byteCount) in commonWrite()
45 byteCount: Int in commonWrite()
48 buffer.write(byteString, offset, byteCount) in commonWrite()
83 byteCount: Int in commonWrite()
86 buffer.write(source, offset, byteCount) in commonWrite()
101 internal inline fun RealBufferedSink.commonWrite(source: Source, byteCount: Long): BufferedSink { in commonWrite()
102 var byteCount = byteCount in commonWrite() variable
103 while (byteCount > 0L) { in commonWrite()
104 val read = source.read(buffer, byteCount) in commonWrite()
[all …]
/external/icu/android_icu4j/libcore_bridge/src/java/com/android/i18n/timezone/internal/
DNioBufferIterator.java59 public void skip(int byteCount) { in skip() argument
60 position += byteCount; in skip()
69 public void readByteArray(byte[] bytes, int arrayOffset, int byteCount) { in readByteArray() argument
70 checkArrayBounds(arrayOffset, bytes.length, byteCount); in readByteArray()
72 checkReadBounds(position, length, byteCount); in readByteArray()
73 Memory.peekByteArray(address + position, bytes, arrayOffset, byteCount); in readByteArray()
74 position += byteCount; in readByteArray()
99 final int byteCount = Integer.BYTES * intCount; in readIntArray() local
100 checkReadBounds(position, length, byteCount); in readIntArray()
102 position += byteCount; in readIntArray()
[all …]
/external/glide/library/src/main/java/com/bumptech/glide/load/resource/bitmap/
DRecyclableBufferedInputStream.java269 public synchronized int read(byte[] buffer, int offset, int byteCount) throws IOException { in read() argument
276 if (byteCount == 0) { in read()
287 int copylength = count - pos >= byteCount ? byteCount : count - pos; in read()
290 if (copylength == byteCount || localIn.available() == 0) { in read()
294 required = byteCount - copylength; in read()
296 required = byteCount; in read()
306 return required == byteCount ? -1 : byteCount - required; in read()
310 return required == byteCount ? -1 : byteCount - required; in read()
326 return byteCount; in read()
329 return byteCount - required; in read()
[all …]
/external/okio/okio/src/commonMain/kotlin/okio/
DSegment.kt120 fun split(byteCount: Int): Segment { in split()
121 require(byteCount > 0 && byteCount <= limit - pos) { "byteCount out of range" } in split()
129 if (byteCount >= SHARE_MINIMUM) { in split()
133 data.copyInto(prefix.data, startIndex = pos, endIndex = pos + byteCount) in split()
136 prefix.limit = prefix.pos + byteCount in split()
137 pos += byteCount in split()
149 val byteCount = limit - pos in compact() constant
151 if (byteCount > availableByteCount) return // Cannot compact: not enough writable space. in compact()
152 writeTo(prev!!, byteCount) in compact()
158 fun writeTo(sink: Segment, byteCount: Int) { in writeTo()
[all …]
/external/okio/okio/src/nonJvmMain/kotlin/okio/
DRealBufferedSource.kt55 override fun read(sink: Buffer, byteCount: Long): Long = commonRead(sink, byteCount)
57 override fun require(byteCount: Long): Unit = commonRequire(byteCount)
58 override fun request(byteCount: Long): Boolean = commonRequest(byteCount)
61 override fun readByteString(byteCount: Long): ByteString = commonReadByteString(byteCount)
64 override fun readByteArray(byteCount: Long): ByteArray = commonReadByteArray(byteCount)
67 override fun read(sink: ByteArray, offset: Int, byteCount: Int): Int =
68 commonRead(sink, offset, byteCount)
70 override fun readFully(sink: Buffer, byteCount: Long): Unit = commonReadFully(sink, byteCount)
73 override fun readUtf8(byteCount: Long): String = commonReadUtf8(byteCount)
86 override fun skip(byteCount: Long): Unit = commonSkip(byteCount)
[all …]
DBuffer.kt85 override fun require(byteCount: Long) { in <lambda>()
86 if (size < byteCount) throw EOFException(null) in <lambda>()
89 override fun request(byteCount: Long): Boolean = size >= byteCount in <lambda>()
96 byteCount: Long in <lambda>()
97 ): Buffer = commonCopyTo(out, offset, byteCount) in <lambda>()
128 override fun readByteString(byteCount: Long): ByteString = commonReadByteString(byteCount) in <lambda>()
130 override fun readFully(sink: Buffer, byteCount: Long): Unit = commonReadFully(sink, byteCount) in <lambda>()
136 override fun readUtf8(byteCount: Long): String = commonReadUtf8(byteCount) in <lambda>()
150 override fun readByteArray(byteCount: Long): ByteArray = commonReadByteArray(byteCount) in <lambda>()
156 override fun read(sink: ByteArray, offset: Int, byteCount: Int): Int = in <lambda>()
[all …]
/external/bouncycastle/bcprov/src/main/java/org/bouncycastle/crypto/modes/
DSICBlockCipher.java26 private int byteCount; field in SICBlockCipher
42 this.byteCount = 0; in SICBlockCipher()
102 if (byteCount == 0) in calculateByte()
106 return (byte)(counterOut[byteCount++] ^ in); in calculateByte()
109 byte rv = (byte)(counterOut[byteCount++] ^ in); in calculateByte()
111 if (byteCount == counter.length) in calculateByte()
113 byteCount = 0; in calculateByte()
178 long numBlocks = (n + byteCount) / blockSize; in adjustCounter()
196 byteCount = (int)((n + byteCount) - (blockSize * numBlocks)); in adjustCounter()
200 long numBlocks = (-n - byteCount) / blockSize; in adjustCounter()
[all …]
/external/okio/samples/src/jvmMain/java/okio/samples/
DInterceptors.java94 public long read(Buffer sink, long byteCount) throws IOException { in read() argument
95 if (byteCount < 0) throw new IllegalArgumentException("byteCount < 0: " + byteCount); in read()
96 if (byteCount == 0) return 0; in read()
98 long result = super.read(sink, byteCount); in read()
131 public void write(Buffer source, long byteCount) throws IOException { in write() argument
132 if (byteCount < 0) throw new IllegalArgumentException("byteCount < 0: " + byteCount); in write()
133 if (source.size() < byteCount) { in write()
134 throw new IllegalArgumentException("size=" + source.size() + " byteCount=" + byteCount); in write()
136 if (byteCount == 0) return; in write()
140 long remaining = byteCount; in write()
[all …]
DRandoms.java42 @Override public long read(Buffer sink, long byteCount) throws IOException { in read() argument
45 if (byteCount > Integer.MAX_VALUE) byteCount = Integer.MAX_VALUE; in read()
46 if (byteCount > bytesLeft) byteCount = bytesLeft; in read()
49 int ints = (int) (byteCount / 4); in read()
55 int bytes = (int) (byteCount - ints * 4); in read()
64 bytesLeft -= byteCount; in read()
65 return byteCount; in read()
/external/bouncycastle/repackaged/bcprov/src/main/java/com/android/org/bouncycastle/crypto/modes/
DSICBlockCipher.java28 private int byteCount; field in SICBlockCipher
44 this.byteCount = 0; in SICBlockCipher()
104 if (byteCount == 0) in calculateByte()
108 return (byte)(counterOut[byteCount++] ^ in); in calculateByte()
111 byte rv = (byte)(counterOut[byteCount++] ^ in); in calculateByte()
113 if (byteCount == counter.length) in calculateByte()
115 byteCount = 0; in calculateByte()
180 long numBlocks = (n + byteCount) / blockSize; in adjustCounter()
198 byteCount = (int)((n + byteCount) - (blockSize * numBlocks)); in adjustCounter()
202 long numBlocks = (-n - byteCount) / blockSize; in adjustCounter()
[all …]
/external/bouncycastle/repackaged_platform/bcprov/src/main/java/com/android/internal/org/bouncycastle/crypto/modes/
DSICBlockCipher.java28 private int byteCount; field in SICBlockCipher
44 this.byteCount = 0; in SICBlockCipher()
104 if (byteCount == 0) in calculateByte()
108 return (byte)(counterOut[byteCount++] ^ in); in calculateByte()
111 byte rv = (byte)(counterOut[byteCount++] ^ in); in calculateByte()
113 if (byteCount == counter.length) in calculateByte()
115 byteCount = 0; in calculateByte()
180 long numBlocks = (n + byteCount) / blockSize; in adjustCounter()
198 byteCount = (int)((n + byteCount) - (blockSize * numBlocks)); in adjustCounter()
202 long numBlocks = (-n - byteCount) / blockSize; in adjustCounter()
[all …]

12345678910>>...12