当我正在研究TMS320F2806x(Piccolo)MCU的架构时,我发现其中的一个功能是6通道DMA.你能否详细说明DMA 的渠道是什么意思?
我试图使用setRequestProperty("Range","bytes ="+ startbytes +" - "+ endbytes)下载给定下载URL的文件的一部分; 以下代码段显示了我要执行的操作.
protected String doInBackground(String... aurl) {
int count;
Log.d(TAG,"Entered");
try {
URL url = new URL(aurl[0]);
HttpURLConnection connection =(HttpURLConnection) url.openConnection();
int lengthOfFile = connection.getContentLength();
Log.d(TAG,"Length of file: "+ lengthOfFile);
connection.setRequestProperty("Range", "bytes=" + 0 + "-" + 1000);
Run Code Online (Sandbox Code Playgroud)
问题在于,引发了一个异常,即"在建立连接后无法设置请求属性".请帮我解决这个问题.