我需要从Android平板电脑向服务器发送一个大文件.
所以现在我正在使用Android Annotation它,但现在我得到OutOfMemory Exception因为我的文件大于35MB.我搜索过,并且我不明白,如果我使用FileOutputStream连接,我可以避免这种异常.
但是如何使用我的连接获取输出流@Rest AndroidAnnotation Class?
这是我的代码:
@Rest(converters = {FormHttpMessageConverter.class, MappingJackson2HttpMessageConverter.class}
/*, interceptors=MyClientHttpRequestInterceptor.class*/)
public interface DbRestClient extends RestClientErrorHandling{
void setRootUrl(String rootUrl);
String getRootUrl();
void setRestTemplate(RestTemplate restTemplate);
RestTemplate getRestTemplate();
@Post("dbSynk/postNew")
Integer postDb(MultiValueMap file);
}
Run Code Online (Sandbox Code Playgroud)
进入我的@EService:
@RestService DbRestClient dbRestClient;
...
dbRestClient.postDb(file)
Run Code Online (Sandbox Code Playgroud)
你有什么想法吗?
我有一个带有对象列表的 jgGrid,我想选择加载页面上的所有行。这是我的代码
multiselect: true,
loadComplete: function(){
var ids = $("#listDaFatturare").jqGrid('getDataIDs');
for(var i = 0; i <= ids.length; i++){
$("#list").jqGrid('setSelection', i, true);
}
},
Run Code Online (Sandbox Code Playgroud)
但不要运行,在我看来,我只看到选择了一行。我不明白问题出在哪里,我尝试调试代码,显然没有问题。
有任何想法吗?