首 页 | 新 闻 | Symbian | Android| Windows Mobile | J2ME | 下载中心 | 游戏策划招聘与求职 | 购书指南 | 视频教程
您现在的位置: 开发视界 >> J2ME >> 数据与存储 >> 正文
RMS从入门到精通之三
作者:mingjava    文章来源:j2medev.com    更新时间:2006-12-1 18:15:59
  catch( RecordStoreException e ){

                    logger.logException( rs, e );

                }

            }

        } catch( RecordStoreException e ){

            logger.logException( rs, e );

        } finally {

            logger.logEnd( rs );

        }

    }

    // A logger that outputs to a PrintStream.

    public static class PrintStreamLogger implements Logger {

        public static final int COLS_MIN = 10;

        public static final int COLS_DEFAULT = 20;

         private int   cols;

        private int  numBytes;

        private StringBuffer hBuf;

        private StringBuffer cBuf;

        private StringBuffer pBuf;

        private PrintStream  out;

         public PrintStreamLogger( PrintStream out ){

            this( out, COLS_DEFAULT );

        }

         public PrintStreamLogger( PrintStream out, int cols){

            this.out = out;

            this.cols = ( cols > COLS_MIN ? cols : COLS_MIN );

        }

         private char convertChar( char ch ){

            if( ch < 0x20 ) return '.';

            return ch;

        }

         public void logEnd( RecordStore rs ){

            out.println( "\nActual size of records = "

                         + numBytes

上一页  [1] [2] [3] [4] [5] [6] [7] [8] [9] [10]  ... 下一页  >> 

相关文章:
定位API开发指南——例子:移动应用开发的定位和定位检测(4)
搭建移动开发平台
J2ME系列学习(二)
MIDP2.0式样探索之六
MIDP2.0式样探索之五
MIDP2.0式样探索之四
MIDP2.0式样探索之二
RMS概念解析与使用指南
 

站点地图 | 加入收藏 | 联系站长 | 广告服务 |
QQ:280529124  Tel:0592-8271361 辽ICP备05021703号