小编Pao*_*laG的帖子

如何使用AndroidAnnotation从Android发送大型文件到服务器?

我需要从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)

你有什么想法吗?

java rest android android-annotations

5
推荐指数
1
解决办法
618
查看次数

jqGrid setselection true 不起作用

我有一个带有对象列表的 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)

但不要运行,在我看来,我只看到选择了一行。我不明白问题出在哪里,我尝试调试代码,显然没有问题。

有任何想法吗?

jquery jqgrid

0
推荐指数
1
解决办法
1万
查看次数

标签 统计

android ×1

android-annotations ×1

java ×1

jqgrid ×1

jquery ×1

rest ×1