// DownloadToStream downloads the file with the specified fileID and writes it to the provided io.Writer.
// Returns the number of bytes written to the steam and an error, or nil if there was no error.
//
// If this download requires a custom read deadline to be set on the bucket, it cannot be done concurrently with other
// read operations operations on this bucket that also require a custom deadline.
DownloadToStream downloads the file with the specified fileID and writes it to the provided io.Writer.
Returns the number of bytes written to the steam and an error, or nil if there was no error.

If this download requires a custom read deadline to be set on the bucket, it cannot be done concurrently with other
read operations operations on this bucket that also require a custom deadline.
// DownloadToStream downloads the file with the specified fileID and writes it to the provided io . Writer . // Returns the number of bytes written to the steam and an error or nil if there was no error . // // If this download requires a custom read deadline to be set on the bucket it cannot be done concurrently with other // read operations operations on this bucket that also require a custom deadline .
func (b *Bucket) DownloadToStream(fileID interface{}, stream io.Writer) (int64, error) {
	ds, err := b.OpenDownloadStream(fileID)
	if err != nil {
		return 0, err
	}
	return b.downloadToStream(ds, stream)
}
func ( b * Bucket ) DownloadToStream ( fileID interface { } , stream io . Writer ) ( int64 , error ) { ds , err := b . OpenDownloadStream ( fileID ) if err != nil { return 0 , err } return b . downloadToStream ( ds , stream ) }
DownloadToStream downloads the file with the specified fileID and writes it to the provided io.Writer.
DownloadToStream downloads the file with the specified fileID and writes it to the provided io . Writer .