Home
last modified time | relevance | path

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

12

/libcore/luni/src/main/java/libcore/io/
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 …]
DLinux.java126 public native void mincore(long address, long byteCount, byte[] vector) throws ErrnoException; in mincore() argument
129 public native void mlock(long address, long byteCount) throws ErrnoException; in mlock() argument
130 …public native long mmap(long address, long byteCount, int prot, int flags, FileDescriptor fd, long… in mmap() argument
131 public native void msync(long address, long byteCount, int flags) throws ErrnoException; in msync() argument
132 public native void munlock(long address, long byteCount) throws ErrnoException; in munlock() argument
133 public native void munmap(long address, long byteCount) throws ErrnoException; in munmap() argument
152 …public int pread(FileDescriptor fd, byte[] bytes, int byteOffset, int byteCount, long offset) thro… in pread() argument
154 return preadBytes(fd, bytes, byteOffset, byteCount, offset); in pread()
156 …private native int preadBytes(FileDescriptor fd, Object buffer, int bufferOffset, int byteCount, l… in preadBytes() argument
170 …public int pwrite(FileDescriptor fd, byte[] bytes, int byteOffset, int byteCount, long offset) thr… in pwrite() argument
[all …]
DStreams.java109 …public static void readFully(InputStream in, byte[] dst, int offset, int byteCount) throws IOExcep… in readFully() argument
110 if (byteCount == 0) { in readFully()
119 ArrayUtils.throwsIfOutOfBounds(dst.length, offset, byteCount); in readFully()
120 while (byteCount > 0) { in readFully()
121 int bytesRead = in.read(dst, offset, byteCount); in readFully()
126 byteCount -= bytesRead; in readFully()
225 public static long skipByReading(@NonNull InputStream in, long byteCount) throws IOException { in skipByReading() argument
233 while (skipped < byteCount) { in skipByReading()
234 int toRead = (int) Math.min(byteCount - skipped, buffer.length); in skipByReading()
DIoTracker.java31 public void trackIo(int byteCount) { in trackIo() argument
33 totalByteCount += byteCount; in trackIo()
40 public void trackIo(int byteCount, Mode mode) { in trackIo() argument
45 trackIo(byteCount); in trackIo()
DForwardingOs.java485 …blic void mincore(long address, long byteCount, byte[] vector) throws ErrnoException { os.mincore(… in mincore() argument
502 …public void mlock(long address, long byteCount) throws ErrnoException { os.mlock(address, byteCoun… in mlock() argument
507 …g address, long byteCount, int prot, int flags, FileDescriptor fd, long offset) throws ErrnoExcept… in mmap() argument
512 …public void msync(long address, long byteCount, int flags) throws ErrnoException { os.msync(addres… in msync() argument
517 …public void munlock(long address, long byteCount) throws ErrnoException { os.munlock(address, byte… in munlock() argument
522 …public void munmap(long address, long byteCount) throws ErrnoException { os.munmap(address, byteCo… in munmap() argument
593 …byteOffset, int byteCount, long offset) throws ErrnoException, InterruptedIOException { return os.… in pread() argument
603 …byteOffset, int byteCount, long offset) throws ErrnoException, InterruptedIOException { return os.… in pwrite() argument
613 …s, int byteOffset, int byteCount) throws ErrnoException, InterruptedIOException { return os.read(f… in read() argument
639 …int byteCount, int flags, InetSocketAddress srcAddress) throws ErrnoException, SocketException { r… in recvfrom() argument
[all …]
DOs.java423 public void mincore(long address, long byteCount, byte[] vector) throws ErrnoException; in mincore() argument
438 public void mlock(long address, long byteCount) throws ErrnoException; in mlock() argument
444 …public long mmap(long address, long byteCount, int prot, int flags, FileDescriptor fd, long offset… in mmap() argument
449 public void msync(long address, long byteCount, int flags) throws ErrnoException; in msync() argument
454 public void munlock(long address, long byteCount) throws ErrnoException; in munlock() argument
460 public void munmap(long address, long byteCount) throws ErrnoException; in munmap() argument
497 …public int pread(FileDescriptor fd, byte[] bytes, int byteOffset, int byteCount, long offset) thro… in pread() argument
507 …public int pwrite(FileDescriptor fd, byte[] bytes, int byteOffset, int byteCount, long offset) thr… in pwrite() argument
518 …public int read(FileDescriptor fd, byte[] bytes, int byteOffset, int byteCount) throws ErrnoExcept… in read() argument
543 …public int recvfrom(FileDescriptor fd, byte[] bytes, int byteOffset, int byteCount, int flags, Ine… in recvfrom() argument
[all …]
DBlockGuardOs.java299 …@Override public int pread(FileDescriptor fd, byte[] bytes, int byteOffset, int byteCount, long of… in pread() argument
301 return super.pread(fd, bytes, byteOffset, byteCount, offset); in pread()
311 …@Override public int pwrite(FileDescriptor fd, byte[] bytes, int byteOffset, int byteCount, long o… in pwrite() argument
313 return super.pwrite(fd, bytes, byteOffset, byteCount, offset); in pwrite()
323 …@Override public int read(FileDescriptor fd, byte[] bytes, int byteOffset, int byteCount) throws E… in read() argument
325 return super.read(fd, bytes, byteOffset, byteCount); in read()
353 …@Override public int recvfrom(FileDescriptor fd, byte[] bytes, int byteOffset, int byteCount, int … in recvfrom() argument
355 return super.recvfrom(fd, bytes, byteOffset, byteCount, flags, srcAddress); in recvfrom()
378 …ndfile(FileDescriptor outFd, FileDescriptor inFd, Int64Ref offset, long byteCount) throws ErrnoExc… in sendfile() argument
380 return super.sendfile(outFd, inFd, offset, byteCount); in sendfile()
[all …]
DIoBridge.java598 …(@NonNull FileDescriptor fd, @NonNull byte[] bytes, int byteOffset, int byteCount) throws IOExcept… in read() argument
599 ArrayUtils.throwsIfOutOfBounds(bytes.length, byteOffset, byteCount); in read()
600 if (byteCount == 0) { in read()
604 int readCount = Libcore.os.read(fd, bytes, byteOffset, byteCount); in read()
639 …(@NonNull FileDescriptor fd,@NonNull byte[] bytes, int byteOffset, int byteCount) throws IOExcept… in write() argument
640 ArrayUtils.throwsIfOutOfBounds(bytes.length, byteOffset, byteCount); in write()
641 if (byteCount == 0) { in write()
645 while (byteCount > 0) { in write()
646 int bytesWritten = Libcore.os.write(fd, bytes, byteOffset, byteCount); in write()
647 byteCount -= bytesWritten; in write()
[all …]
DBufferIterator.java39 public abstract void skip(int byteCount); in skip() argument
53 public abstract void readByteArray(byte[] bytes, int arrayOffset, int byteCount); in readByteArray() argument
DMemory.java46 public static native void unsafeBulkGet(Object dst, int dstOffset, int byteCount, in unsafeBulkGet() argument
54 public static native void unsafeBulkPut(byte[] dst, int dstOffset, int byteCount, in unsafeBulkPut() argument
236 …NonNull Object dstObject, int dstOffset, @NonNull Object srcObject, int srcOffset, long byteCount); in memmove() argument
291 public static native void peekByteArray(long address, byte[] dst, int dstOffset, int byteCount); in peekByteArray() argument
/libcore/libart/src/main/java/java/lang/
DStringFactory.java67 public static String newStringFromBytes(byte[] data, int offset, int byteCount) { in newStringFromBytes() argument
68 return newStringFromBytes(data, offset, byteCount, Charset.defaultCharset()); in newStringFromBytes()
72 … public static native String newStringFromBytes(byte[] data, int high, int offset, int byteCount); in newStringFromBytes() argument
74 …public static String newStringFromBytes(byte[] data, int offset, int byteCount, String charsetName… in newStringFromBytes() argument
75 return newStringFromBytes(data, offset, byteCount, Charset.forNameUEE(charsetName)); in newStringFromBytes()
83 … public static String newStringFromBytes(byte[] data, int offset, int byteCount, Charset charset) { in newStringFromBytes() argument
84 if ((offset | byteCount) < 0 || byteCount > data.length - offset) { in newStringFromBytes()
85 throw new StringIndexOutOfBoundsException(data.length, offset, byteCount); in newStringFromBytes()
94 return newStringFromUtf8Bytes(data, offset, byteCount); in newStringFromBytes()
96 return newStringFromBytes(data, /*high=*/ 0, offset, byteCount); in newStringFromBytes()
[all …]
/libcore/luni/src/main/java/android/system/
DOs.java454 … void mincore(long address, long byteCount, byte[] vector) throws ErrnoException { Libcore.os.minc… in mincore() argument
469 …lic static void mlock(long address, long byteCount) throws ErrnoException { Libcore.os.mlock(addre… in mlock() argument
474 …dress, long byteCount, int prot, int flags, FileDescriptor fd, long offset) throws ErrnoException … in mmap() argument
479 …tatic void msync(long address, long byteCount, int flags) throws ErrnoException { Libcore.os.msync… in msync() argument
484 … static void munlock(long address, long byteCount) throws ErrnoException { Libcore.os.munlock(addr… in munlock() argument
489 …ic static void munmap(long address, long byteCount) throws ErrnoException { Libcore.os.munmap(addr… in munmap() argument
551 …Offset, int byteCount, long offset) throws ErrnoException, InterruptedIOException { return Libcore… in pread() argument
561 …Offset, int byteCount, long offset) throws ErrnoException, InterruptedIOException { return Libcore… in pwrite() argument
571 …nt byteOffset, int byteCount) throws ErrnoException, InterruptedIOException { return Libcore.os.re… in read() argument
614byteCount, int flags, InetSocketAddress srcAddress) throws ErrnoException, SocketException { retur… in recvfrom() argument
[all …]
/libcore/luni/src/main/native/
Dlibcore_io_Memory.cpp184 static void unsafeBulkCopy(jbyte* dst, const jbyte* src, jint byteCount, in unsafeBulkCopy() argument
187 memcpy(dst, src, byteCount); in unsafeBulkCopy()
194 swapShorts(dstShorts, srcShorts, byteCount / 2); in unsafeBulkCopy()
198 swapInts(dstInts, srcInts, byteCount / 4); in unsafeBulkCopy()
202 swapLongs(dstLongs, srcLongs, byteCount / 8); in unsafeBulkCopy()
207 jint byteCount, jbyteArray srcArray, jint srcOffset, jint sizeofElement, jboolean swap) { in Memory_unsafeBulkGet() argument
219 unsafeBulkCopy(dst, src, byteCount, sizeofElement, swap); in Memory_unsafeBulkGet()
224 jint byteCount, jobject srcObject, jint srcOffset, jint sizeofElement, jboolean swap) { in Memory_unsafeBulkPut() argument
236 unsafeBulkCopy(dst, src, byteCount, sizeofElement, swap); in Memory_unsafeBulkPut()
Dlibcore_io_Linux.cpp826 socklen_t byteCount = sizeof(ss); in doGetSockName() local
827 memset(&ss, 0, byteCount); in doGetSockName()
828 int rc = is_sockname ? TEMP_FAILURE_RETRY(getsockname(fd, sa, &byteCount)) in doGetSockName()
829 : TEMP_FAILURE_RETRY(getpeername(fd, sa, &byteCount)); in doGetSockName()
834 return makeSocketAddress(env, ss, byteCount); in doGetSockName()
1921 static void Linux_mincore(JNIEnv* env, jobject, jlong address, jlong byteCount, jbyteArray javaVect… in Linux_mincore() argument
1928 throwIfMinusOne(env, "mincore", TEMP_FAILURE_RETRY(mincore(ptr, byteCount, vec))); in Linux_mincore()
1947 static void Linux_mlock(JNIEnv* env, jobject, jlong address, jlong byteCount) { in Linux_mlock() argument
1949 throwIfMinusOne(env, "mlock", TEMP_FAILURE_RETRY(mlock(ptr, byteCount))); in Linux_mlock()
1952 static jlong Linux_mmap(JNIEnv* env, jobject, jlong address, jlong byteCount, jint prot, jint flags… in Linux_mmap() argument
[all …]
Dorg_apache_harmony_xml_ExpatParser.cpp1034 const char* bytes, size_t byteOffset, size_t byteCount, jboolean isFinal) { in append() argument
1039 if (!XML_Parse(parser, bytes + byteOffset, byteCount, isFinal) && !env->ExceptionCheck()) { in append()
1047 jbyteArray xml, jint byteOffset, jint byteCount) { in ExpatParser_appendBytes() argument
1054 append(env, object, pointer, bytes, byteOffset, byteCount, XML_FALSE); in ExpatParser_appendBytes()
1066 size_t byteCount = 2 * charCount; in ExpatParser_appendChars() local
1067 append(env, object, pointer, bytes, byteOffset, byteCount, XML_FALSE); in ExpatParser_appendChars()
1076 size_t byteCount = 2 * xml.size(); in ExpatParser_appendString() local
1077 append(env, object, pointer, bytes, 0, byteCount, isFinal); in ExpatParser_appendString()
/libcore/luni/src/test/etc/loading-test-jar/
DTestMethods.java71 int byteCount = in.read(buffer); in readFully() local
72 if (byteCount == -1) { in readFully()
75 bytes.write(buffer, 0, byteCount); in readFully()
/libcore/luni/src/test/java/libcore/libcore/io/
DMemoryMappedFileTest.java531 BufferIterator iterator, byte[] underlyingData, int byteCount) { in assertReadByteArraySucceeds() argument
538 byte[] expectedBytes = new byte[byteCount + 2]; in assertReadByteArraySucceeds()
540 expectedBytes[byteCount - 1] = Byte.MIN_VALUE; in assertReadByteArraySucceeds()
541 System.arraycopy(underlyingData, posBefore, expectedBytes, 1, byteCount); in assertReadByteArraySucceeds()
544 byte[] dst = new byte[byteCount + 2]; in assertReadByteArraySucceeds()
547 dst[byteCount - 1] = expectedBytes[byteCount - 1]; in assertReadByteArraySucceeds()
549 iterator.readByteArray(dst, 1, byteCount); in assertReadByteArraySucceeds()
552 assertEquals(posBefore + byteCount, iterator.pos()); in assertReadByteArraySucceeds()
656 private static byte[] createBytes(int byteCount) { in createBytes() argument
657 byte[] bytes = new byte[byteCount]; in createBytes()
[all …]
/libcore/benchmarks/src/benchmarks/
DZipFileBenchmark.java70 int byteCount = (int) Math.min(writeBuffer.length, entrySize - i); in writeEntries() local
71 out.write(writeBuffer, 0, byteCount); in writeEntries()
DZipFileReadBenchmark.java63 int byteCount = (int) Math.min(writeBuffer.length, entrySize - i); in writeEntries() local
64 out.write(writeBuffer, 0, byteCount); in writeEntries()
/libcore/dom/src/test/java/org/w3c/domts/
DDOMTest.java230 int byteCount = bytes.length() / 2; in createStream() local
231 byte[] array = new byte[byteCount]; in createStream()
232 for (int i = 0; i < byteCount; i++) { in createStream()
/libcore/support/src/test/java/tests/support/
DSupport_TestWebData.java47 private static byte[] newBinaryFile(int byteCount) { in newBinaryFile() argument
48 byte[] result = new byte[byteCount]; in newBinaryFile()
/libcore/luni/src/test/java/libcore/java/util/zip/
DDeflaterOutputStreamTest.java110 public int deflate(byte[] buf, int offset, int byteCount) { in deflate() argument
111 return super.deflate(buf, offset, byteCount, Deflater.SYNC_FLUSH); in deflate()
DInflaterTest.java121 int byteCount = deflater.deflate(buf); in deflate() local
122 deflatedBytes.write(buf, 0, byteCount); in deflate()
/libcore/ojluni/src/main/native/
DCharacter.cpp158 int32_t byteCount = u_charName(codePoint, nameType, &buf[0], sizeof(buf), &status); in Character_getNameImpl() local
159 return (U_FAILURE(status) || byteCount == 0) ? NULL : env->NewStringUTF(buf); in Character_getNameImpl()
/libcore/luni/src/test/java/libcore/javax/crypto/
DCipherInputStreamTest.java96 public int read(byte[] buffer, int byteOffset, int byteCount) throws IOException { in read() argument
97 int numRead = super.read(buffer, byteOffset, byteCount); in read()

12