Home
last modified time | relevance | path

Searched refs:byteCount (Results 1 – 25 of 27) 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.java125 public native void mincore(long address, long byteCount, byte[] vector) throws ErrnoException; in mincore() argument
128 public native void mlock(long address, long byteCount) throws ErrnoException; in mlock() argument
129 …public native long mmap(long address, long byteCount, int prot, int flags, FileDescriptor fd, long… in mmap() argument
130 public native void msync(long address, long byteCount, int flags) throws ErrnoException; in msync() argument
131 public native void munlock(long address, long byteCount) throws ErrnoException; in munlock() argument
132 public native void munmap(long address, long byteCount) throws ErrnoException; in munmap() argument
151 …public int pread(FileDescriptor fd, byte[] bytes, int byteOffset, int byteCount, long offset) thro… in pread() argument
153 return preadBytes(fd, bytes, byteOffset, byteCount, offset); in pread()
155 …private native int preadBytes(FileDescriptor fd, Object buffer, int bufferOffset, int byteCount, l… in preadBytes() argument
169 …public int pwrite(FileDescriptor fd, byte[] bytes, int byteOffset, int byteCount, long offset) thr… in pwrite() argument
[all …]
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()
DStreams.java79 …public static void readFully(InputStream in, byte[] dst, int offset, int byteCount) throws IOExcep… in readFully() argument
80 if (byteCount == 0) { in readFully()
89 ArrayUtils.throwsIfOutOfBounds(dst.length, offset, byteCount); in readFully()
90 while (byteCount > 0) { in readFully()
91 int bytesRead = in.read(dst, offset, byteCount); in readFully()
96 byteCount -= bytesRead; in readFully()
165 public static long skipByReading(InputStream in, long byteCount) throws IOException { in skipByReading() argument
173 while (skipped < byteCount) { in skipByReading()
174 int toRead = (int) Math.min(byteCount - skipped, buffer.length); in skipByReading()
DForwardingOs.java154 …blic void mincore(long address, long byteCount, byte[] vector) throws ErrnoException { os.mincore(… in mincore() argument
159 …public void mlock(long address, long byteCount) throws ErrnoException { os.mlock(address, byteCoun… in mlock() argument
160 …g address, long byteCount, int prot, int flags, FileDescriptor fd, long offset) throws ErrnoExcept… in mmap() argument
161 …public void msync(long address, long byteCount, int flags) throws ErrnoException { os.msync(addres… in msync() argument
162 …public void munlock(long address, long byteCount) throws ErrnoException { os.munlock(address, byte… in munlock() argument
163 …public void munmap(long address, long byteCount) throws ErrnoException { os.munmap(address, byteCo… in munmap() argument
172 …byteOffset, int byteCount, long offset) throws ErrnoException, InterruptedIOException { return os.… in pread() argument
174 …byteOffset, int byteCount, long offset) throws ErrnoException, InterruptedIOException { return os.… in pwrite() argument
176 …s, int byteOffset, int byteCount) throws ErrnoException, InterruptedIOException { return os.read(f… in read() argument
182 …int byteCount, int flags, InetSocketAddress srcAddress) throws ErrnoException, SocketException { r… in recvfrom() argument
[all …]
DBlockGuardOs.java279 …@Override public int pread(FileDescriptor fd, byte[] bytes, int byteOffset, int byteCount, long of… in pread() argument
281 return super.pread(fd, bytes, byteOffset, byteCount, offset); in pread()
291 …@Override public int pwrite(FileDescriptor fd, byte[] bytes, int byteOffset, int byteCount, long o… in pwrite() argument
293 return super.pwrite(fd, bytes, byteOffset, byteCount, offset); in pwrite()
303 …@Override public int read(FileDescriptor fd, byte[] bytes, int byteOffset, int byteCount) throws E… in read() argument
305 return super.read(fd, bytes, byteOffset, byteCount); in read()
333 …@Override public int recvfrom(FileDescriptor fd, byte[] bytes, int byteOffset, int byteCount, int … in recvfrom() argument
335 return super.recvfrom(fd, bytes, byteOffset, byteCount, flags, srcAddress); in recvfrom()
353 …ndfile(FileDescriptor outFd, FileDescriptor inFd, Int64Ref offset, long byteCount) throws ErrnoExc… in sendfile() argument
355 return super.sendfile(outFd, inFd, offset, byteCount); in sendfile()
[all …]
DOs.java127 public void mincore(long address, long byteCount, byte[] vector) throws ErrnoException; in mincore() argument
130 public void mlock(long address, long byteCount) throws ErrnoException; in mlock() argument
132 …public long mmap(long address, long byteCount, int prot, int flags, FileDescriptor fd, long offset… in mmap() argument
133 public void msync(long address, long byteCount, int flags) throws ErrnoException; in msync() argument
134 public void munlock(long address, long byteCount) throws ErrnoException; in munlock() argument
136 public void munmap(long address, long byteCount) throws ErrnoException; in munmap() argument
145 …public int pread(FileDescriptor fd, byte[] bytes, int byteOffset, int byteCount, long offset) thro… in pread() argument
147 …public int pwrite(FileDescriptor fd, byte[] bytes, int byteOffset, int byteCount, long offset) thr… in pwrite() argument
150 …public int read(FileDescriptor fd, byte[] bytes, int byteOffset, int byteCount) throws ErrnoExcept… in read() argument
155 …public int recvfrom(FileDescriptor fd, byte[] bytes, int byteOffset, int byteCount, int flags, Ine… in recvfrom() argument
[all …]
DIoBridge.java503 …public static int read(FileDescriptor fd, byte[] bytes, int byteOffset, int byteCount) throws IOEx… in read() argument
504 ArrayUtils.throwsIfOutOfBounds(bytes.length, byteOffset, byteCount); in read()
505 if (byteCount == 0) { in read()
509 int readCount = Libcore.os.read(fd, bytes, byteOffset, byteCount); in read()
528 …public static void write(FileDescriptor fd, byte[] bytes, int byteOffset, int byteCount) throws IO… in write() argument
529 ArrayUtils.throwsIfOutOfBounds(bytes.length, byteOffset, byteCount); in write()
530 if (byteCount == 0) { in write()
534 while (byteCount > 0) { in write()
535 int bytesWritten = Libcore.os.write(fd, bytes, byteOffset, byteCount); in write()
536 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.java39 public static native void unsafeBulkGet(Object dst, int dstOffset, int byteCount, in unsafeBulkGet() argument
46 public static native void unsafeBulkPut(byte[] dst, int dstOffset, int byteCount, in unsafeBulkPut() argument
161 …ive void memmove(Object dstObject, int dstOffset, Object srcObject, int srcOffset, long byteCount); in memmove() argument
200 public static native void peekByteArray(long address, byte[] dst, int dstOffset, int byteCount); in peekByteArray() argument
/libcore/libart/src/main/java/java/lang/
DStringFactory.java53 public static String newStringFromBytes(byte[] data, int offset, int byteCount) { in newStringFromBytes() argument
54 return newStringFromBytes(data, offset, byteCount, Charset.defaultCharset()); in newStringFromBytes()
58 … public static native String newStringFromBytes(byte[] data, int high, int offset, int byteCount); in newStringFromBytes() argument
60 …public static String newStringFromBytes(byte[] data, int offset, int byteCount, String charsetName… in newStringFromBytes() argument
61 return newStringFromBytes(data, offset, byteCount, Charset.forNameUEE(charsetName)); in newStringFromBytes()
77 … public static String newStringFromBytes(byte[] data, int offset, int byteCount, Charset charset) { in newStringFromBytes() argument
78 if ((offset | byteCount) < 0 || byteCount > data.length - offset) { in newStringFromBytes()
79 throw new StringIndexOutOfBoundsException(data.length, offset, byteCount); in newStringFromBytes()
125 char[] v = new char[byteCount]; in newStringFromBytes()
128 int last = offset + byteCount; in newStringFromBytes()
[all …]
/libcore/luni/src/main/java/android/system/
DOs.java372 … void mincore(long address, long byteCount, byte[] vector) throws ErrnoException { Libcore.os.minc… in mincore() argument
387 …lic static void mlock(long address, long byteCount) throws ErrnoException { Libcore.os.mlock(addre… in mlock() argument
392 …dress, long byteCount, int prot, int flags, FileDescriptor fd, long offset) throws ErrnoException … in mmap() argument
397 …tatic void msync(long address, long byteCount, int flags) throws ErrnoException { Libcore.os.msync… in msync() argument
402 … static void munlock(long address, long byteCount) throws ErrnoException { Libcore.os.munlock(addr… in munlock() argument
407 …ic static void munmap(long address, long byteCount) throws ErrnoException { Libcore.os.munmap(addr… in munmap() argument
450 …Offset, int byteCount, long offset) throws ErrnoException, InterruptedIOException { return Libcore… in pread() argument
460 …Offset, int byteCount, long offset) throws ErrnoException, InterruptedIOException { return Libcore… in pwrite() argument
470 …nt byteOffset, int byteCount) throws ErrnoException, InterruptedIOException { return Libcore.os.re… in read() argument
497byteCount, int flags, InetSocketAddress srcAddress) throws ErrnoException, SocketException { retur… in recvfrom() argument
[all …]
/libcore/luni/src/main/native/
Dlibcore_io_Memory.cpp111 …kByteArray(JNIEnv* env, jclass, jlong srcAddress, jbyteArray dst, jint dstOffset, jint byteCount) { in Memory_peekByteArray() argument
112 env->SetByteArrayRegion(dst, dstOffset, byteCount, cast<const jbyte*>(srcAddress)); in Memory_peekByteArray()
236 static void unsafeBulkCopy(jbyte* dst, const jbyte* src, jint byteCount, in unsafeBulkCopy() argument
239 memcpy(dst, src, byteCount); in unsafeBulkCopy()
246 swapShorts(dstShorts, srcShorts, byteCount / 2); in unsafeBulkCopy()
250 swapInts(dstInts, srcInts, byteCount / 4); in unsafeBulkCopy()
254 swapLongs(dstLongs, srcLongs, byteCount / 8); in unsafeBulkCopy()
259 jint byteCount, jbyteArray srcArray, jint srcOffset, jint sizeofElement, jboolean swap) { in Memory_unsafeBulkGet() argument
271 unsafeBulkCopy(dst, src, byteCount, sizeofElement, swap); in Memory_unsafeBulkGet()
276 jint byteCount, jobject srcObject, jint srcOffset, jint sizeofElement, jboolean swap) { in Memory_unsafeBulkPut() argument
[all …]
Dlibcore_io_Linux.cpp762 socklen_t byteCount = sizeof(ss); in doGetSockName() local
763 memset(&ss, 0, byteCount); in doGetSockName()
764 int rc = is_sockname ? TEMP_FAILURE_RETRY(getsockname(fd, sa, &byteCount)) in doGetSockName()
765 : TEMP_FAILURE_RETRY(getpeername(fd, sa, &byteCount)); in doGetSockName()
770 return makeSocketAddress(env, ss, byteCount); in doGetSockName()
1855 static void Linux_mincore(JNIEnv* env, jobject, jlong address, jlong byteCount, jbyteArray javaVect… in Linux_mincore() argument
1862 throwIfMinusOne(env, "mincore", TEMP_FAILURE_RETRY(mincore(ptr, byteCount, vec))); in Linux_mincore()
1881 static void Linux_mlock(JNIEnv* env, jobject, jlong address, jlong byteCount) { in Linux_mlock() argument
1883 throwIfMinusOne(env, "mlock", TEMP_FAILURE_RETRY(mlock(ptr, byteCount))); in Linux_mlock()
1886 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.cpp1033 const char* bytes, size_t byteOffset, size_t byteCount, jboolean isFinal) { in append() argument
1038 if (!XML_Parse(parser, bytes + byteOffset, byteCount, isFinal) && !env->ExceptionCheck()) { in append()
1046 jbyteArray xml, jint byteOffset, jint byteCount) { in ExpatParser_appendBytes() argument
1053 append(env, object, pointer, bytes, byteOffset, byteCount, XML_FALSE); in ExpatParser_appendBytes()
1065 size_t byteCount = 2 * charCount; in ExpatParser_appendChars() local
1066 append(env, object, pointer, bytes, byteOffset, byteCount, XML_FALSE); in ExpatParser_appendChars()
1075 size_t byteCount = 2 * xml.size(); in ExpatParser_appendString() local
1076 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/libcore/util/
DZoneInfoTest.java773 public void skip(int byteCount) { in skip() argument
774 buffer.position(buffer.position() + byteCount); in skip()
783 public void readByteArray(byte[] bytes, int arrayOffset, int byteCount) { in readByteArray() argument
784 buffer.get(bytes, arrayOffset, byteCount); in readByteArray()

12