The BlobWriter Class

The BlobWriter class is the utility class used by the BlobView servlet. This class contains the methods that perform the task of retrieving the BLOB column for viewing. Unlike some of the other utility classes, this class takes on the responsibility of establishing a connection to the database and creating the prepared statement to use in the database operation. The code for this class is shown in the next few sections.

The BlobWriter Class: The Class Declaration and the main Program Block

The main class declaration for the BlobWriter class performs the imports we expect to access JNDI naming services and to use the JDBC API. For convenience, instance members are created for a JDBC Connection reference and for a PreparedStatement ...

Get J2EE™ and Beyond: Design, Develop, and Deploy World-Class Java™ Software now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.