Home
last modified time | relevance | path

Searched refs:reader (Results 1 – 25 of 57) sorted by relevance

123

/frameworks/base/core/tests/coretests/src/android/util/
DJsonReaderTest.java29 JsonReader reader = new JsonReader(new StringReader("[true, true]")); in testReadArray() local
30 reader.beginArray(); in testReadArray()
31 assertEquals(true, reader.nextBoolean()); in testReadArray()
32 assertEquals(true, reader.nextBoolean()); in testReadArray()
33 reader.endArray(); in testReadArray()
34 assertEquals(JsonToken.END_DOCUMENT, reader.peek()); in testReadArray()
38 JsonReader reader = new JsonReader(new StringReader("[]")); in testReadEmptyArray() local
39 reader.beginArray(); in testReadEmptyArray()
40 assertFalse(reader.hasNext()); in testReadEmptyArray()
41 reader.endArray(); in testReadEmptyArray()
[all …]
/frameworks/base/core/tests/coretests/src/com/android/internal/util/
DProcFileReaderTest.java31 final ProcFileReader reader = buildReader(""); in testEmpty() local
33 assertFalse(reader.hasMoreData()); in testEmpty()
35 reader.finishLine(); in testEmpty()
40 assertFalse(reader.hasMoreData()); in testEmpty()
44 final ProcFileReader reader = buildReader("a\nb\nc\n"); in testSingleString() local
46 assertEquals("a", reader.nextString()); in testSingleString()
47 reader.finishLine(); in testSingleString()
48 assertTrue(reader.hasMoreData()); in testSingleString()
50 assertEquals("b", reader.nextString()); in testSingleString()
51 reader.finishLine(); in testSingleString()
[all …]
DFileRotatorTest.java77 final RecordingReader reader = new RecordingReader(); in testEmpty() local
81 rotate1.combineActive(reader, writer("foo"), currentTime); in testEmpty()
82 reader.assertRead(); in testEmpty()
93 final RecordingReader reader = new RecordingReader(); in testCombine() local
97 rotate.combineActive(reader, writer("foo"), currentTime); in testCombine()
98 reader.assertRead(); in testCombine()
104 reader.reset(); in testCombine()
105 rotate.combineActive(reader, writer("bar"), currentTime); in testCombine()
106 reader.assertRead("foo"); in testCombine()
114 final RecordingReader reader = new RecordingReader(); in testRotate() local
[all …]
/frameworks/base/core/java/com/android/internal/net/
DNetworkStatsFactory.java78 ProcFileReader reader = null; in readNetworkStatsSummaryDev() local
80 reader = new ProcFileReader(new FileInputStream(mStatsXtIfaceAll)); in readNetworkStatsSummaryDev()
82 while (reader.hasMoreData()) { in readNetworkStatsSummaryDev()
83 entry.iface = reader.nextString(); in readNetworkStatsSummaryDev()
88 final boolean active = reader.nextInt() != 0; in readNetworkStatsSummaryDev()
91 entry.rxBytes = reader.nextLong(); in readNetworkStatsSummaryDev()
92 entry.rxPackets = reader.nextLong(); in readNetworkStatsSummaryDev()
93 entry.txBytes = reader.nextLong(); in readNetworkStatsSummaryDev()
94 entry.txPackets = reader.nextLong(); in readNetworkStatsSummaryDev()
98 entry.rxBytes += reader.nextLong(); in readNetworkStatsSummaryDev()
[all …]
/frameworks/ex/variablespeed/jni/
Dring_buffer.cc61 int RingBuffer::available(int reader) const { in available()
62 return head_logical_ - readers_[reader]; in available()
74 int64 RingBuffer::Tell(int reader) const { in Tell()
75 return readers_[reader]; in Tell()
78 void RingBuffer::Seek(int reader, int64 position) { in Seek() argument
79 readers_[reader] = position; in Seek()
101 void RingBuffer::Copy(int reader, float* destination, int num_frames) const { in Copy() argument
102 int pos = Tell(reader) % size_; in Copy()
116 float* RingBuffer::GetPointer(int reader, int num_frames) { in GetPointer() argument
117 int pos = Tell(reader) % size_; in GetPointer()
[all …]
Dring_buffer.h49 int64 Tell(int reader) const;
54 void Seek(int reader, int64 position);
60 void Copy(int reader, float* destination, int num_frames) const;
75 int available(int reader) const;
85 float* GetPointer(int reader, int num_frames);
94 void MergeBack(int reader, const float* source, int num_frames);
/frameworks/base/core/java/android/util/
DXml.java55 XMLReader reader = new ExpatReader(); in parse() local
56 reader.setContentHandler(contentHandler); in parse()
57 reader.parse(new InputSource(new StringReader(xml))); in parse()
69 XMLReader reader = new ExpatReader(); in parse() local
70 reader.setContentHandler(contentHandler); in parse()
71 reader.parse(new InputSource(in)); in parse()
80 XMLReader reader = new ExpatReader(); in parse() local
81 reader.setContentHandler(contentHandler); in parse()
84 reader.parse(source); in parse()
DEventLog.java227 BufferedReader reader = null; in readTagsFile() local
231 reader = new BufferedReader(new FileReader(TAGS_FILE), 256); in readTagsFile()
232 while ((line = reader.readLine()) != null) { in readTagsFile()
254 try { if (reader != null) reader.close(); } catch (IOException e) {} in readTagsFile()
/frameworks/base/core/jni/
Dandroid_backup_BackupDataInput.cpp54 BackupDataReader* reader = (BackupDataReader*)r; in readNextHeader_native() local
58 err = reader->ReadNextHeader(&done, &type); in readNextHeader_native()
72 err = reader->ReadEntityHeader(&key, &dataSize); in readNextHeader_native()
95 BackupDataReader* reader = (BackupDataReader*)r; in readEntityData_native() local
107 err = reader->ReadEntityData(dataBytes+offset, size); in readEntityData_native()
118 BackupDataReader* reader = (BackupDataReader*)r; in skipEntityData_native() local
120 err = reader->SkipEntityData(); in skipEntityData_native()
Dandroid_backup_FileBackupHelperBase.cpp84 BackupDataReader* reader = (BackupDataReader*)backupReaderPtr; in writeFile_native() local
89 err = restore->WriteFile(String8(filename), reader); in writeFile_native()
/frameworks/base/media/mca/filterfw/java/android/filterfw/io/
DTextGraphReader.java49 public void execute(TextGraphReader reader) throws GraphIOException; in execute() argument
60 public void execute(TextGraphReader reader) throws GraphIOException { in execute() argument
62 reader.mFactory.addPackage(mPackageName); in execute()
77 public void execute(TextGraphReader reader) { in execute() argument
78 reader.mFactory.addFilterLibrary(mLibraryName); in execute()
91 public void execute(TextGraphReader reader) throws GraphIOException { in execute() argument
95 filter = reader.mFactory.createFilterByClassName(mClassName, mFilterName); in execute()
101 reader.mCurrentFilter = filter; in execute()
113 public void execute(TextGraphReader reader) throws GraphIOException { in execute() argument
114 Filter filter = reader.mCurrentFilter; in execute()
[all …]
DGraphReader.java43 InputStreamReader reader = new InputStreamReader(inputStream); in readGraphResource() local
48 while ((bytesRead = reader.read(buffer, 0, 1024)) > 0) { in readGraphResource()
/frameworks/base/cmds/backup/
Dbackup.cpp66 BackupDataReader reader(fd); in perform_list() local
70 while (reader.ReadNextHeader(&done, &type) == 0) { in perform_list()
79 err = reader.ReadEntityHeader(&key, &dataSize); in perform_list()
/frameworks/base/tests/DumpRenderTree2/src/com/android/dumprendertree2/
DFsUtils.java237 BufferedReader reader = in getLayoutTestsDirContents()
241 while ((line = reader.readLine()) != null) { in getLayoutTestsDirContents()
245 if (reader != null) { in getLayoutTestsDirContents()
246 reader.close(); in getLayoutTestsDirContents()
288 BufferedReader reader = new BufferedReader(new FileReader(file)); in loadTestListFromStorage() local
290 while ((line = reader.readLine()) != null) { in loadTestListFromStorage()
293 reader.close(); in loadTestListFromStorage()
/frameworks/native/opengl/tools/glgen/src/
DParameterChecker.java24 public ParameterChecker(BufferedReader reader) throws Exception { in ParameterChecker() argument
26 while ((s = reader.readLine()) != null) { in ParameterChecker()
/frameworks/base/core/java/com/android/internal/util/
DFileRotator.java188 public void combineActive(final Reader reader, final Writer writer, long currentTimeMillis) in combineActive() argument
198 reader.read(in); in combineActive()
285 public void readMatching(Reader reader, long matchStartMillis, long matchEndMillis) in readMatching() argument
296 readFile(file, reader); in readMatching()
363 private static void readFile(File file, Reader reader) throws IOException { in readFile() argument
367 reader.read(bis); in readFile()
/frameworks/base/core/tests/coretests/src/android/net/http/
DDefaultHttpClientTest.java90 Reader reader = new InputStreamReader(response.getEntity().getContent()); in contentToString() local
92 while ((length = reader.read(buffer)) != -1) { in contentToString()
95 reader.close(); in contentToString()
/frameworks/base/services/input/
DInputManager.cpp37 const sp<InputReaderInterface>& reader, in InputManager() argument
39 mReader(reader), in InputManager()
/frameworks/base/tests/backup/src/com/android/backuptest/
DBackupTestActivity.java62 BufferedReader reader = null;
64 reader = new BufferedReader(new InputStreamReader(openFileInput(FILE_NAME)));
65 while (reader.ready()) {
67 str.append(reader.readLine());
/frameworks/base/media/mca/effect/java/android/media/effect/
DFilterGraphEffect.java73 GraphReader reader = new TextGraphReader(); in createGraph() local
75 mGraph = reader.readGraphString(graphString); in createGraph()
/frameworks/av/media/libnbaio/
DREADME.txt23 will lose data if reader doesn't keep up
27 supports 1 writer and 1 reader
/frameworks/base/media/tests/MediaDump/src/com/android/mediadump/
DRgbPlayerActivity.java139 BufferedReader reader = new BufferedReader( in RgbView() local
142 while ((line = reader.readLine()) != null) { in RgbView()
145 reader.close(); in RgbView()
/frameworks/compile/libbcc/lib/ExecutionEngine/
DELFObjectLoaderImpl.cpp33 ArchiveReaderLE reader(reinterpret_cast<const unsigned char *>(pMem), in load()
36 mObject = ELFObject<32>::read(reader); in load()
/frameworks/base/media/mca/filterfw/java/android/filterfw/
DGraphEnvironment.java99 public GraphEnvironment(FrameManager frameManager, GraphReader reader) { in GraphEnvironment() argument
101 mGraphReader = reader; in GraphEnvironment()
/frameworks/base/libs/androidfw/
DBackupHelpers.cpp1194 test_read_header_and_entity(BackupDataReader& reader, const char* str) in test_read_header_and_entity() argument
1208 err = reader.ReadNextHeader(&done, &type); in test_read_header_and_entity()
1222 err = reader.ReadEntityHeader(&string, &actualSize); in test_read_header_and_entity()
1239 nRead = reader.ReadEntityData(buf, bufSize); in test_read_header_and_entity()
1241 err = reader.Status(); in test_read_header_and_entity()
1297 BackupDataReader reader(fd); in backup_helper_test_data_reader() local
1302 err = test_read_header_and_entity(reader, "no_padding_"); in backup_helper_test_data_reader()
1306 err = test_read_header_and_entity(reader, "padded_to__3"); in backup_helper_test_data_reader()
1310 err = test_read_header_and_entity(reader, "padded_to_2__"); in backup_helper_test_data_reader()
1314 err = test_read_header_and_entity(reader, "padded_to1"); in backup_helper_test_data_reader()

123