Home
last modified time | relevance | path

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

12345

/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()
DBufferedSource.java42 void require(long byteCount) throws IOException; in require() argument
49 boolean request(long byteCount) throws IOException; in request() argument
95 void skip(long byteCount) throws IOException; in skip() argument
101 ByteString readByteString(long byteCount) throws IOException; in readByteString() argument
107 byte[] readByteArray(long byteCount) throws IOException; in readByteArray() argument
125 int read(byte[] sink, int offset, int byteCount) throws IOException; in read() argument
132 void readFully(Buffer sink, long byteCount) throws IOException; in readFully() argument
148 String readUtf8(long byteCount) throws IOException; in readUtf8() argument
199 String readString(long byteCount, Charset charset) throws IOException; in readString() argument
DRealBufferedSink.java42 @Override public void write(Buffer source, long byteCount) in write() argument
45 buffer.write(source, byteCount); in write()
93 @Override public BufferedSink write(byte[] source, int offset, int byteCount) throws IOException { in write() argument
95 buffer.write(source, offset, byteCount); in write()
109 @Override public BufferedSink write(Source source, long byteCount) throws IOException { in write() argument
110 while (byteCount > 0) { in write()
111 long read = source.read(buffer, byteCount); in write()
113 byteCount -= read; in write()
175 long byteCount = buffer.completeSegmentByteCount(); in emitCompleteSegments() local
176 if (byteCount > 0) sink.write(buffer, byteCount); in emitCompleteSegments()
[all …]
DSegmentedByteString.java54 SegmentedByteString(Buffer buffer, int byteCount) { in SegmentedByteString() argument
56 checkOffsetAndCount(buffer.size, 0, byteCount); in SegmentedByteString()
61 for (Segment s = buffer.head; offset < byteCount; s = s.next) { in SegmentedByteString()
74 for (Segment s = buffer.head; offset < byteCount; s = s.next) { in SegmentedByteString()
185 int offset, ByteString other, int otherOffset, int byteCount) { in rangeEquals() argument
186 if (offset > size() - byteCount) return false; in rangeEquals()
188 for (int s = segment(offset); byteCount > 0; s++) { in rangeEquals()
191 int stepSize = Math.min(byteCount, segmentOffset + segmentSize - offset); in rangeEquals()
197 byteCount -= stepSize; in rangeEquals()
202 @Override public boolean rangeEquals(int offset, byte[] other, int otherOffset, int byteCount) { in rangeEquals() argument
[all …]
DByteString.java74 public static ByteString of(byte[] data, int offset, int byteCount) { in of() argument
76 checkOffsetAndCount(data.length, offset, byteCount); in of()
78 byte[] copy = new byte[byteCount]; in of()
79 System.arraycopy(data, offset, copy, 0, byteCount); in of()
181 public static ByteString read(InputStream in, int byteCount) throws IOException { in read() argument
183 if (byteCount < 0) throw new IllegalArgumentException("byteCount < 0: " + byteCount); in read()
185 byte[] result = new byte[byteCount]; in read()
186 for (int offset = 0, read; offset < byteCount; offset += read) { in read()
187 read = in.read(result, offset, byteCount - offset); in read()
309 public boolean rangeEquals(int offset, ByteString other, int otherOffset, int byteCount) { in rangeEquals() argument
[all …]
DUtil.java27 public static void checkOffsetAndCount(long size, long offset, long byteCount) { in checkOffsetAndCount() argument
28 if ((offset | byteCount) < 0 || offset > size || size - offset < byteCount) { in checkOffsetAndCount()
30 String.format("size=%s offset=%s byteCount=%s", size, offset, byteCount)); in checkOffsetAndCount()
74 byte[] a, int aOffset, byte[] b, int bOffset, int byteCount) { in arrayRangeEquals() argument
75 for (int i = 0; i < byteCount; i++) { in arrayRangeEquals()
DGzipSource.java67 @Override public long read(Buffer sink, long byteCount) throws IOException { in read() argument
68 if (byteCount < 0) throw new IllegalArgumentException("byteCount < 0: " + byteCount); in read()
69 if (byteCount == 0) return 0; in read()
80 long result = inflaterSource.read(sink, byteCount); in read()
186 private void updateCrc(Buffer buffer, long offset, long byteCount) { in updateCrc() argument
194 for (; byteCount > 0; s = s.next) { in updateCrc()
196 int toUpdate = (int) Math.min(s.limit - pos, byteCount); in updateCrc()
198 byteCount -= toUpdate; in updateCrc()
DOkio.java70 @Override public void write(Buffer source, long byteCount) throws IOException { in sink()
71 checkOffsetAndCount(source.size, 0, byteCount); in sink()
72 while (byteCount > 0) { in sink()
75 int toCopy = (int) Math.min(byteCount, head.limit - head.pos); in sink()
79 byteCount -= toCopy; in sink()
129 @Override public long read(Buffer sink, long byteCount) throws IOException {
130 if (byteCount < 0) throw new IllegalArgumentException("byteCount < 0: " + byteCount);
131 if (byteCount == 0) return 0;
135 int maxToCopy = (int) Math.min(byteCount, Segment.SIZE - tail.limit);
DSegmentPool.java31 static long byteCount; field in SegmentPool
42 byteCount -= Segment.SIZE; in take()
53 if (byteCount + Segment.SIZE > MAX_SIZE) return; // Pool is full. in recycle()
54 byteCount += Segment.SIZE; in recycle()
/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/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 …]
DCFBBlockCipher.java24 private int byteCount; field in CFBBlockCipher
124 if (byteCount == 0) in encryptByte()
129 byte rv = (byte)(cfbOutV[byteCount] ^ in); in encryptByte()
130 inBuf[byteCount++] = rv; in encryptByte()
132 if (byteCount == blockSize) in encryptByte()
134 byteCount = 0; in encryptByte()
145 if (byteCount == 0) in decryptByte()
150 inBuf[byteCount] = in; in decryptByte()
151 byte rv = (byte)(cfbOutV[byteCount++] ^ in); in decryptByte()
153 if (byteCount == blockSize) in decryptByte()
[all …]
DOFBBlockCipher.java15 private int byteCount; field in OFBBlockCipher
153 byteCount = 0; in reset()
161 if (byteCount == 0) in calculateByte()
166 byte rv = (byte)(ofbOutV[byteCount++] ^ in); in calculateByte()
168 if (byteCount == blockSize) in calculateByte()
170 byteCount = 0; in calculateByte()
/external/bouncycastle/bcprov/src/main/java/org/bouncycastle/crypto/digests/
DGeneralDigest.java19 private long byteCount; field in GeneralDigest
43 byteCount = Pack.bigEndianToLong(encodedState, 8); in GeneralDigest()
51 byteCount = t.byteCount; in copyIn()
65 byteCount++; in update()
110 byteCount += len; in update()
115 long bitLength = (byteCount << 3); in finish()
134 byteCount = 0; in reset()
147 Pack.longToBigEndian(byteCount, state, 8); in populateState()
/external/okhttp/okhttp/src/main/java/com/squareup/okhttp/internal/http/
DHttpConnection.java295 @Override public void write(Buffer source, long byteCount) throws IOException { in write() argument
297 checkOffsetAndCount(source.size(), 0, byteCount); in write() local
298 if (byteCount > bytesRemaining) { in write()
300 + " bytes but received " + byteCount); in write()
302 sink.write(source, byteCount); in write()
303 bytesRemaining -= byteCount; in write()
333 @Override public void write(Buffer source, long byteCount) throws IOException { in write() argument
335 if (byteCount == 0) return; in write()
337 sink.writeHexadecimalUnsignedLong(byteCount); in write()
339 sink.write(source, byteCount); in write()
[all …]
DRetryableSink.java54 @Override public void write(Buffer source, long byteCount) throws IOException { in write() argument
56 checkOffsetAndCount(source.size(), 0, byteCount); in write() local
57 if (limit != -1 && content.size() > limit - byteCount) { in write()
60 content.write(source, byteCount); in write()
/external/skia/src/ports/
DSkOSFile_stdio.cpp116 size_t sk_fread(void* buffer, size_t byteCount, FILE* f) { in sk_fread() argument
124 int err = fseek(f, (long)byteCount, SEEK_CUR); in sk_fread()
127 byteCount, curr, feof(f), ferror(f), err)); in sk_fread()
130 return byteCount; in sk_fread()
133 return fread(buffer, 1, byteCount, f); in sk_fread()
136 size_t sk_fwrite(const void* buffer, size_t byteCount, FILE* f) { in sk_fwrite() argument
138 return fwrite(buffer, 1, byteCount, f); in sk_fwrite()
154 bool sk_fseek(FILE* f, size_t byteCount) { in sk_fseek() argument
155 int err = fseek(f, (long)byteCount, SEEK_SET); in sk_fseek()
159 bool sk_fmove(FILE* f, long byteCount) { in sk_fmove() argument
[all …]
/external/okhttp/okhttp-ws/src/main/java/com/squareup/okhttp/internal/ws/
DWebSocketWriter.java183 private void writeFrame(PayloadType payloadType, Buffer source, long byteCount, in writeFrame() argument
213 if (byteCount <= PAYLOAD_MAX) { in writeFrame()
214 b1 |= (int) byteCount; in writeFrame()
216 } else if (byteCount <= 0xffffL) { // Unsigned short. in writeFrame()
219 sink.writeShort((int) byteCount); in writeFrame()
223 sink.writeLong(byteCount); in writeFrame()
228 writeAllMasked(source, byteCount); in writeFrame()
230 sink.write(source, byteCount); in writeFrame()
237 private void writeAllMasked(BufferedSource source, long byteCount) throws IOException { in writeAllMasked() argument
239 while (written < byteCount) { in writeAllMasked()
[all …]
/external/jetty/src/java/org/eclipse/jetty/util/
DIO.java179 long byteCount) in copy() argument
185 if (byteCount>=0) in copy()
187 while (byteCount>0) in copy()
189 int max = byteCount<bufferSize?(int)byteCount:bufferSize; in copy()
195 byteCount -= len; in copy()
216 long byteCount)
222 if (byteCount>=0)
224 while (byteCount>0)
226 if (byteCount<bufferSize)
227 len=in.read(buffer,0,(int)byteCount);
[all …]
/external/okhttp/okhttp/src/main/java/com/squareup/okhttp/internal/framed/
DFramedStream.java337 @Override public long read(Buffer sink, long byteCount) in read() argument
339 if (byteCount < 0) throw new IllegalArgumentException("byteCount < 0: " + byteCount); in read()
348 read = readBuffer.read(sink, Math.min(byteCount, readBuffer.size())); in read()
384 void receive(BufferedSource in, long byteCount) throws IOException { in receive() argument
387 while (byteCount > 0) { in receive()
392 flowControlError = byteCount + readBuffer.size() > maxByteCount; in receive()
397 in.skip(byteCount); in receive()
404 in.skip(byteCount); in receive()
409 long read = in.read(receiveBuffer, byteCount); in receive()
411 byteCount -= read; in receive()
[all …]
DHttp2.java430 long byteCount = hpackBuffer.size(); in pushPromise() local
431 int length = (int) Math.min(maxFrameSize - 4, byteCount); in pushPromise()
433 byte flags = byteCount == length ? FLAG_END_HEADERS : 0; in pushPromise()
438 if (byteCount > length) writeContinuationFrames(streamId, byteCount - length); in pushPromise()
445 long byteCount = hpackBuffer.size(); in headers() local
446 int length = (int) Math.min(maxFrameSize, byteCount); in headers()
448 byte flags = byteCount == length ? FLAG_END_HEADERS : 0; in headers()
453 if (byteCount > length) writeContinuationFrames(streamId, byteCount - length); in headers()
456 private void writeContinuationFrames(int streamId, long byteCount) throws IOException { in writeContinuationFrames() argument
457 while (byteCount > 0) { in writeContinuationFrames()
[all …]
/external/llvm/lib/Fuzzer/
DFuzzerSHA1.cpp54 uint32_t byteCount; member
88 s->byteCount = 0; in sha1_init()
148 ++s->byteCount; in sha1_writebyte()
167 sha1_addUncounted(s, s->byteCount >> 29); // Shifting to multiply by 8 in sha1_pad()
168 sha1_addUncounted(s, s->byteCount >> 21); // as SHA-1 supports bitstreams as well as in sha1_pad()
169 sha1_addUncounted(s, s->byteCount >> 13); // byte. in sha1_pad()
170 sha1_addUncounted(s, s->byteCount >> 5); in sha1_pad()
171 sha1_addUncounted(s, s->byteCount << 3); in sha1_pad()

12345