private static void readOp(byte[] outBuffer,int dst_buff_offset,int count,byte[] srcBuffer,int read_pos,int buff_len){
  if (read_pos + count <= buff_len) {
    System.arraycopy(srcBuffer,read_pos,outBuffer,dst_buff_offset,count);
  }
 else {
    int tillEndCount=buff_len - read_pos;
    System.arraycopy(srcBuffer,read_pos,outBuffer,dst_buff_offset,tillEndCount);
    int fromStartCount=count - tillEndCount;
    System.arraycopy(srcBuffer,0,outBuffer,dst_buff_offset + tillEndCount,fromStartCount);
  }
}

private static void readOp ( byte [ ] outBuffer , int dst_buff_offset , int count , byte [ ] srcBuffer , int read_pos , int buff_len ) { if ( read_pos + count <= buff_len ) { System . arraycopy ( srcBuffer , read_pos , outBuffer , dst_buff_offset , count ) ; } else { int tillEndCount = buff_len - read_pos ; System . arraycopy ( srcBuffer , read_pos , outBuffer , dst_buff_offset , tillEndCount ) ; int fromStartCount = count - tillEndCount ; System . arraycopy ( srcBuffer , 0 , outBuffer , dst_buff_offset + tillEndCount , fromStartCount ) ; } }
utility method used for read operations
