需要先把远程文件转为输入流 再本地转为输出流 再转成输入流 上传到oss
InputStream inputStream = new URL("下载 地址").openStream();
ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
byte[] bytes = new byte[1024];
int lenth=0;
while (((lenth = inputStream.read(bytes)))>-1){
byteArrayOutputStream.write(bytes,0,lenth);
}
InputStream byteArrayInputStream = new ByteArrayInputStream(byteArrayOutputStream.toByteArray());