Searched refs:byteCount (Results 1 - 25 of 78) sorted by relevance

1234

/libcore/luni/src/main/java/libcore/io/
H A DHeapBufferIterator.java30 private final int byteCount; field in class:HeapBufferIterator
35 HeapBufferIterator(byte[] buffer, int offset, int byteCount, ByteOrder order) { argument
38 this.byteCount = byteCount;
46 public void skip(int byteCount) { argument
47 position += byteCount;
50 public void readByteArray(byte[] dst, int dstOffset, int byteCount) { argument
51 System.arraycopy(buffer, offset + position, dst, dstOffset, byteCount);
52 position += byteCount;
68 final int byteCount
83 iterator(byte[] buffer, int offset, int byteCount, ByteOrder order) argument
[all...]
H A DBufferIterator.java32 * Skips forwards or backwards {@code byteCount} bytes from the current position.
34 public abstract void skip(int byteCount); argument
37 * Copies {@code byteCount} bytes from the current position into {@code dst}, starting at
38 * {@code dstOffset}, and advances the current position {@code byteCount} bytes.
40 public abstract void readByteArray(byte[] dst, int dstOffset, int byteCount); argument
H A DNioBufferIterator.java44 public void skip(int byteCount) { argument
45 position += byteCount;
48 public void readByteArray(byte[] dst, int dstOffset, int byteCount) { argument
49 Memory.peekByteArray(address + position, dst, dstOffset, byteCount);
50 position += byteCount;
/libcore/luni/src/main/java/java/util/zip/
H A DCRC32.java71 * starting from {@code offset} and reading {@code byteCount} bytes of data.
73 public void update(byte[] buf, int offset, int byteCount) { argument
74 Arrays.checkOffsetAndCount(buf.length, offset, byteCount);
75 tbytes += byteCount;
76 crc = updateImpl(buf, offset, byteCount, crc);
79 private native long updateImpl(byte[] buf, int offset, int byteCount, long crc1); argument
H A DAdler32.java70 * starting from {@code offset} and reading {@code byteCount} bytes of data.
72 public void update(byte[] buf, int offset, int byteCount) { argument
73 Arrays.checkOffsetAndCount(buf.length, offset, byteCount);
74 adler = updateImpl(buf, offset, byteCount, adler);
77 private native long updateImpl(byte[] buf, int offset, int byteCount, long adler1); argument
H A DInflater.java209 * Inflates up to {@code byteCount} bytes from the current input and stores them in
217 public synchronized int inflate(byte[] buf, int offset, int byteCount) throws DataFormatException { argument
218 Arrays.checkOffsetAndCount(buf.length, offset, byteCount);
228 int result = inflateImpl(buf, offset, byteCount, streamHandle);
235 private native int inflateImpl(byte[] buf, int offset, int byteCount, long handle); argument
279 * starting at {@code offset} and continuing for {@code byteCount} bytes. See {@link
282 public synchronized void setDictionary(byte[] dictionary, int offset, int byteCount) { argument
284 Arrays.checkOffsetAndCount(dictionary.length, offset, byteCount);
285 setDictionaryImpl(dictionary, offset, byteCount, streamHandle);
288 private native void setDictionaryImpl(byte[] dictionary, int offset, int byteCount, lon argument
302 setInput(byte[] buf, int offset, int byteCount) argument
310 setInputImpl(byte[] buf, int offset, int byteCount, long handle) argument
312 setFileInput(FileDescriptor fd, long offset, int byteCount) argument
319 setFileInputImpl(FileDescriptor fd, long offset, int byteCount, long handle) argument
[all...]
H A DDeflaterInputStream.java109 * Reads up to {@code byteCount} bytes of compressed data into a byte buffer. The result will be bytes of compressed
114 @Override public int read(byte[] buffer, int byteOffset, int byteCount) throws IOException { argument
116 Arrays.checkOffsetAndCount(buffer.length, byteOffset, byteCount);
117 if (byteCount == 0) {
126 while (count < byteCount && !def.finished()) {
136 int bytesDeflated = def.deflate(buf, 0, Math.min(buf.length, byteCount - count));
156 public long skip(long byteCount) throws IOException { argument
157 byteCount = Math.min(Integer.MAX_VALUE, byteCount);
158 return Streams.skipByReading(this, byteCount);
[all...]
H A DDeflater.java41 * int byteCount = deflater.deflate(buf);
42 * baos.write(buf, 0, byteCount);
211 public synchronized int deflate(byte[] buf, int offset, int byteCount) { argument
212 return deflateImpl(buf, offset, byteCount, flushParm);
221 * equals {@code byteCount}, the number of bytes of input to be flushed
228 public synchronized int deflate(byte[] buf, int offset, int byteCount, int flush) { argument
232 return deflateImpl(buf, offset, byteCount, flush);
235 private synchronized int deflateImpl(byte[] buf, int offset, int byteCount, int flush) { argument
237 Arrays.checkOffsetAndCount(buf.length, offset, byteCount);
241 return deflateImpl(buf, offset, byteCount, streamHandl
244 deflateImpl(byte[] buf, int offset, int byteCount, long handle, int flushParm) argument
380 setDictionary(byte[] buf, int offset, int byteCount) argument
386 setDictionaryImpl(byte[] buf, int offset, int byteCount, long handle) argument
400 setInput(byte[] buf, int offset, int byteCount) argument
414 setInputImpl(byte[] buf, int offset, int byteCount, long handle) argument
[all...]
H A DCheckedInputStream.java71 * Reads up to {@code byteCount} bytes of data from the underlying input stream, storing it
81 public int read(byte[] buffer, int byteOffset, int byteCount) throws IOException { argument
82 int bytesRead = in.read(buffer, byteOffset, byteCount);
97 * Skip up to {@code byteCount} bytes of data on the underlying input
100 * @param byteCount the number of bytes to skip.
105 public long skip(long byteCount) throws IOException { argument
106 return Streams.skipByReading(this, byteCount);
H A DDeflaterOutputStream.java116 int byteCount;
117 while ((byteCount = def.deflate(buf)) != 0) {
118 out.write(buf, 0, byteCount);
154 int byteCount = def.deflate(buf);
155 out.write(buf, 0, byteCount);
165 * Compresses {@code byteCount} bytes of data from {@code buf} starting at
170 @Override public void write(byte[] buffer, int offset, int byteCount) throws IOException { argument
174 Arrays.checkOffsetAndCount(buffer.length, offset, byteCount);
178 def.setInput(buffer, offset, byteCount);
192 int byteCount;
[all...]
H A DInflaterInputStream.java134 * Reads up to {@code byteCount} bytes of decompressed data and stores it in
139 public int read(byte[] buffer, int byteOffset, int byteCount) throws IOException { argument
141 Arrays.checkOffsetAndCount(buffer.length, byteOffset, byteCount);
143 if (byteCount == 0) {
158 int result = inf.inflate(buffer, byteOffset, byteCount);
201 * Skips up to {@code byteCount} bytes of uncompressed data.
203 * @param byteCount the number of bytes to skip.
205 * @throws IllegalArgumentException if {@code byteCount < 0}.
209 public long skip(long byteCount) throws IOException { argument
210 if (byteCount <
[all...]
/libcore/luni/src/main/java/java/io/
H A DInputStream.java166 * Reads up to {@code byteCount} bytes from this stream and stores them in
172 * if {@code byteOffset < 0 || byteCount < 0 || byteOffset + byteCount > buffer.length}.
176 public int read(byte[] buffer, int byteOffset, int byteCount) throws IOException { argument
177 Arrays.checkOffsetAndCount(buffer.length, byteOffset, byteCount);
178 for (int i = 0; i < byteCount; ++i) {
192 return byteCount;
221 * @param byteCount the number of bytes to skip.
226 public long skip(long byteCount) throws IOException { argument
227 return Streams.skipByReading(this, byteCount);
[all...]
H A DByteArrayInputStream.java144 @Override public synchronized int read(byte[] buffer, int byteOffset, int byteCount) { argument
145 Arrays.checkOffsetAndCount(buffer.length, byteOffset, byteCount);
151 if (byteCount == 0) {
155 int copylen = this.count - pos < byteCount ? this.count - pos : byteCount;
174 * Skips {@code byteCount} bytes in this InputStream. Subsequent
176 * used. This implementation skips {@code byteCount} number of bytes in the
177 * target stream. It does nothing and returns 0 if {@code byteCount} is negative.
182 public synchronized long skip(long byteCount) { argument
183 if (byteCount <
[all...]
H A DObjectInput.java68 * Reads up to {@code byteCount} bytes from this stream and stores them in
76 public int read(byte[] buffer, int byteOffset, int byteCount) throws IOException; argument
91 * Skips {@code byteCount} bytes on this stream. Less than {@code byteCount} byte are
99 public long skip(long byteCount) throws IOException; argument
H A DPushbackInputStream.java150 * Reads up to {@code byteCount} bytes from this stream and stores them in
153 * are required. Blocks until {@code byteCount} bytes have been read, the end of
158 * if {@code byteOffset < 0 || byteCount < 0 || byteOffset + byteCount > buffer.length}.
166 public int read(byte[] buffer, int byteOffset, int byteCount) throws IOException { argument
170 Arrays.checkOffsetAndCount(buffer.length, byteOffset, byteCount);
174 copyLength = (buf.length - pos >= byteCount) ? byteCount : buf.length - pos;
182 if (copyLength == byteCount) {
183 return byteCount;
208 skip(long byteCount) argument
[all...]
H A DFilterInputStream.java117 @Override public int read(byte[] buffer, int byteOffset, int byteCount) throws IOException { argument
118 return in.read(buffer, byteOffset, byteCount);
138 * Skips {@code byteCount} bytes in this stream. Subsequent
140 * used. This implementation skips {@code byteCount} bytes in the
150 public long skip(long byteCount) throws IOException { argument
151 return in.skip(byteCount);
H A DFileInputStream.java178 @Override public int read(byte[] buffer, int byteOffset, int byteCount) throws IOException { argument
179 return IoBridge.read(fd, buffer, byteOffset, byteCount);
183 public long skip(long byteCount) throws IOException { argument
184 if (byteCount < 0) {
185 throw new IOException("byteCount < 0: " + byteCount);
190 Libcore.os.lseek(fd, byteCount, SEEK_CUR);
191 return byteCount;
195 return super.skip(byteCount);
H A DBufferedInputStream.java245 @Override public synchronized int read(byte[] buffer, int byteOffset, int byteCount) throws IOException { argument
252 Arrays.checkOffsetAndCount(buffer.length, byteOffset, byteCount);
253 if (byteCount == 0) {
264 int copylength = count - pos >= byteCount ? byteCount : count - pos;
267 if (copylength == byteCount || localIn.available() == 0) {
271 required = byteCount - copylength;
273 required = byteCount;
285 return required == byteCount ? -1 : byteCount
347 skip(long byteCount) argument
[all...]
H A DLineNumberInputStream.java141 * Reads up to {@code byteCount} bytes from the filtered stream and stores
152 * if {@code byteOffset < 0 || byteCount < 0 || byteOffset + byteCount > buffer.length}.
159 public int read(byte[] buffer, int byteOffset, int byteCount) throws IOException { argument
160 Arrays.checkOffsetAndCount(buffer.length, byteOffset, byteCount);
161 for (int i = 0; i < byteCount; ++i) {
176 return byteCount;
214 * used. This implementation skips {@code byteCount} bytes in the
218 * @param byteCount
228 public long skip(long byteCount) throw argument
[all...]
H A DStringBufferInputStream.java81 @Override public synchronized int read(byte[] buffer, int byteOffset, int byteCount) { argument
85 Arrays.checkOffsetAndCount(buffer.length, byteOffset, byteCount);
86 if (byteCount == 0) {
90 int copylen = count - pos < byteCount ? count - pos : byteCount;
/libcore/luni/src/main/java/javax/crypto/spec/
H A DIvParameterSpec.java52 * Creates a new <code>IvParameterSpec</code> instance with <code>byteCount</code>
58 * <code>byteCount</code> do not specify a valid chunk in the
61 * if <code>offset</code> or <code>byteCount</code> are negative.
63 public IvParameterSpec(byte[] iv, int offset, int byteCount) { argument
64 if ((iv == null) || (iv.length - offset < byteCount)) {
67 Arrays.checkOffsetAndCount(iv.length, offset, byteCount);
68 this.iv = new byte[byteCount];
69 System.arraycopy(iv, offset, this.iv, 0, byteCount);
H A DGCMParameterSpec.java43 * {@code offset} and {@code byteCount} do not specify a valid
59 * (IV) of {@code byteCount} bytes from the specified buffer {@code iv}
63 * {@code offset} and {@code byteCount} do not specify a valid
66 * {@code byteCount} are negative.
68 public GCMParameterSpec(int tagLen, byte[] iv, int offset, int byteCount) { argument
76 Arrays.checkOffsetAndCount(iv.length, offset, byteCount);
81 this.iv = Arrays.copyOfRange(iv, offset, offset + byteCount);
/libcore/luni/src/main/java/java/nio/
H A DByteArrayBuffer.java107 @Override public final ByteBuffer get(byte[] dst, int dstOffset, int byteCount) { argument
108 checkGetBounds(1, dst.length, dstOffset, byteCount);
109 System.arraycopy(backingArray, arrayOffset + position, dst, dstOffset, byteCount);
110 position += byteCount;
115 int byteCount = checkGetBounds(SizeOf.CHAR, dst.length, dstOffset, charCount);
116 Memory.unsafeBulkGet(dst, dstOffset, byteCount, backingArray, arrayOffset + position, SizeOf.CHAR, order.needsSwap);
117 position += byteCount;
121 int byteCount = checkGetBounds(SizeOf.DOUBLE, dst.length, dstOffset, doubleCount);
122 Memory.unsafeBulkGet(dst, dstOffset, byteCount, backingArray, arrayOffset + position, SizeOf.DOUBLE, order.needsSwap);
123 position += byteCount;
262 put(byte[] src, int srcOffset, int byteCount) argument
[all...]
H A DIoVec.java88 void didTransfer(int byteCount) { argument
89 for (int i = 0; byteCount > 0 && i < bufferCount; ++i) {
91 if (byteCounts[i] < byteCount) {
93 byteCount -= byteCounts[i];
95 b.position((direction == Direction.WRITEV ? b.position() : 0) + byteCount);
96 byteCount = 0;
/libcore/luni/src/main/java/libcore/net/
H A DRawSocket.java50 int offset, int byteCount);
52 int offset, int byteCount, int destPort, int timeoutMillis);
80 public int read(byte[] packet, int offset, int byteCount, int destPort, argument
86 Arrays.checkOffsetAndCount(packet.length, offset, byteCount);
93 return recvPacket(fd, packet, offset, byteCount, destPort,
103 public int write(byte[] destMac, byte[] packet, int offset, int byteCount) { argument
112 Arrays.checkOffsetAndCount(packet.length, offset, byteCount);
120 offset, byteCount);
48 sendPacket(FileDescriptor fd, String interfaceName, short protocolType, byte[] destMac, byte[] packet, int offset, int byteCount) argument
51 recvPacket(FileDescriptor fd, byte[] packet, int offset, int byteCount, int destPort, int timeoutMillis) argument

Completed in 380 milliseconds

1234