Java Code Examples for info.guardianproject.iocipher.FileInputStream#close()
The following examples show how to use
info.guardianproject.iocipher.FileInputStream#close() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: GalleryActivity.java From CameraV with GNU General Public License v3.0 | 6 votes |
public void run () { BitmapFactory.Options bounds = new BitmapFactory.Options(); bounds.inSampleSize = 8; Bitmap b; try { FileInputStream fis = new FileInputStream(fileImage); b = BitmapFactory.decodeStream(fis, null, bounds); fis.close(); mBitCache.put(fileImage.getAbsolutePath(), b); mBitLoaders.remove(fileImage.getAbsolutePath()); h.post(new Runnable() { public void run () { ((IconicList)gridview.getAdapter()).notifyDataSetChanged(); } }); //VirtualFileSystem.get().detachThread(); } catch (Exception e) { Log.e(TAG,"error decoding bitmap preview",e); } }
Example 2
Source File: SecureMediaStore.java From Zom-Android-XMPP with GNU General Public License v3.0 | 5 votes |
public static void copyToExternal(String sourcePath, java.io.File targetPath) throws IOException { // copy FileInputStream fis = new FileInputStream(new File(sourcePath)); java.io.FileOutputStream fos = new java.io.FileOutputStream(targetPath, false); IOUtils.copyLarge(fis, fos); fos.close(); fis.close(); }
Example 3
Source File: OtrDataHandler.java From Zom-Android-XMPP with GNU General Public License v3.0 | 4 votes |
private String checkSum(String filename) throws IOException { FileInputStream fis = new FileInputStream(new File(filename)); String sum = sha1sum(fis); fis.close(); return sum; }
Example 4
Source File: VideoCameraActivity.java From CameraV with GNU General Public License v3.0 | 3 votes |
public void run () { try { while (mIsRecording || (!mFrameQ.isEmpty())) { if (mFrameQ.peek() != null) { VideoFrame vf = mFrameQ.pop(); muxer.addFrame(mLastWidth, mLastHeight, ByteBuffer.wrap(vf.image),vf.fps,vf.duration); } } //now write audio FileInputStream fis = new FileInputStream(fileAudio); byte[] audioBuffer = new byte[1024*32]; int bytesRead = -1; while ((bytesRead = fis.read(audioBuffer))!=-1) { muxer.addAudio(ByteBuffer.wrap(audioBuffer, 0, bytesRead)); } muxer.finish(); fis.close(); // fos.close(); } catch (Exception e) { Log.e(TAG, "IO", e); } }