Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

change short video to byte array android

ByteArrayOutputStream baos = new ByteArrayOutputStream();
FileInputStream fis = new FileInputStream(new File(yourUri));

byte[] buf = new byte[1024];
int n;
while (-1 != (n = fis.read(buf)))
    baos.write(buf, 0, n);

byte[] videoBytes = baos.toByteArray();
Source by www.codeproject.com #
 
PREVIOUS NEXT
Tagged: #change #short #video #byte #array #android
ADD COMMENT
Topic
Name
9+9 =