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

123

/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;
H A DPosix.java80 public native void mincore(long address, long byteCount, byte[] vector) throws ErrnoException; argument
82 public native void mlock(long address, long byteCount) throws ErrnoException; argument
83 public native long mmap(long address, long byteCount, int prot, int flags, FileDescriptor fd, long offset) throws ErrnoException; argument
84 public native void msync(long address, long byteCount, int flags) throws ErrnoException; argument
85 public native void munlock(long address, long byteCount) throws ErrnoException; argument
86 public native void munmap(long address, long byteCount) throws ErrnoException; argument
97 public int pread(FileDescriptor fd, byte[] bytes, int byteOffset, int byteCount, long offset) throws ErrnoException { argument
99 return preadBytes(fd, bytes, byteOffset, byteCount, offset);
101 private native int preadBytes(FileDescriptor fd, Object buffer, int bufferOffset, int byteCount, long offset) throws ErrnoException; argument
109 public int pwrite(FileDescriptor fd, byte[] bytes, int byteOffset, int byteCount, lon argument
113 pwriteBytes(FileDescriptor fd, Object buffer, int bufferOffset, int byteCount, long offset) argument
121 read(FileDescriptor fd, byte[] bytes, int byteOffset, int byteCount) argument
125 readBytes(FileDescriptor fd, Object buffer, int offset, int byteCount) argument
134 recvfrom(FileDescriptor fd, byte[] bytes, int byteOffset, int byteCount, int flags, InetSocketAddress srcAddress) argument
138 recvfromBytes(FileDescriptor fd, Object buffer, int byteOffset, int byteCount, int flags, InetSocketAddress srcAddress) argument
141 sendfile(FileDescriptor outFd, FileDescriptor inFd, MutableLong inOffset, long byteCount) argument
149 sendto(FileDescriptor fd, byte[] bytes, int byteOffset, int byteCount, int flags, InetAddress inetAddress, int port) argument
153 sendtoBytes(FileDescriptor fd, Object buffer, int byteOffset, int byteCount, int flags, InetAddress inetAddress, int port) argument
185 write(FileDescriptor fd, byte[] bytes, int byteOffset, int byteCount) argument
189 writeBytes(FileDescriptor fd, Object buffer, int offset, int byteCount) argument
[all...]
H A DStreams.java64 * Reads exactly 'byteCount' bytes from 'in' (into 'dst' at offset 'offset'), and throws
69 public static void readFully(InputStream in, byte[] dst, int offset, int byteCount) throws IOException { argument
70 if (byteCount == 0) {
79 Arrays.checkOffsetAndCount(dst.length, offset, byteCount);
80 while (byteCount > 0) {
81 int bytesRead = in.read(dst, offset, byteCount);
86 byteCount -= bytesRead;
139 * {@code byteCount} bytes have been read.
148 public static long skipByReading(InputStream in, long byteCount) throws IOException { argument
156 while (skipped < byteCount) {
[all...]
/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.java114 @Override public int read(byte[] buffer, int offset, int byteCount) throws IOException { argument
116 Arrays.checkOffsetAndCount(buffer.length, offset, 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);
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 DDeflaterOutputStream.java139 int byteCount;
140 while ((byteCount = def.deflate(buf)) != 0) {
141 out.write(buf, 0, byteCount);
177 int byteCount = def.deflate(buf);
178 out.write(buf, 0, byteCount);
188 * Compresses {@code byteCount} bytes of data from {@code buf} starting at
193 @Override public void write(byte[] buffer, int offset, int byteCount) throws IOException { argument
197 Arrays.checkOffsetAndCount(buffer.length, offset, byteCount);
201 def.setInput(buffer, offset, byteCount);
216 int byteCount;
[all...]
H A DInflaterInputStream.java134 * Reads up to {@code byteCount} bytes of decompressed data and stores it in
140 public int read(byte[] buffer, int offset, int byteCount) throws IOException { argument
142 Arrays.checkOffsetAndCount(buffer.length, offset, byteCount);
144 if (byteCount == 0) {
159 int result = inf.inflate(buffer, offset, byteCount);
207 * Skips up to {@code byteCount} bytes of uncompressed data.
209 * @param byteCount the number of bytes to skip.
211 * @throws IllegalArgumentException if {@code byteCount < 0}.
215 public long skip(long byteCount) throws IOException { argument
216 if (byteCount <
[all...]
/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);
/libcore/luni/src/main/java/java/io/
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.java246 * Reads at most {@code byteCount} bytes from this stream and stores them in
258 * if {@code offset < 0} or {@code byteCount < 0}, or if
259 * {@code offset + byteCount} is greater than the size of
266 public synchronized int read(byte[] buffer, int offset, int byteCount) throws IOException { argument
273 Arrays.checkOffsetAndCount(buffer.length, offset, byteCount);
274 if (byteCount == 0) {
285 int copylength = count - pos >= byteCount ? byteCount : count - pos;
288 if (copylength == byteCount || localIn.available() == 0) {
292 required = byteCount
368 skip(long byteCount) argument
[all...]
H A DByteArrayInputStream.java196 * Skips {@code byteCount} bytes in this InputStream. Subsequent
198 * used. This implementation skips {@code byteCount} number of bytes in the
199 * target stream. It does nothing and returns 0 if {@code byteCount} is negative.
204 public synchronized long skip(long byteCount) { argument
205 if (byteCount <= 0) {
209 pos = this.count - pos < byteCount ? this.count : (int) (pos + byteCount);
H A DObjectInput.java102 * Skips {@code byteCount} bytes on this stream. Less than {@code byteCount} byte are
110 public long skip(long byteCount) throws IOException; argument
/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
/libcore/luni/src/main/java/java/nio/
H A DHeapByteBuffer.java62 public final ByteBuffer get(byte[] dst, int dstOffset, int byteCount) { argument
63 checkGetBounds(1, dst.length, dstOffset, byteCount);
64 System.arraycopy(backingArray, offset + position, dst, dstOffset, byteCount);
65 position += byteCount;
70 int byteCount = checkGetBounds(SizeOf.CHAR, dst.length, dstOffset, charCount);
71 Memory.unsafeBulkGet(dst, dstOffset, byteCount, backingArray, offset + position, SizeOf.CHAR, order.needsSwap);
72 position += byteCount;
76 int byteCount = checkGetBounds(SizeOf.DOUBLE, dst.length, dstOffset, doubleCount);
77 Memory.unsafeBulkGet(dst, dstOffset, byteCount, backingArray, offset + position, SizeOf.DOUBLE, order.needsSwap);
78 position += byteCount;
[all...]
H A DReadWriteHeapByteBuffer.java109 public ByteBuffer put(byte[] src, int srcOffset, int byteCount) { argument
110 checkPutBounds(1, src.length, srcOffset, byteCount);
111 System.arraycopy(src, srcOffset, backingArray, offset + position, byteCount);
112 position += byteCount;
117 int byteCount = checkPutBounds(SizeOf.CHAR, src.length, srcOffset, charCount);
118 Memory.unsafeBulkPut(backingArray, offset + position, byteCount, src, srcOffset, SizeOf.CHAR, order.needsSwap);
119 position += byteCount;
123 int byteCount = checkPutBounds(SizeOf.DOUBLE, src.length, srcOffset, doubleCount);
124 Memory.unsafeBulkPut(backingArray, offset + position, byteCount, src, srcOffset, SizeOf.DOUBLE, order.needsSwap);
125 position += byteCount;
[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;
H A DDirectByteBuffer.java40 public final ByteBuffer get(byte[] dst, int dstOffset, int byteCount) { argument
41 checkGetBounds(1, dst.length, dstOffset, byteCount);
42 this.block.peekByteArray(offset + position, dst, dstOffset, byteCount);
43 position += byteCount;
48 int byteCount = checkGetBounds(SizeOf.CHAR, dst.length, dstOffset, charCount);
50 position += byteCount;
54 int byteCount = checkGetBounds(SizeOf.DOUBLE, dst.length, dstOffset, doubleCount);
56 position += byteCount;
60 int byteCount = checkGetBounds(SizeOf.FLOAT, dst.length, dstOffset, floatCount);
62 position += byteCount;
[all...]
H A DReadWriteDirectByteBuffer.java99 public ByteBuffer put(byte[] src, int srcOffset, int byteCount) { argument
100 checkPutBounds(1, src.length, srcOffset, byteCount);
101 this.block.pokeByteArray(offset + position, src, srcOffset, byteCount);
102 position += byteCount;
107 int byteCount = checkPutBounds(SizeOf.CHAR, src.length, srcOffset, charCount);
109 position += byteCount;
113 int byteCount = checkPutBounds(SizeOf.DOUBLE, src.length, srcOffset, doubleCount);
115 position += byteCount;
119 int byteCount = checkPutBounds(SizeOf.FLOAT, src.length, srcOffset, floatCount);
121 position += byteCount;
[all...]
H A DMemoryBlock.java34 private MemoryMappedBlock(int address, long byteCount) { argument
35 super(address, byteCount);
66 private NonMovableHeapBlock(byte[] array, int address, long byteCount) { argument
67 super(address, byteCount);
86 private UnmanagedBlock(int address, long byteCount) { argument
87 super(address, byteCount);
124 public static MemoryBlock allocate(int byteCount) { argument
126 byte[] array = (byte[]) runtime.newNonMovableArray(byte.class, byteCount);
128 return new NonMovableHeapBlock(array, address, byteCount);
131 public static MemoryBlock wrapFromJni(int address, long byteCount) { argument
152 pokeByteArray(int offset, byte[] src, int srcOffset, int byteCount) argument
184 peekByteArray(int offset, byte[] dst, int dstOffset, int byteCount) argument
[all...]
/libcore/luni/src/main/java/javax/crypto/
H A DCipherInputStream.java102 int byteCount = in.read(inputBuffer);
103 if (byteCount == -1) {
113 outputLength = cipher.update(inputBuffer, 0, byteCount, outputBuffer, 0);
155 public long skip(long byteCount) throws IOException { argument
156 return Streams.skipByReading(this, byteCount);

Completed in 887 milliseconds

123