首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >LogCat: BufferedOutputStream构造函数中使用的默认缓冲区大小。如果需要8k的缓冲区,最好是显式的

LogCat: BufferedOutputStream构造函数中使用的默认缓冲区大小。如果需要8k的缓冲区,最好是显式的
EN

Stack Overflow用户
提问于 2011-11-30 20:35:45
回答 1查看 1.1K关注 0票数 0

我试图使用asynctask在我的应用程序的Splash页面中加载一些数据,但应用程序停留在启动屏幕上,并且logcat打印:

代码语言:javascript
运行
复制
Default buffer size used in BufferedOutputStream constructor. It would be better to be explicit if an 8k buffer is required. 

以下是我的代码

代码语言:javascript
运行
复制
package com.appkon.hdtvs;

public class Splash extends Activity {

     private ChannelDB mDB;
     private TextView loading;

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.splash);  
        AppConnect.getInstance(this);
        loading =(TextView)findViewById(R.id.loading);
    }

    private class SetDB extends AsyncTask<String, String, String> {

        @Override
        protected String doInBackground(String... arg0) {
            // TODO Auto-generated method stub
            try {
               if (tabIsExist(null)==true){
                    mDB.Reset();

                    Bitmap bigbang1 = BitmapFactory.decodeResource(getResources(), R.drawable.bigbang1);
                    Bitmap bigbang2 = BitmapFactory.decodeResource(getResources(), R.drawable.bigbang2);


                    mDB.createchannelEntry(new ChannelPoster(castle4, "灵书妙探 (第四季)" ,"http://appkon.com/hdtvs/channel/castle4.xml"  ,"http://movie.douban.com/subject/6742616/" ));
                    mDB.createchannelEntry(new ChannelPoster(castle3, "灵书妙探 (第三季)" ,"http://appkon.com/hdtvs/channel/castle4.xml"  ,"http://movie.douban.com/subject/4836898/" ));

                    }
               }catch (Exception e) {


                        Intent i = new Intent();
                        i.setClassName("com.appkon.hdtvs",
                                       "com.appkon.hdtvs.HDtvs");
                        finish();
                        startActivity(i);
                    }
            return null;
        }


        protected void onProgress(String load) {
            loading.setText("载入中···");
        }

        protected void onPostExecute(String finish) {
            loading.setText("载入完成");
        }
    }


        public boolean tabIsExist(String channelS_TABLE){
            boolean result = false;
            if(channelS_TABLE == null){
                    return false;
            }
            Cursor cursor= ChannelDB.check();
            startManagingCursor(cursor);
            try {
                    if(cursor.moveToNext()){
                            int count = cursor.getInt(0);
                            if(count>0){
                                    result = true;
                            }
                    }

            } catch (Exception e) {
                Log.e(this.toString(),"error:"+e.toString());
                Intent intent = new Intent(this,HDtvs.class);  
                startActivity(intent);  
                this.finish(); 
            }                
            return result;
        }


    }

那么问题似乎出在哪里呢?是不是因为我的res图像太大了。

EN

回答 1

Stack Overflow用户

发布于 2012-05-11 20:06:28

在某些地方,使用了BufferedOutputStream,但没有使用size (第二个参数)进行构造。也许你是用lib来解决问题的。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/8326060

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档