Android examples for File Input Output:Byte Array Copy
copy Bytes Into Byte Array Up To Length
//package com.java2s; public class Main { public static void copyBytesIntoByteArrayUpToLength(byte[] dest, byte[] src, int offset) { for (int i = 0; i < offset; i++) { dest[i] = src[i];//from ww w . ja v a2 s. c o m } } }