Home
last modified time | relevance | path

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

12345678

/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 …]
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 …]
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
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 …]
/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 …]
DRealBufferedSink.java43 @Override public void write(Buffer source, long byteCount) in write() argument
46 buffer.write(source, byteCount); in write()
94 @Override public BufferedSink write(byte[] source, int offset, int byteCount) throws IOException { in write() argument
96 buffer.write(source, offset, byteCount); in write()
110 @Override public BufferedSink write(Source source, long byteCount) throws IOException { in write() argument
111 while (byteCount > 0) { in write()
112 long read = source.read(buffer, byteCount); in write()
114 byteCount -= read; in write()
176 long byteCount = buffer.completeSegmentByteCount(); in emitCompleteSegments() local
177 if (byteCount > 0) sink.write(buffer, byteCount); in emitCompleteSegments()
[all …]
DGzipSink.java67 @Override public void write(Buffer source, long byteCount) throws IOException { in write() argument
68 if (byteCount < 0) throw new IllegalArgumentException("byteCount < 0: " + byteCount); in write()
69 if (byteCount == 0) return; in write()
71 updateCrc(source, byteCount); in write()
72 deflaterSink.write(source, byteCount); in write()
132 private void updateCrc(Buffer buffer, long byteCount) { in updateCrc() argument
133 for (Segment head = buffer.head; byteCount > 0; head = head.next) { in updateCrc()
134 int segmentLength = (int) Math.min(byteCount, head.limit - head.pos); in updateCrc()
136 byteCount -= segmentLength; in updateCrc()
DBufferedSource.java44 void require(long byteCount) throws IOException; in require() argument
51 boolean request(long byteCount) throws IOException; in request() argument
97 void skip(long byteCount) throws IOException; in skip() argument
103 ByteString readByteString(long byteCount) throws IOException; in readByteString() argument
109 byte[] readByteArray(long byteCount) throws IOException; in readByteArray() argument
127 int read(byte[] sink, int offset, int byteCount) throws IOException; in read() argument
134 void readFully(Buffer sink, long byteCount) throws IOException; in readFully() argument
150 String readUtf8(long byteCount) throws IOException; in readUtf8() argument
201 String readString(long byteCount, Charset charset) throws IOException; in readString() argument
DSegmentedByteString.java55 SegmentedByteString(Buffer buffer, int byteCount) { in SegmentedByteString() argument
57 checkOffsetAndCount(buffer.size, 0, byteCount); in SegmentedByteString()
62 for (Segment s = buffer.head; offset < byteCount; s = s.next) { in SegmentedByteString()
75 for (Segment s = buffer.head; offset < byteCount; s = s.next) { in SegmentedByteString()
186 int offset, ByteString other, int otherOffset, int byteCount) { in rangeEquals() argument
187 if (offset > size() - byteCount) return false; in rangeEquals()
189 for (int s = segment(offset); byteCount > 0; s++) { in rangeEquals()
192 int stepSize = Math.min(byteCount, segmentOffset + segmentSize - offset); in rangeEquals()
198 byteCount -= stepSize; in rangeEquals()
203 @Override public boolean rangeEquals(int offset, byte[] other, int otherOffset, int byteCount) { in rangeEquals() argument
[all …]
DByteString.java76 public static ByteString of(byte[] data, int offset, int byteCount) { in of() argument
78 checkOffsetAndCount(data.length, offset, byteCount); in of()
80 byte[] copy = new byte[byteCount]; in of()
81 System.arraycopy(data, offset, copy, 0, byteCount); in of()
183 public static ByteString read(InputStream in, int byteCount) throws IOException { in read() argument
185 if (byteCount < 0) throw new IllegalArgumentException("byteCount < 0: " + byteCount); in read()
187 byte[] result = new byte[byteCount]; in read()
188 for (int offset = 0, read; offset < byteCount; offset += read) { in read()
189 read = in.read(result, offset, byteCount - offset); in read()
311 public boolean rangeEquals(int offset, ByteString other, int otherOffset, int byteCount) { in rangeEquals() argument
[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/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 …]
/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 …]
DCFBBlockCipher.java26 private int byteCount; field in CFBBlockCipher
126 if (byteCount == 0) in encryptByte()
131 byte rv = (byte)(cfbOutV[byteCount] ^ in); in encryptByte()
132 inBuf[byteCount++] = rv; in encryptByte()
134 if (byteCount == blockSize) in encryptByte()
136 byteCount = 0; in encryptByte()
147 if (byteCount == 0) in decryptByte()
152 inBuf[byteCount] = in; in decryptByte()
153 byte rv = (byte)(cfbOutV[byteCount++] ^ in); in decryptByte()
155 if (byteCount == blockSize) in decryptByte()
[all …]
/external/okhttp/okhttp/src/main/java/com/squareup/okhttp/internal/http/
DHttp1xStream.java281 @Override public void write(Buffer source, long byteCount) throws IOException { in write() argument
283 checkOffsetAndCount(source.size(), 0, byteCount); in write() local
284 if (byteCount > bytesRemaining) { in write()
286 + " bytes but received " + byteCount); in write()
288 sink.write(source, byteCount); in write()
289 bytesRemaining -= byteCount; in write()
319 @Override public void write(Buffer source, long byteCount) throws IOException { in write() argument
321 if (byteCount == 0) return; in write()
323 sink.writeHexadecimalUnsignedLong(byteCount); in write()
325 sink.write(source, byteCount); in write()
[all …]
/external/okhttp/repackaged/okhttp/src/main/java/com/android/okhttp/internal/http/
DHttp1xStream.java283 @Override public void write(Buffer source, long byteCount) throws IOException { in write() argument
285 checkOffsetAndCount(source.size(), 0, byteCount); in write() local
286 if (byteCount > bytesRemaining) { in write()
288 + " bytes but received " + byteCount); in write()
290 sink.write(source, byteCount); in write()
291 bytesRemaining -= byteCount; in write()
321 @Override public void write(Buffer source, long byteCount) throws IOException { in write() argument
323 if (byteCount == 0) return; in write()
325 sink.writeHexadecimalUnsignedLong(byteCount); in write()
327 sink.write(source, byteCount); in write()
[all …]
/external/bouncycastle/repackaged/bcprov/src/main/java/com/android/org/bouncycastle/crypto/digests/
DGeneralDigest.java21 private long byteCount; field in GeneralDigest
45 byteCount = Pack.bigEndianToLong(encodedState, 8); in GeneralDigest()
53 byteCount = t.byteCount; in copyIn()
67 byteCount++; in update()
112 byteCount += len; in update()
117 long bitLength = (byteCount << 3); in finish()
136 byteCount = 0; in reset()
149 Pack.longToBigEndian(byteCount, state, 8); in populateState()
/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-ws/src/main/java/com/squareup/okhttp/internal/ws/
DWebSocketWriter.java173 private void writeMessageFrameSynchronized(int formatOpcode, long byteCount, boolean isFirstFrame, in writeMessageFrameSynchronized() argument
190 if (byteCount <= PAYLOAD_BYTE_MAX) { in writeMessageFrameSynchronized()
191 b1 |= (int) byteCount; in writeMessageFrameSynchronized()
193 } else if (byteCount <= PAYLOAD_SHORT_MAX) { in writeMessageFrameSynchronized()
196 sink.writeShort((int) byteCount); in writeMessageFrameSynchronized()
200 sink.writeLong(byteCount); in writeMessageFrameSynchronized()
205 writeMaskedSynchronized(buffer, byteCount); in writeMessageFrameSynchronized()
207 sink.write(buffer, byteCount); in writeMessageFrameSynchronized()
213 private void writeMaskedSynchronized(BufferedSource source, long byteCount) throws IOException { in writeMaskedSynchronized() argument
217 while (written < byteCount) { in writeMaskedSynchronized()
[all …]

12345678