com.qcloud.cos.internal.ServiceClientHolderInputStream Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of cos_api Show documentation
Show all versions of cos_api Show documentation
qcloud cos sdk for inner tencentyun
The newest version!
package com.qcloud.cos.internal;
import java.io.InputStream;
import com.qcloud.cos.COSClient;
/**
* This wrapper input stream holds a reference to the service client. This is
* mainly done to avoid the COSClient object being garbage
* collected when the client reads data from the input stream.
*
*/
public class ServiceClientHolderInputStream extends SdkFilterInputStream {
@SuppressWarnings("unused")
private COSClient client;
public ServiceClientHolderInputStream(InputStream in,
COSClient client) {
super(in);
this.client = client;
}
}