public static void writeChunks(final OutputStream output,final List<SequenceIndexChunk> chunks,final byte[] buf) throws IOException {
  for (  final SequenceIndexChunk currentChunk : chunks) {
    ByteArrayIOUtils.longToBytesLittleEndian(currentChunk.mChunkBegin,buf,0);
    ByteArrayIOUtils.longToBytesLittleEndian(currentChunk.mChunkEnd,buf,8);
    output.write(buf,0,16);
  }
}

public static void writeChunks ( final OutputStream output , final List < SequenceIndexChunk > chunks , final byte [ ] buf ) throws IOException { for ( final SequenceIndexChunk currentChunk : chunks ) { ByteArrayIOUtils . longToBytesLittleEndian ( currentChunk . mChunkBegin , buf , 0 ) ; ByteArrayIOUtils . longToBytesLittleEndian ( currentChunk . mChunkEnd , buf , 8 ) ; output . write ( buf , 0 , 16 ) ; } }
write chunks to output
