public static final byte [ ] cloneSubArray ( byte [ ] data , int offset , int size ) { byte [ ] newData = new byte [ size ] ; System . arraycopy ( data , offset , newData , 0 , size ) ; return ( newData ) ; }
This method allows a subsection of a byte array to be copied .