Home
last modified time | relevance | path

Searched refs:raf (Results 1 – 6 of 6) sorted by relevance

/frameworks/base/awt/javax/imageio/stream/
DFileImageInputStream.java36 RandomAccessFile raf; field in FileImageInputStream
56 raf = new RandomAccessFile(f, "r"); in FileImageInputStream()
66 public FileImageInputStream(RandomAccessFile raf) { in FileImageInputStream() argument
67 if (raf == null) { in FileImageInputStream()
71 this.raf = raf; in FileImageInputStream()
78 int res = raf.read(); in read()
89 int numRead = raf.read(b, off, len); in read()
100 return raf.length(); in length()
112 raf.seek(pos); in seek()
113 streamPos = raf.getFilePointer(); in seek()
[all …]
DFileCacheImageInputStream.java43 private RandomAccessFile raf; field in FileCacheImageInputStream
70 raf = new RandomAccessFile(file, "rw"); in FileCacheImageInputStream()
77 if (streamPos >= raf.length()) { in read()
84 raf.seek(streamPos++); in read()
85 raf.write(b); in read()
89 raf.seek(streamPos++); in read()
90 return raf.read(); in read()
97 if (streamPos >= raf.length()) { in read()
104 raf.seek(streamPos); in read()
105 raf.write(b, off, nBytes); in read()
[all …]
DFileCacheImageOutputStream.java57 private RandomAccessFile raf; field in FileCacheImageOutputStream
82 raf = new RandomAccessFile(file, "rw"); in FileCacheImageOutputStream()
87 flushBefore(raf.length()); in close()
89 raf.close(); in close()
112 raf.write(b); in write()
120 raf.write(b, off, len); in write()
128 int res = raf.read(); in read()
140 int numRead = raf.read(b, off, len); in read()
154 raf.seek(readFromPos); in flushBefore()
158 raf.readFully(buffer); in flushBefore()
[all …]
DFileImageOutputStream.java60 public FileImageOutputStream(RandomAccessFile raf) { in FileImageOutputStream() argument
61 if (raf == null) { in FileImageOutputStream()
64 file = raf; in FileImageOutputStream()
/frameworks/base/core/java/android/os/
DNetStat.java182 RandomAccessFile raf = new RandomAccessFile(file, "r"); in getMobileStat() local
183 return getNumberFromFile(raf, file.getAbsolutePath()); in getMobileStat()
195 RandomAccessFile raf = getFile(filename); in getNumberFromFilePath() local
196 if (raf == null) { in getNumberFromFilePath()
199 return getNumberFromFile(raf, filename); in getNumberFromFilePath()
206 private static synchronized long getNumberFromFile(RandomAccessFile raf, String filename) { in getNumberFromFile() argument
208 raf.read(buf); in getNumberFromFile()
209 raf.close(); in getNumberFromFile()
214 if (raf != null) { in getNumberFromFile()
216 raf.close(); in getNumberFromFile()
/frameworks/base/core/java/com/android/internal/widget/
DLockPatternUtils.java108 RandomAccessFile raf = new RandomAccessFile(sLockPatternFilename, "r"); in checkPattern() local
109 final byte[] stored = new byte[(int) raf.length()]; in checkPattern()
110 int got = raf.read(stored, 0, stored.length); in checkPattern()
111 raf.close(); in checkPattern()
131 RandomAccessFile raf = new RandomAccessFile(sLockPatternFilename, "r"); in savedPatternExists() local
132 byte first = raf.readByte(); in savedPatternExists()
133 raf.close(); in savedPatternExists()
161 RandomAccessFile raf = new RandomAccessFile(sLockPatternFilename, "rw"); in saveLockPattern() local
164 raf.setLength(0); in saveLockPattern()
166 raf.write(hash, 0, hash.length); in saveLockPattern()
[all …]