Home
last modified time | relevance | path

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

12

/libcore/luni/src/main/java/libcore/io/
DNioBufferIterator.java57 public void skip(int byteCount) { in skip() argument
58 position += byteCount; in skip()
66 public void readByteArray(byte[] dst, int dstOffset, int byteCount) { in readByteArray() argument
67 checkDstBounds(dstOffset, dst.length, byteCount); in readByteArray()
69 checkReadBounds(position, length, byteCount); in readByteArray()
70 Memory.peekByteArray(address + position, dst, dstOffset, byteCount); in readByteArray()
71 position += byteCount; in readByteArray()
93 final int byteCount = SizeOf.INT * intCount; in readIntArray() local
94 checkReadBounds(position, length, byteCount); in readIntArray()
96 position += byteCount; in readIntArray()
[all …]
DStreams.java69 …public static void readFully(InputStream in, byte[] dst, int offset, int byteCount) throws IOExcep… in readFully() argument
70 if (byteCount == 0) { in readFully()
79 Arrays.checkOffsetAndCount(dst.length, offset, byteCount); in readFully()
80 while (byteCount > 0) { in readFully()
81 int bytesRead = in.read(dst, offset, byteCount); in readFully()
86 byteCount -= bytesRead; in readFully()
149 public static long skipByReading(InputStream in, long byteCount) throws IOException { in skipByReading() argument
157 while (skipped < byteCount) { in skipByReading()
158 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()
DLinux.java120 public native void mincore(long address, long byteCount, byte[] vector) throws ErrnoException; in mincore() argument
123 public native void mlock(long address, long byteCount) throws ErrnoException; in mlock() argument
124 …public native long mmap(long address, long byteCount, int prot, int flags, FileDescriptor fd, long… in mmap() argument
125 public native void msync(long address, long byteCount, int flags) throws ErrnoException; in msync() argument
126 public native void munlock(long address, long byteCount) throws ErrnoException; in munlock() argument
127 public native void munmap(long address, long byteCount) throws ErrnoException; in munmap() argument
146 …public int pread(FileDescriptor fd, byte[] bytes, int byteOffset, int byteCount, long offset) thro… in pread() argument
148 return preadBytes(fd, bytes, byteOffset, byteCount, offset); in pread()
150 …private native int preadBytes(FileDescriptor fd, Object buffer, int bufferOffset, int byteCount, l… in preadBytes() argument
164 …public int pwrite(FileDescriptor fd, byte[] bytes, int byteOffset, int byteCount, long offset) thr… in pwrite() argument
[all …]
DForwardingOs.java129 …blic void mincore(long address, long byteCount, byte[] vector) throws ErrnoException { os.mincore(… in mincore() argument
132 …public void mlock(long address, long byteCount) throws ErrnoException { os.mlock(address, byteCoun… in mlock() argument
133 …g address, long byteCount, int prot, int flags, FileDescriptor fd, long offset) throws ErrnoExcept… in mmap() argument
134 …public void msync(long address, long byteCount, int flags) throws ErrnoException { os.msync(addres… in msync() argument
135 …public void munlock(long address, long byteCount) throws ErrnoException { os.munlock(address, byte… in munlock() argument
136 …public void munmap(long address, long byteCount) throws ErrnoException { os.munmap(address, byteCo… in munmap() argument
143 …byteOffset, int byteCount, long offset) throws ErrnoException, InterruptedIOException { return os.… in pread() argument
145 …byteOffset, int byteCount, long offset) throws ErrnoException, InterruptedIOException { return os.… in pwrite() argument
147 …s, int byteOffset, int byteCount) throws ErrnoException, InterruptedIOException { return os.read(f… in read() argument
152 …int byteCount, int flags, InetSocketAddress srcAddress) throws ErrnoException, SocketException { r… in recvfrom() argument
[all …]
DBlockGuardOs.java229 …@Override public int pread(FileDescriptor fd, byte[] bytes, int byteOffset, int byteCount, long of… in pread() argument
231 return os.pread(fd, bytes, byteOffset, byteCount, offset); in pread()
239 …@Override public int pwrite(FileDescriptor fd, byte[] bytes, int byteOffset, int byteCount, long o… in pwrite() argument
241 return os.pwrite(fd, bytes, byteOffset, byteCount, offset); in pwrite()
249 …@Override public int read(FileDescriptor fd, byte[] bytes, int byteOffset, int byteCount) throws E… in read() argument
251 return os.read(fd, bytes, byteOffset, byteCount); in read()
274 …@Override public int recvfrom(FileDescriptor fd, byte[] bytes, int byteOffset, int byteCount, int … in recvfrom() argument
276 return os.recvfrom(fd, bytes, byteOffset, byteCount, flags, srcAddress); in recvfrom()
289 …e(FileDescriptor outFd, FileDescriptor inFd, MutableLong inOffset, long byteCount) throws ErrnoExc… in sendfile() argument
291 return os.sendfile(outFd, inFd, inOffset, byteCount); in sendfile()
[all …]
DOs.java115 public void mincore(long address, long byteCount, byte[] vector) throws ErrnoException; in mincore() argument
118 public void mlock(long address, long byteCount) throws ErrnoException; in mlock() argument
119 …public long mmap(long address, long byteCount, int prot, int flags, FileDescriptor fd, long offset… in mmap() argument
120 public void msync(long address, long byteCount, int flags) throws ErrnoException; in msync() argument
121 public void munlock(long address, long byteCount) throws ErrnoException; in munlock() argument
122 public void munmap(long address, long byteCount) throws ErrnoException; in munmap() argument
130 …public int pread(FileDescriptor fd, byte[] bytes, int byteOffset, int byteCount, long offset) thro… in pread() argument
132 …public int pwrite(FileDescriptor fd, byte[] bytes, int byteOffset, int byteCount, long offset) thr… in pwrite() argument
134 …public int read(FileDescriptor fd, byte[] bytes, int byteOffset, int byteCount) throws ErrnoExcept… in read() argument
139 …public int recvfrom(FileDescriptor fd, byte[] bytes, int byteOffset, int byteCount, int flags, Ine… in recvfrom() argument
[all …]
DBufferIterator.java35 public abstract void skip(int byteCount); in skip() argument
48 public abstract void readByteArray(byte[] dst, int dstOffset, int byteCount); in readByteArray() argument
DIoBridge.java522 …public static int read(FileDescriptor fd, byte[] bytes, int byteOffset, int byteCount) throws IOEx… in read() argument
523 Arrays.checkOffsetAndCount(bytes.length, byteOffset, byteCount); in read()
524 if (byteCount == 0) { in read()
528 int readCount = Libcore.os.read(fd, bytes, byteOffset, byteCount); in read()
546 …public static void write(FileDescriptor fd, byte[] bytes, int byteOffset, int byteCount) throws IO… in write() argument
547 Arrays.checkOffsetAndCount(bytes.length, byteOffset, byteCount); in write()
548 if (byteCount == 0) { in write()
552 while (byteCount > 0) { in write()
553 int bytesWritten = Libcore.os.write(fd, bytes, byteOffset, byteCount); in write()
554 byteCount -= bytesWritten; in write()
[all …]
DMemory.java36 public static native void unsafeBulkGet(Object dst, int dstOffset, int byteCount, in unsafeBulkGet() argument
43 public static native void unsafeBulkPut(byte[] dst, int dstOffset, int byteCount, in unsafeBulkPut() argument
152 …ive void memmove(Object dstObject, int dstOffset, Object srcObject, int srcOffset, long byteCount); in memmove() argument
187 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()
69 … public static String newStringFromBytes(byte[] data, int offset, int byteCount, Charset charset) { in newStringFromBytes() argument
70 if ((offset | byteCount) < 0 || byteCount > data.length - offset) { in newStringFromBytes()
71 throw new StringIndexOutOfBoundsException(data.length, offset, byteCount); in newStringFromBytes()
81 char[] v = new char[byteCount]; in newStringFromBytes()
84 int last = offset + byteCount; in newStringFromBytes()
[all …]
/libcore/luni/src/main/java/android/system/
DOs.java316 … void mincore(long address, long byteCount, byte[] vector) throws ErrnoException { Libcore.os.minc… in mincore() argument
331 …lic static void mlock(long address, long byteCount) throws ErrnoException { Libcore.os.mlock(addre… in mlock() argument
336 …dress, long byteCount, int prot, int flags, FileDescriptor fd, long offset) throws ErrnoException … in mmap() argument
341 …tatic void msync(long address, long byteCount, int flags) throws ErrnoException { Libcore.os.msync… in msync() argument
346 … static void munlock(long address, long byteCount) throws ErrnoException { Libcore.os.munlock(addr… in munlock() argument
351 …ic static void munmap(long address, long byteCount) throws ErrnoException { Libcore.os.munmap(addr… in munmap() argument
392 …Offset, int byteCount, long offset) throws ErrnoException, InterruptedIOException { return Libcore… in pread() argument
402 …Offset, int byteCount, long offset) throws ErrnoException, InterruptedIOException { return Libcore… in pwrite() argument
412 …nt byteOffset, int byteCount) throws ErrnoException, InterruptedIOException { return Libcore.os.re… in read() argument
432byteCount, int flags, InetSocketAddress srcAddress) throws ErrnoException, SocketException { retur… in recvfrom() argument
[all …]
/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/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 …]
Dorg_apache_harmony_xml_ExpatParser.cpp431 static size_t fillBuffer(ParsingContext* parsingContext, const char* utf8, int byteCount) { in fillBuffer() argument
435 jcharArray javaChars = parsingContext->ensureCapacity(byteCount); in fillBuffer()
446 icu::UnicodeString utf16(icu::UnicodeString::fromUTF8(icu::StringPiece(utf8, byteCount))); in fillBuffer()
447 return utf16.extract(chars.get(), byteCount, status); in fillBuffer()
1021 const char* bytes, size_t byteOffset, size_t byteCount, jboolean isFinal) { in append() argument
1026 if (!XML_Parse(parser, bytes + byteOffset, byteCount, isFinal) && !env->ExceptionCheck()) { in append()
1034 jbyteArray xml, jint byteOffset, jint byteCount) { in ExpatParser_appendBytes() argument
1041 append(env, object, pointer, bytes, byteOffset, byteCount, XML_FALSE); in ExpatParser_appendBytes()
1053 size_t byteCount = 2 * charCount; in ExpatParser_appendChars() local
1054 append(env, object, pointer, bytes, byteOffset, byteCount, XML_FALSE); in ExpatParser_appendChars()
[all …]
Dlibcore_io_Linux.cpp746 socklen_t byteCount = sizeof(ss); in doGetSockName() local
747 memset(&ss, 0, byteCount); in doGetSockName()
748 int rc = is_sockname ? TEMP_FAILURE_RETRY(getsockname(fd, sa, &byteCount)) in doGetSockName()
749 : TEMP_FAILURE_RETRY(getpeername(fd, sa, &byteCount)); in doGetSockName()
754 return makeSocketAddress(env, ss, byteCount); in doGetSockName()
1768 static void Linux_mincore(JNIEnv* env, jobject, jlong address, jlong byteCount, jbyteArray javaVect… in Linux_mincore() argument
1775 throwIfMinusOne(env, "mincore", TEMP_FAILURE_RETRY(mincore(ptr, byteCount, vec))); in Linux_mincore()
1794 static void Linux_mlock(JNIEnv* env, jobject, jlong address, jlong byteCount) { in Linux_mlock() argument
1796 throwIfMinusOne(env, "mlock", TEMP_FAILURE_RETRY(mlock(ptr, byteCount))); in Linux_mlock()
1799 static jlong Linux_mmap(JNIEnv* env, jobject, jlong address, jlong byteCount, jint prot, jint flags… in Linux_mmap() argument
[all …]
/libcore/luni/src/test/java/libcore/io/
DMemoryMappedFileTest.java528 BufferIterator iterator, byte[] underlyingData, int byteCount) { in assertReadByteArraySucceeds() argument
535 byte[] expectedBytes = new byte[byteCount + 2]; in assertReadByteArraySucceeds()
537 expectedBytes[byteCount - 1] = Byte.MIN_VALUE; in assertReadByteArraySucceeds()
538 System.arraycopy(underlyingData, posBefore, expectedBytes, 1, byteCount); in assertReadByteArraySucceeds()
541 byte[] dst = new byte[byteCount + 2]; in assertReadByteArraySucceeds()
544 dst[byteCount - 1] = expectedBytes[byteCount - 1]; in assertReadByteArraySucceeds()
546 iterator.readByteArray(dst, 1, byteCount); in assertReadByteArraySucceeds()
549 assertEquals(posBefore + byteCount, iterator.pos()); in assertReadByteArraySucceeds()
653 private static byte[] createBytes(int byteCount) { in createBytes() argument
654 byte[] bytes = new byte[byteCount]; in createBytes()
[all …]
/libcore/luni/src/main/java/org/apache/harmony/security/provider/crypto/
DSHA1PRNG_SecureRandomImpl.java547 private static byte[] getRandomBytes(int byteCount) { in getRandomBytes() argument
548 if (byteCount <= 0) { in getRandomBytes()
549 throw new IllegalArgumentException("Too few bytes requested: " + byteCount); in getRandomBytes()
555 byte[] result = new byte[byteCount]; in getRandomBytes()
556 Streams.readFully(devURandom, result, 0, byteCount); in getRandomBytes()
559 throw new ProviderException("Couldn't read " + byteCount + " random bytes", ex); in getRandomBytes()
/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()
/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/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/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/luni/src/test/java/libcore/util/
DZoneInfoTest.java592 public void skip(int byteCount) { in skip() argument
593 buffer.position(buffer.position() + byteCount); in skip()
602 public void readByteArray(byte[] dst, int dstOffset, int byteCount) { in readByteArray() argument
603 buffer.get(dst, dstOffset, byteCount); in readByteArray()
/libcore/ojluni/src/main/native/
DCharacter.cpp157 int32_t byteCount = u_charName(codePoint, nameType, &buf[0], sizeof(buf), &status); in Character_getNameImpl() local
158 return (U_FAILURE(status) || byteCount == 0) ? NULL : env->NewStringUTF(buf); in Character_getNameImpl()

12