Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
InputStream inputStream = context.getResources().openRawResource(R.raw.meuarquivo);
DataInputStream dataInputStream = new DataInputStream(inputStream);
byte [] fileBytes = new byte [(int) inputStream.available()];
dataInputStream.readFully(fileBytes);
dataInputStream.close();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment