Home
last modified time | relevance | path

Searched refs:readBytes (Results 1 – 25 of 41) sorted by relevance

12

/frameworks/base/core/tests/coretests/src/com/android/internal/os/
DKernelCpuProcReaderTest.java83 assertEquals(null, mKernelCpuProcReader.readBytes()); in testReadInvalidFile()
93 assertNull(mKernelCpuProcReader.readBytes()); in testReadErrorsLimit()
102 assertTrue(Arrays.equals(data, toArray(mKernelCpuProcReader.readBytes()))); in testReadErrorsLimit()
106 assertNull(mKernelCpuProcReader.readBytes()); in testReadErrorsLimit()
112 assertNull(mKernelCpuProcReader.readBytes()); in testReadErrorsLimit()
125 assertTrue(Arrays.equals(data, toArray(mKernelCpuProcReader.readBytes()))); in testSimpleRead()
140 assertTrue(Arrays.equals(data, toArray(mKernelCpuProcReader.readBytes()))); in testMultipleRead()
155 assertTrue(Arrays.equals(data, toArray(mKernelCpuProcReader.readBytes()))); in testReadWithResize()
168 assertNull(mKernelCpuProcReader.readBytes()); in testReadOverLimit()
182 assertTrue(Arrays.equals(data, toArray(mKernelCpuProcReader.readBytes()))); in testThrottle()
[all …]
DKernelUidCpuActiveTimeReaderTest.java65 when(mProcReader.readBytes()).thenReturn(getUidTimesBytes(uids, times)); in testReadDelta()
75 when(mProcReader.readBytes()).thenReturn(getUidTimesBytes(uids, times1)); in testReadDelta()
84 when(mProcReader.readBytes()).thenReturn(getUidTimesBytes(uids, times1)); in testReadDelta()
91 when(mProcReader.readBytes()).thenReturn(getUidTimesBytes(uids, times2)); in testReadDelta()
98 when(mProcReader.readBytes()).thenReturn(getUidTimesBytes(uids, times3)); in testReadDelta()
112 when(mProcReader.readBytes()).thenReturn(getUidTimesBytes(uids, times)); in testReadAbsolute()
122 when(mProcReader.readBytes()).thenReturn(getUidTimesBytes(uids, times1)); in testReadAbsolute()
135 when(mProcReader.readBytes()).thenReturn(getUidTimesBytes(uids, times)); in testReadDelta_malformedData()
145 when(mProcReader.readBytes()).thenReturn(getUidTimesBytes(uids, times1).putInt(0, 5)); in testReadDelta_malformedData()
153 when(mProcReader.readBytes()).thenReturn(getUidTimesBytes(uids, times2)); in testReadDelta_malformedData()
[all …]
DKernelUidCpuClusterTimeReaderTest.java71 when(mProcReader.readBytes()).thenReturn(getUidTimesBytes(uids, clusters, times)); in testReadDelta()
82 when(mProcReader.readBytes()).thenReturn(getUidTimesBytes(uids, clusters, times1)); in testReadDelta()
92 when(mProcReader.readBytes()).thenReturn(getUidTimesBytes(uids, clusters, times1)); in testReadDelta()
99 when(mProcReader.readBytes()).thenReturn(getUidTimesBytes(uids, clusters, times2)); in testReadDelta()
107 when(mProcReader.readBytes()).thenReturn(getUidTimesBytes(uids, clusters, times3)); in testReadDelta()
125 when(mProcReader.readBytes()).thenReturn(getUidTimesBytes(uids, clusters, times)); in testReadAbsolute()
136 when(mProcReader.readBytes()).thenReturn(getUidTimesBytes(uids, clusters, times1)); in testReadAbsolute()
152 when(mProcReader.readBytes()).thenReturn(getUidTimesBytes(uids, clusters, times)); in testReadDelta_malformedData()
167 when(mProcReader.readBytes()).thenReturn(getUidTimesBytes(uids, clusters, times1)); in testReadDelta_malformedData()
176 when(mProcReader.readBytes()).thenReturn(getUidTimesBytes(uids, clusters, times2)); in testReadDelta_malformedData()
[all …]
DKernelUidCpuFreqTimeReaderTest.java161 when(mProcReader.readBytes()).thenReturn(getUidTimesBytes(uids, times)); in testReadDelta_Binary()
177 when(mProcReader.readBytes()).thenReturn(getUidTimesBytes(uids, newTimes1)); in testReadDelta_Binary()
187 when(mProcReader.readBytes()).thenReturn(getUidTimesBytes(uids, newTimes1)); in testReadDelta_Binary()
200 when(mProcReader.readBytes()).thenReturn(getUidTimesBytes(uids, newTimes2)); in testReadDelta_Binary()
214 when(mProcReader.readBytes()).thenReturn(getUidTimesBytes(uids, newTimes3)); in testReadDelta_Binary()
238 when(mProcReader.readBytes()).thenReturn(getUidTimesBytes(uids, times)); in testReadAbsolute()
254 when(mProcReader.readBytes()).thenReturn(getUidTimesBytes(uids, newTimes1)); in testReadAbsolute()
/frameworks/support/core/ktx/src/androidTest/java/androidx/core/util/
DAtomicFileTest.kt44 val bytes = file.openRead().use { it.readBytes() } in tryWriteSuccess()
61 val bytes = file.openRead().use { it.readBytes() } in tryWriteFail()
68 val bytes = file.openRead().use { it.readBytes() } in writeBytes()
75 val bytes = file.openRead().use { it.readBytes() } in writeText()
82 val bytes = file.openRead().use { it.readBytes() } in writeTextCharset()
86 @Test fun readBytes() { in readBytes() method in androidx.core.util.AtomicFileTest
91 assertArrayEquals(byteArrayOf(0, 1, 2), file.readBytes()) in readBytes()
/frameworks/av/drm/common/include/
DReadWriteUtils.h48 static String8 readBytes(const String8& filePath);
56 static int readBytes(const String8& filePath, char** buffer);
/frameworks/base/drm/java/android/drm/
DDrmUtils.java39 /* package */ static byte[] readBytes(String path) throws IOException { in readBytes() method in DrmUtils
41 return readBytes(file); in readBytes()
45 /* package */ static byte[] readBytes(File file) throws IOException { in readBytes() method in DrmUtils
DDrmInfo.java73 mData = DrmUtils.readBytes(path); in DrmInfo()
DDrmRights.java99 mData = DrmUtils.readBytes(rightsFile); in instantiate()
/frameworks/base/core/java/android/os/
DDropBoxManager.java199 int readBytes = 0; in getText() local
201 while (n >= 0 && (readBytes += n) < maxBytes) { in getText()
202 n = is.read(buf, readBytes, maxBytes - readBytes); in getText()
204 return new String(buf, 0, readBytes); in getText()
DMemoryFile.java183 public int readBytes(byte[] buffer, int srcOffset, int destOffset, int count) in readBytes() method in MemoryFile
293 int result = readBytes(buffer, mOffset, offset, count); in read()
/frameworks/base/core/tests/coretests/src/android/os/
DMemoryFileTest.java58 file.readBytes(testString, 0, 0, testString.length); in testPurge()
80 file.readBytes(buffer, 2000, 0, testString.length); in testRun()
118 file.readBytes(copy, 0, 0, file.length()); in testOutputStreamAdvances()
208 assertEquals(128, file.readBytes(data, 0, 0, 128)); in testCloseRead()
/frameworks/base/core/java/android/view/inputmethod/
DInputMethodSubtypeArray.java219 final int readBytes = unzipper.read(result, totalReadBytes, restBytes); in decompress() local
220 if (readBytes < 0) { in decompress()
223 totalReadBytes += readBytes; in decompress()
/frameworks/av/drm/common/
DReadWriteUtils.cpp35 String8 ReadWriteUtils::readBytes(const String8& filePath) { in readBytes() function in ReadWriteUtils
57 int ReadWriteUtils::readBytes(const String8& filePath, char** buffer) { in readBytes() function in ReadWriteUtils
DDrmRights.cpp30 rightsLength = ReadWriteUtils::readBytes(rightsFilePath, &mRightsFromFile); in DrmRights()
/frameworks/support/core/ktx/src/androidTest/java/androidx/core/graphics/drawable/
DIconTest.kt68 context.assets.open("red.png").use { cacheFile.writeBytes(it.readBytes()) } in fromUri()
80 val bytes = context.assets.open("red.png").use { it.readBytes() } in fromByteArray()
/frameworks/support/jetifier/jetifier/processor/src/test/kotlin/com/android/tools/build/jetifier/processor/
DChangeDetectionTest.kt164 file = ArchiveFile(Paths.get("/", "preference.class"), inputFile.readBytes()), in javaClass_archiveChanged()
176 file = ArchiveFile(Paths.get("/", "preference.class"), inputFile.readBytes()), in javaClass_archiveNotChanged()
/frameworks/base/packages/MtpDocumentsProvider/tests/src/com/android/mtp/
DMtpDocumentsProviderTest.java562 final byte[] readBytes = new byte[5]; in testOpenDocument()
564 assertEquals(5, Os.read(fd.getFileDescriptor(), readBytes, 0, 5)); in testOpenDocument()
565 assertTrue(Arrays.equals("world".getBytes(), readBytes)); in testOpenDocument()
568 assertEquals(5, Os.read(fd.getFileDescriptor(), readBytes, 0, 5)); in testOpenDocument()
569 assertTrue(Arrays.equals("Hello".getBytes(), readBytes)); in testOpenDocument()
600 final byte[] readBytes = new byte[1024 * 1024]; in testOpenDocument_shortBytes()
601 assertEquals(11, Os.read(fd.getFileDescriptor(), readBytes, 0, readBytes.length)); in testOpenDocument_shortBytes()
/frameworks/support/core/ktx/src/main/java/androidx/core/util/
DAtomicFile.kt71 inline fun AtomicFile.readBytes(): ByteArray = readFully() in readBytes() method
/frameworks/base/obex/javax/obex/
DPrivateOutputStream.java127 public synchronized byte[] readBytes(int size) { in readBytes() method in PrivateOutputStream
/frameworks/base/core/java/com/android/internal/os/
DKernelCpuProcReader.java106 public ByteBuffer readBytes() { in readBytes() method in KernelCpuProcReader
DKernelUidCpuActiveTimeReader.java135 final ByteBuffer bytes = mProcReader.readBytes(); in readImpl()
DZygoteConnection.java944 int readBytes = android.system.Os.read(pipeFd, data, dataIndex, 1); in handleParentProc() local
945 if (readBytes < 0) { in handleParentProc()
948 dataIndex += readBytes; in handleParentProc()
/frameworks/base/services/robotests/src/com/android/server/testing/
DFrameworkRobolectricTestRunner.java124 return Util.readBytes(classByteStream); in getByteCode()
/frameworks/support/jetifier/jetifier/processor/src/main/kotlin/com/android/tools/build/jetifier/processor/archive/
DArchive.kt166 val data = zipIn.readBytes() in extractFile()

12