Home
last modified time | relevance | path

Searched refs:inputStream (Results 1 – 25 of 78) sorted by relevance

1234

/packages/apps/UnifiedEmail/src/org/apache/james/mime4j/util/
DPositionInputStream.java28 private final InputStream inputStream; field in PositionInputStream
32 public PositionInputStream(InputStream inputStream) { in PositionInputStream() argument
33 this.inputStream = inputStream; in PositionInputStream()
41 return inputStream.available(); in available()
45 int b = inputStream.read(); in read()
52 inputStream.close(); in close()
56 inputStream.reset(); in reset()
61 return inputStream.markSupported(); in markSupported()
65 inputStream.mark(readlimit); in mark()
70 final long c = inputStream.skip(n); in skip()
[all …]
/packages/apps/WallpaperPicker2/src/com/android/wallpaper/asset/
DStreamableAsset.java111 protected void onPostExecute(InputStream inputStream) { in fetchInputStream() argument
112 streamReceiver.onInputStreamOpened(inputStream); in fetchInputStream()
165 InputStream inputStream = openInputStream(); in calculateRawDimensions() local
167 if (inputStream == null) { in calculateRawDimensions()
170 BitmapFactory.decodeStream(inputStream, null, options); in calculateRawDimensions()
171 … closeInputStream(inputStream, "There was an error closing the input stream used to calculate " in calculateRawDimensions()
191 InputStream inputStream = null; in openBitmapRegionDecoder() local
195 inputStream = openInputStream(); in openBitmapRegionDecoder()
197 if (inputStream == null) { in openBitmapRegionDecoder()
200 brd = BitmapRegionDecoder.newInstance(inputStream, true); in openBitmapRegionDecoder()
[all …]
DExifInterfaceCompat.java29 public ExifInterfaceCompat(InputStream inputStream) throws IOException { in ExifInterfaceCompat() argument
33 mFrameworkExifInterface = new android.media.ExifInterface(inputStream); in ExifInterfaceCompat()
35 mSupportExifInterface = new ExifInterface(inputStream); in ExifInterfaceCompat()
/packages/apps/Messaging/src/com/android/messaging/util/
DUriUtil.java182 public static Uri persistContentToScratchSpace(final InputStream inputStream) { in persistContentToScratchSpace() argument
185 return copyContent(context, inputStream, scratchSpaceUri); in persistContentToScratchSpace()
195 InputStream inputStream = null; in persistContentToScratchSpace() local
199 inputStream = context.getContentResolver().openInputStream(sourceUri); in persistContentToScratchSpace()
204 inputStream = new BufferedInputStream(ucon.getInputStream()); in persistContentToScratchSpace()
206 return persistContentToScratchSpace(inputStream); in persistContentToScratchSpace()
211 if (inputStream != null) { in persistContentToScratchSpace()
213 inputStream.close(); in persistContentToScratchSpace()
228 final InputStream inputStream, final File outputDir, final String contentType) { in persistContent() argument
237 return copyContent(context, inputStream, targetUri); in persistContent()
[all …]
DImageUtils.java268 public static int getOrientation(final InputStream inputStream) { in getOrientation() argument
270 if (inputStream != null) { in getOrientation()
273 exifInterface.readExif(inputStream); in getOrientation()
283 if (inputStream != null) { in getOrientation()
284 inputStream.close(); in getOrientation()
305 InputStream inputStream = contentResolver.openInputStream(contentUri); in isGif() local
306 return ImageUtils.isGif(inputStream); in isGif()
319 public static boolean isGif(InputStream inputStream) { in isGif() argument
320 if (inputStream != null) { in isGif()
323 int value = inputStream.read(gifHeaderBytes, 0, 6); in isGif()
[all …]
/packages/apps/TV/src/com/android/tv/util/images/
DBitmapUtils.java117 InputStream inputStream = null; in decodeSampledBitmapFromUriString() local
122 inputStream = context.getContentResolver().openInputStream(uri); in decodeSampledBitmapFromUriString()
127 inputStream = urlConnection.getInputStream(); in decodeSampledBitmapFromUriString()
129 inputStream = new BufferedInputStream(inputStream); in decodeSampledBitmapFromUriString()
130 inputStream.mark(MARK_READ_LIMIT); in decodeSampledBitmapFromUriString()
135 BitmapFactory.decodeStream(inputStream, null, options); in decodeSampledBitmapFromUriString()
139 inputStream.reset(); in decodeSampledBitmapFromUriString()
144 close(inputStream, urlConnection); in decodeSampledBitmapFromUriString()
146 inputStream = context.getContentResolver().openInputStream(uri); in decodeSampledBitmapFromUriString()
149 inputStream = urlConnection.getInputStream(); in decodeSampledBitmapFromUriString()
[all …]
/packages/apps/Dialer/java/com/android/dialer/shortcuts/
DIconFactory.java87 InputStream inputStream = in create() local
92 ? createAdaptiveIcon(displayName, lookupKey, inputStream) in create()
93 : createFlatIcon(displayName, lookupKey, inputStream); in create()
98 @NonNull String displayName, @NonNull String lookupKey, @Nullable InputStream inputStream) { in createAdaptiveIcon() argument
99 if (inputStream == null) { in createAdaptiveIcon()
117 Bitmap bitmap = BitmapFactory.decodeStream(inputStream); in createAdaptiveIcon()
122 @NonNull String displayName, @NonNull String lookupKey, @Nullable InputStream inputStream) { in createFlatIcon() argument
124 if (inputStream == null) { in createFlatIcon()
132 Bitmap bitmap = BitmapFactory.decodeStream(inputStream); in createFlatIcon()
/packages/apps/Messaging/src/com/android/messaging/datamodel/media/
DImageRequest.java156 final InputStream inputStream = getInputStreamForResource(); in loadBitmapInternal() local
157 if (inputStream != null) { in loadBitmapInternal()
160 BitmapFactory.decodeStream(inputStream, null, options); in loadBitmapInternal()
168 inputStream.close(); in loadBitmapInternal()
193 final InputStream inputStream = getInputStreamForResource(); in loadBitmapInternal() local
194 if (inputStream != null) { in loadBitmapInternal()
201 return BitmapFactory.decodeStream(inputStream, null, options); in loadBitmapInternal()
208 inputStream, options, sampledWidth, sampledHeight); in loadBitmapInternal()
211 inputStream.close(); in loadBitmapInternal()
/packages/inputmethods/LatinIME/java/src/com/android/inputmethod/latin/
DBinaryDictionaryFileDumper.java262 InputStream inputStream = null; in installWordListToStaging() local
287 inputStream = FileTransforms.getUncompressedStream(decryptedStream); in installWordListToStaging()
291 inputStream = FileTransforms.getUncompressedStream(decryptedStream); in installWordListToStaging()
296 inputStream = FileTransforms.getDecryptedStream(uncompressedStream); in installWordListToStaging()
299 inputStream = FileTransforms.getUncompressedStream(originalSourceStream); in installWordListToStaging()
302 inputStream = FileTransforms.getDecryptedStream(originalSourceStream); in installWordListToStaging()
305 inputStream = originalSourceStream; in installWordListToStaging()
308 bufferedInputStream = new BufferedInputStream(inputStream); in installWordListToStaging()
354 closeCloseableAndReportAnyException(inputStream); in installWordListToStaging()
533 InputStream inputStream = null; in reinitializeClientRecordInDictionaryContentProvider() local
[all …]
/packages/apps/DocumentsUI/tests/unit/com/android/documentsui/archives/
DArchiveHandleTest.java342 InputStream inputStream = archiveHandle.getInputStream( in closeInputStream_zipFile_shouldBeSuccess() local
346 assertThat(inputStream).isNotNull(); in closeInputStream_zipFile_shouldBeSuccess()
348 inputStream.close(); in closeInputStream_zipFile_shouldBeSuccess()
377 InputStream inputStream = archiveHandle.getInputStream( in getInputStream_zipFile_shouldHaveTheSameContent() local
381 assertThat(ArchiveFileTestRule.getStringFromInputStream(inputStream)) in getInputStream_zipFile_shouldHaveTheSameContent()
463 InputStream inputStream = archiveHandle.getInputStream( in getInputStream_sevenZFile_shouldHaveTheSameContent() local
467 assertThat(ArchiveFileTestRule.getStringFromInputStream(inputStream)) in getInputStream_sevenZFile_shouldHaveTheSameContent()
482 InputStream inputStream = archiveHandle.getInputStream( in getInputStream_tarGzFile_shouldHaveTheSameContent() local
486 assertThat(ArchiveFileTestRule.getStringFromInputStream(inputStream)) in getInputStream_tarGzFile_shouldHaveTheSameContent()
542 InputStream inputStream = archiveHandle.getInputStream( in getInputStream_tarBrotliFile_shouldHaveTheSameContent() local
[all …]
DArchiveFileTestRule.java122 try (InputStream inputStream = InstrumentationRegistry.getInstrumentation() in dumpAssetFile() argument
124 Files.copy(inputStream, destinationPath, StandardCopyOption.REPLACE_EXISTING); in dumpAssetFile()
164 public static String getStringFromInputStream(InputStream inputStream) throws IOException { in getStringFromInputStream() argument
165 InputStreamReader inputStreamReader = new InputStreamReader(inputStream); in getStringFromInputStream()
167 int size = inputStream.available(); in getStringFromInputStream()
DTestUtils.java71 final InputStream inputStream = in getSeekableDescriptor() argument
76 while ((bytes = inputStream.read(buffer)) != -1) { in getSeekableDescriptor()
109 final InputStream inputStream = in getNonSeekableDescriptor()
114 while ((bytes = inputStream.read(buffer)) != -1) { in getNonSeekableDescriptor()
/packages/apps/Messaging/tests/src/com/android/messaging/datamodel/action/
DReadWriteDraftMessageActionTest.java377 InputStream inputStream = null; in testBugleDatabaseDraftOperations() local
379 inputStream = mContext.getContentResolver().openInputStream(mOutputUri); in testBugleDatabaseDraftOperations()
381 final int read = inputStream.read(buffer); in testBugleDatabaseDraftOperations()
423 inputStream = null; in testBugleDatabaseDraftOperations()
425 inputStream = mContext.getContentResolver().openInputStream(mOutputUri); in testBugleDatabaseDraftOperations()
426 assertNull("Original draft content should have been deleted", inputStream); in testBugleDatabaseDraftOperations()
429 inputStream = null; in testBugleDatabaseDraftOperations()
431 inputStream = mContext.getContentResolver().openInputStream(mAnotherUri); in testBugleDatabaseDraftOperations()
433 final int read = inputStream.read(buffer); in testBugleDatabaseDraftOperations()
446 inputStream = null; in testBugleDatabaseDraftOperations()
[all …]
/packages/apps/UniversalMediaPlayer/java/com/android/pump/util/
DIoUtils.java38 InputStream inputStream = new FileInputStream(file); in readFromFile() local
40 return readFromStream(inputStream); in readFromFile()
42 close(inputStream); in readFromFile()
46 public static @NonNull byte[] readFromStream(@NonNull InputStream inputStream) in readFromStream() argument
52 while ((num = inputStream.read(buf, 0, buf.length)) >= 0) { in readFromStream()
/packages/apps/Dialer/java/com/android/incallui/
DContactsAsyncHelper.java134 InputStream inputStream = null; in doInBackground() local
137 inputStream = args.context.getContentResolver().openInputStream(args.displayPhotoUri); in doInBackground()
143 if (inputStream != null) { in doInBackground()
144 args.photo = Drawable.createFromStream(inputStream, args.displayPhotoUri.toString()); in doInBackground()
166 if (inputStream != null) { in doInBackground()
168 inputStream.close(); in doInBackground()
/packages/services/Telecomm/src/com/android/server/telecom/
DContactsAsyncHelper.java104 InputStream inputStream = null; in handleMessage() local
107 inputStream = mContentResolverAdapter.openInputStream( in handleMessage()
113 if (inputStream != null) { in handleMessage()
114 args.photo = Drawable.createFromStream(inputStream, in handleMessage()
131 if (inputStream != null) { in handleMessage()
133 inputStream.close(); in handleMessage()
/packages/apps/Settings/tests/robotests/src/com/android/settings/core/instrumentation/
DSettingsIntelligenceLogWriterTest.java63 final DataInputStream inputStream = new DataInputStream(bin); in serialize_hasSizeOne_returnCorrectData() local
64 final int size = inputStream.readInt(); in serialize_hasSizeOne_returnCorrectData()
65 final byte[] change = new byte[inputStream.readInt()]; in serialize_hasSizeOne_returnCorrectData()
66 inputStream.read(change); in serialize_hasSizeOne_returnCorrectData()
67 inputStream.close(); in serialize_hasSizeOne_returnCorrectData()
/packages/apps/UnifiedEmail/src/com/android/mail/utils/
DAttachmentUtils.java186 InputStream inputStream = null; in cacheAttachmentUri() local
198 inputStream = new AutoCloseInputStream(fileDescriptor); in cacheAttachmentUri()
209inputStream = context.getContentResolver().openInputStream(attachment.contentUri); in cacheAttachmentUri()
214 inputStream = new AutoCloseInputStream(fd); in cacheAttachmentUri()
222 int len = inputStream.read(bytes); in cacheAttachmentUri()
255 if (inputStream != null) { in cacheAttachmentUri()
256 inputStream.close(); in cacheAttachmentUri()
/packages/apps/Gallery2/gallerycommon/src/com/android/gallery3d/exif/
DExifParser.java201 private ExifParser(InputStream inputStream, int options, ExifInterface iRef) in ExifParser() argument
203 if (inputStream == null) { in ExifParser()
210 mContainExifData = seekTiffData(inputStream); in ExifParser()
211 mTiffStream = new CountedDataInputStream(inputStream); in ExifParser()
239 protected static ExifParser parse(InputStream inputStream, int options, ExifInterface iRef) in parse() argument
241 return new ExifParser(inputStream, options, iRef); in parse()
252 protected static ExifParser parse(InputStream inputStream, ExifInterface iRef) in parse() argument
254 return new ExifParser(inputStream, OPTION_IFD_0 | OPTION_IFD_1 in parse()
752 private boolean seekTiffData(InputStream inputStream) throws IOException, in seekTiffData() argument
754 CountedDataInputStream dataStream = new CountedDataInputStream(inputStream); in seekTiffData()
/packages/apps/Messaging/src/com/android/messaging/util/exif/
DExifParser.java202 private ExifParser(InputStream inputStream, int options, ExifInterface iRef) in ExifParser() argument
204 if (inputStream == null) { in ExifParser()
211 mContainExifData = seekTiffData(inputStream); in ExifParser()
212 mTiffStream = new CountedDataInputStream(inputStream); in ExifParser()
240 protected static ExifParser parse(InputStream inputStream, int options, ExifInterface iRef) in parse() argument
242 return new ExifParser(inputStream, options, iRef); in parse()
253 protected static ExifParser parse(InputStream inputStream, ExifInterface iRef) in parse() argument
255 return new ExifParser(inputStream, OPTION_IFD_0 | OPTION_IFD_1 in parse()
754 private boolean seekTiffData(InputStream inputStream) throws IOException, in seekTiffData() argument
756 CountedDataInputStream dataStream = new CountedDataInputStream(inputStream); in seekTiffData()
/packages/apps/Camera2/src/com/android/camera/exif/
DExifParser.java201 private ExifParser(InputStream inputStream, int options, ExifInterface iRef) in ExifParser() argument
203 if (inputStream == null) { in ExifParser()
210 mContainExifData = seekTiffData(inputStream); in ExifParser()
211 mTiffStream = new CountedDataInputStream(inputStream); in ExifParser()
239 protected static ExifParser parse(InputStream inputStream, int options, ExifInterface iRef) in parse() argument
241 return new ExifParser(inputStream, options, iRef); in parse()
252 protected static ExifParser parse(InputStream inputStream, ExifInterface iRef) in parse() argument
254 return new ExifParser(inputStream, OPTION_IFD_0 | OPTION_IFD_1 in parse()
752 private boolean seekTiffData(InputStream inputStream) throws IOException, in seekTiffData() argument
754 CountedDataInputStream dataStream = new CountedDataInputStream(inputStream); in seekTiffData()
/packages/apps/Dialer/java/com/android/dialer/callcomposer/camera/exif/
DExifParser.java173 private ExifParser(InputStream inputStream, int options, ExifInterface iRef) in ExifParser() argument
175 if (inputStream == null) { in ExifParser()
182 containExifData = seekTiffData(inputStream); in ExifParser()
183 tiffStream = new CountedDataInputStream(inputStream); in ExifParser()
211 protected static ExifParser parse(InputStream inputStream, int options, ExifInterface iRef) in parse() argument
213 return new ExifParser(inputStream, options, iRef); in parse()
224 protected static ExifParser parse(InputStream inputStream, ExifInterface iRef) in parse() argument
227 inputStream, in parse()
719 private boolean seekTiffData(InputStream inputStream) in seekTiffData() argument
721 CountedDataInputStream dataStream = new CountedDataInputStream(inputStream); in seekTiffData()
/packages/apps/Test/connectivity/PMC/src/com/android/pmc/
DWifiDownloadReceiver.java164 InputStream inputStream = null; in downloadFile() local
167 inputStream = connection.getInputStream(); in downloadFile()
170 while ((bytesRead = inputStream.read(buffer)) != -1) { in downloadFile()
177 if (inputStream != null) inputStream.close(); in downloadFile()
/packages/apps/DocumentsUI/src/com/android/documentsui/archives/
DReadableArchive.java230 final ParcelFileDescriptor.AutoCloseInputStream inputStream = in createForParcelFileDescriptor() argument
235 while ((bytes = inputStream.read(buffer)) != -1) { in createForParcelFileDescriptor()
304 InputStream inputStream = null; in openDocumentThumbnail() local
306 inputStream = mArchiveHandle.getInputStream(entry); in openDocumentThumbnail()
307 final ExifInterface exif = new ExifInterface(inputStream); in openDocumentThumbnail()
336 FileUtils.closeQuietly(inputStream); in openDocumentThumbnail()
/packages/apps/Dialer/java/com/android/dialer/persistentlog/
DPersistentLogFileHandler.java224 private byte[] readLog(DataInputStream inputStream) throws IOException, LogCorruptionException { in readLog() argument
227 if (inputStream.read(prefix) == -1) { in readLog()
234 int dataLength = inputStream.readInt(); in readLog()
239 inputStream.read(data); in readLog()
242 inputStream.read(postfix); in readLog()

1234