Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- InputStream in = null;
- try {
- in = getBaseContext().getContentResolver().openInputStream(imageUri);
- } catch (IOException e) {
- e.printStackTrace();
- } catch (NullPointerException e) {
- e.printStackTrace();
- return;
- }
- byte[] buf = new byte[0];
- try {
- assert in != null;
- buf = new byte[in.available()];
- while (in.read(buf) != -1) ;
- } catch (IOException e) {
- e.printStackTrace();
- } catch (NullPointerException e) {
- e.printStackTrace();
- return;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement