Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- InputStream uploadedStream = item.getInputStream();
- OutputStream storableFile;
- try
- {
- storableFile = new FileOutputStream(filesDir + "/" + username + fileExt);
- // storableFile = new FileOutputStream(filesDir + AVT_DIR + "/" + username + fileExt);
- byte[] fileBytes = new byte[BUF_SIZE];
- while (uploadedStream.read(fileBytes) != -1)
- storableFile.write(fileBytes);
- uploadedStream.close();
- storableFile.close();
- success = true;
- }
Advertisement
Add Comment
Please, Sign In to add comment