| 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] ... 下一页 >> |