Searched refs:readBytes (Results 1 - 25 of 35) sorted by relevance

12

/frameworks/av/drm/common/include/
H A DReadWriteUtils.h48 static String8 readBytes(const String8& filePath);
56 static int readBytes(const String8& filePath, char** buffer);
/frameworks/support/core/ktx/src/androidTest/java/androidx/core/util/
H A DAtomicFileTest.kt44 val bytes = file.openRead().use { it.readBytes() }
61 val bytes = file.openRead().use { it.readBytes() }
68 val bytes = file.openRead().use { it.readBytes() }
75 val bytes = file.openRead().use { it.readBytes() }
82 val bytes = file.openRead().use { it.readBytes() }
86 @Test fun readBytes() {
91 assertArrayEquals(byteArrayOf(0, 1, 2), file.readBytes())
/frameworks/base/core/tests/coretests/src/com/android/internal/os/
H A DKernelCpuProcReaderTest.java83 assertEquals(null, mKernelCpuProcReader.readBytes());
93 assertNull(mKernelCpuProcReader.readBytes());
102 assertTrue(Arrays.equals(data, toArray(mKernelCpuProcReader.readBytes())));
106 assertNull(mKernelCpuProcReader.readBytes());
112 assertNull(mKernelCpuProcReader.readBytes());
125 assertTrue(Arrays.equals(data, toArray(mKernelCpuProcReader.readBytes())));
140 assertTrue(Arrays.equals(data, toArray(mKernelCpuProcReader.readBytes())));
155 assertTrue(Arrays.equals(data, toArray(mKernelCpuProcReader.readBytes())));
168 assertNull(mKernelCpuProcReader.readBytes());
182 assertTrue(Arrays.equals(data, toArray(mKernelCpuProcReader.readBytes())));
[all...]
H A DKernelUidCpuActiveTimeReaderTest.java65 when(mProcReader.readBytes()).thenReturn(getUidTimesBytes(uids, times));
75 when(mProcReader.readBytes()).thenReturn(getUidTimesBytes(uids, times1));
84 when(mProcReader.readBytes()).thenReturn(getUidTimesBytes(uids, times1));
91 when(mProcReader.readBytes()).thenReturn(getUidTimesBytes(uids, times2));
98 when(mProcReader.readBytes()).thenReturn(getUidTimesBytes(uids, times3));
112 when(mProcReader.readBytes()).thenReturn(getUidTimesBytes(uids, times));
122 when(mProcReader.readBytes()).thenReturn(getUidTimesBytes(uids, times1));
135 when(mProcReader.readBytes()).thenReturn(getUidTimesBytes(uids, times));
145 when(mProcReader.readBytes()).thenReturn(getUidTimesBytes(uids, times1).putInt(0, 5));
153 when(mProcReader.readBytes())
[all...]
H A DKernelUidCpuClusterTimeReaderTest.java71 when(mProcReader.readBytes()).thenReturn(getUidTimesBytes(uids, clusters, times));
82 when(mProcReader.readBytes()).thenReturn(getUidTimesBytes(uids, clusters, times1));
92 when(mProcReader.readBytes()).thenReturn(getUidTimesBytes(uids, clusters, times1));
99 when(mProcReader.readBytes()).thenReturn(getUidTimesBytes(uids, clusters, times2));
107 when(mProcReader.readBytes()).thenReturn(getUidTimesBytes(uids, clusters, times3));
125 when(mProcReader.readBytes()).thenReturn(getUidTimesBytes(uids, clusters, times));
136 when(mProcReader.readBytes()).thenReturn(getUidTimesBytes(uids, clusters, times1));
152 when(mProcReader.readBytes()).thenReturn(getUidTimesBytes(uids, clusters, times));
167 when(mProcReader.readBytes()).thenReturn(getUidTimesBytes(uids, clusters, times1));
176 when(mProcReader.readBytes())
[all...]
H A DKernelUidCpuFreqTimeReaderTest.java161 when(mProcReader.readBytes()).thenReturn(getUidTimesBytes(uids, times));
177 when(mProcReader.readBytes()).thenReturn(getUidTimesBytes(uids, newTimes1));
187 when(mProcReader.readBytes()).thenReturn(getUidTimesBytes(uids, newTimes1));
200 when(mProcReader.readBytes()).thenReturn(getUidTimesBytes(uids, newTimes2));
214 when(mProcReader.readBytes()).thenReturn(getUidTimesBytes(uids, newTimes3));
238 when(mProcReader.readBytes()).thenReturn(getUidTimesBytes(uids, times));
254 when(mProcReader.readBytes()).thenReturn(getUidTimesBytes(uids, newTimes1));
/frameworks/base/drm/java/android/drm/
H A DDrmUtils.java39 /* package */ static byte[] readBytes(String path) throws IOException { method in class:DrmUtils
41 return readBytes(file);
45 /* package */ static byte[] readBytes(File file) throws IOException { method in class:DrmUtils
H A DDrmInfo.java73 mData = DrmUtils.readBytes(path);
H A DDrmRights.java99 mData = DrmUtils.readBytes(rightsFile);
/frameworks/av/drm/common/
H A DDrmRights.cpp30 rightsLength = ReadWriteUtils::readBytes(rightsFilePath, &mRightsFromFile);
H A DReadWriteUtils.cpp35 String8 ReadWriteUtils::readBytes(const String8& filePath) { function in class:ReadWriteUtils
57 int ReadWriteUtils::readBytes(const String8& filePath, char** buffer) { function in class:ReadWriteUtils
/frameworks/support/core/ktx/src/main/java/androidx/core/util/
H A DAtomicFile.kt71 inline fun AtomicFile.readBytes(): ByteArray = readFully()
/frameworks/base/core/java/android/os/
H A DDropBoxManager.java199 int readBytes = 0;
201 while (n >= 0 && (readBytes += n) < maxBytes) {
202 n = is.read(buf, readBytes, maxBytes - readBytes);
204 return new String(buf, 0, readBytes);
H A DMemoryFile.java183 public int readBytes(byte[] buffer, int srcOffset, int destOffset, int count) method in class:MemoryFile
285 // readBytes() also does this check, but we need to do it before
293 int result = readBytes(buffer, mOffset, offset, count);
/frameworks/base/core/java/android/view/inputmethod/
H A DInputMethodSubtypeArray.java219 final int readBytes = unzipper.read(result, totalReadBytes, restBytes);
220 if (readBytes < 0) {
223 totalReadBytes += readBytes;
/frameworks/base/core/tests/coretests/src/android/os/
H A DMemoryFileTest.java36 throw new Exception("readBytes did not read back what writeBytes wrote");
58 file.readBytes(testString, 0, 0, testString.length);
80 file.readBytes(buffer, 2000, 0, testString.length);
118 file.readBytes(copy, 0, 0, file.length());
208 assertEquals(128, file.readBytes(data, 0, 0, 128));
209 fail("readBytes() after close() did not throw IOException.");
/frameworks/support/core/ktx/src/androidTest/java/androidx/core/graphics/drawable/
H A DIconTest.kt68 context.assets.open("red.png").use { cacheFile.writeBytes(it.readBytes()) }
80 val bytes = context.assets.open("red.png").use { it.readBytes() }
/frameworks/base/obex/javax/obex/
H A DPrivateOutputStream.java127 public synchronized byte[] readBytes(int size) { method in class:PrivateOutputStream
/frameworks/support/jetifier/jetifier/processor/src/test/kotlin/com/android/tools/build/jetifier/processor/
H A DChangeDetectionTest.kt164 file = ArchiveFile(Paths.get("/", "preference.class"), inputFile.readBytes()),
176 file = ArchiveFile(Paths.get("/", "preference.class"), inputFile.readBytes()),
/frameworks/base/core/java/com/android/internal/os/
H A DKernelCpuProcReader.java48 * the last read timestamp, {@link #readBytes()} will return previous result.
106 public ByteBuffer readBytes() { method in class:KernelCpuProcReader
H A DKernelUidCpuActiveTimeReader.java135 final ByteBuffer bytes = mProcReader.readBytes();
H A DKernelUidCpuClusterTimeReader.java160 ByteBuffer bytes = mProcReader.readBytes();
H A DZygoteConnection.java944 int readBytes = android.system.Os.read(pipeFd, data, dataIndex, 1);
945 if (readBytes < 0) {
948 dataIndex += readBytes;
/frameworks/base/packages/MtpDocumentsProvider/tests/src/com/android/mtp/
H A DMtpDocumentsProviderTest.java562 final byte[] readBytes = new byte[5];
564 assertEquals(5, Os.read(fd.getFileDescriptor(), readBytes, 0, 5));
565 assertTrue(Arrays.equals("world".getBytes(), readBytes));
568 assertEquals(5, Os.read(fd.getFileDescriptor(), readBytes, 0, 5));
569 assertTrue(Arrays.equals("Hello".getBytes(), readBytes));
600 final byte[] readBytes = new byte[1024 * 1024];
601 assertEquals(11, Os.read(fd.getFileDescriptor(), readBytes, 0, readBytes.length));
/frameworks/base/services/robotests/src/com/android/server/testing/
H A DFrameworkRobolectricTestRunner.java124 return Util.readBytes(classByteStream);

Completed in 343 milliseconds

12