* @param buffer the buffer to use for the transfers from the server. If
* null, a default 4MB buffer will be used.
*/
public DownloadHelper(EsuApi esuApi, byte[] buffer) {
this.esu = esuApi;
this.buffer = new BufferSegment(
buffer == null ? new byte[DEFAULT_BUFFSIZE] : buffer);
listeners = new ArrayList<ProgressListener>();
}