Java Reference
In-Depth Information
/** Print the resultset as a table info */
public
public abstract
abstract void
void displayTable ( String table , ResultSet rs )
throws
throws IOException , SQLException ;
public
public void
throws IOException {
out . println ( "Row Count = " + n );
void printRowCount ( int
int n ) throws
}
public
public void
void println ( String line ) throws
throws IOException {
out . println ( line );
}
public
public void
void println () throws
throws IOException {
out . println ();
}
public
public void
void print ( String lineSeg ) throws
throws IOException {
out . print ( lineSeg );
}
public
public void
void flush () {
out . flush ();
}
public
public void
void setWriter ( PrintWriter out ) {
this
this . out = out ;
}
}
Example 18-13. ResultsDecoratorText.java
package
package com . darwinsys . sql ;
import
import java.io.IOException
java.io.IOException ;
import
import java.io.PrintWriter
java.io.PrintWriter ;
import
import java.sql.ResultSet
java.sql.ResultSet ;
import
import java.sql.ResultSetMetaData
java.sql.ResultSetMetaData ;
import
import java.sql.SQLException
java.sql.SQLException ;
import
import com.darwinsys.util.Verbosity
com.darwinsys.util.Verbosity ;
/**
* Print a ResultSet in plain text.
*/
public
public class
class ResultsDecoratorText
ResultsDecoratorText extends
extends ResultsDecorator {
public
public ResultsDecoratorText ( PrintWriter out , Verbosity v ) {
super
super ( out , v );
Search WWH ::




Custom Search