"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "hsqldb/src/org/hsqldb/jdbc/JDBCBlobFile.java" between
hsqldb-2.7.0.zip and hsqldb-2.7.1.zip

About: HSQLDB (HyperSQL DataBase) is a SQL relational database engine written in Java. It supports nearly full ANSI-92 SQL (BNF format) and full core SQL:2008.

JDBCBlobFile.java  (hsqldb-2.7.0):JDBCBlobFile.java  (hsqldb-2.7.1)
skipping to change at line 81 skipping to change at line 81
* *
* Although it is possible to implement a transactional version of this class, * Although it is possible to implement a transactional version of this class,
* the present implementation directly propagates changes to the underlying * the present implementation directly propagates changes to the underlying
* file such that changes become visible as soon as they are either * file such that changes become visible as soon as they are either
* implicitly or explicitly flushed to disk. * implicitly or explicitly flushed to disk.
* <p> * <p>
* *
* </div> * </div>
* <!-- end release-specific documentation --> * <!-- end release-specific documentation -->
* @author Campbell Burnet (campbell-burnet@users dot sourceforge.net) * @author Campbell Burnet (campbell-burnet@users dot sourceforge.net)
* @version 2.5.0 * @version 2.7.1
* @since HSQLDB 2.1 * @since HSQLDB 2.1
*/ */
public class JDBCBlobFile implements java.sql.Blob { public class JDBCBlobFile implements java.sql.Blob {
private static final FrameworkLogger LOG = FrameworkLogger.getLog( private static final FrameworkLogger LOG = FrameworkLogger.getLog(
JDBCBlobFile.class); JDBCBlobFile.class);
/** /**
* Returns the number of bytes in the <code>BLOB</code> value * Returns the number of bytes in the <code>BLOB</code> value
* designated by this <code>Blob</code> object. * designated by this <code>Blob</code> object.
* @return length of the <code>BLOB</code> in bytes * @return length of the <code>BLOB</code> in bytes
skipping to change at line 621 skipping to change at line 621
final long length) throws SQLException { final long length) throws SQLException {
if (pos < 1) { if (pos < 1) {
throw JDBCUtil.outOfRangeArgument("pos: " + pos); throw JDBCUtil.outOfRangeArgument("pos: " + pos);
} }
checkClosed(); checkClosed();
InputStream result; InputStream result;
final List streams = m_streams;
try { try {
result = new InputStreamAdapter(m_file, pos - 1, length) { result = new InputStreamAdapter(m_file, pos - 1, length) {
private boolean closed; private boolean closed;
private final InputStream self = this;
public void close() throws IOException { public void close() throws IOException {
if (closed) { if (closed) {
return; return;
} }
closed = true; closed = true;
try { try {
super.close(); super.close();
} finally { } finally {
m_streams.remove(this); streams.remove(self);
} }
} }
}; };
} catch (Exception ex) { } catch (Exception ex) {
throw JDBCUtil.sqlException(ex); throw JDBCUtil.sqlException(ex);
} }
m_streams.add(result); streams.add(result);
return result; return result;
} }
/** /**
* Retrieves the canonical <code>File</code> object denoting the file that * Retrieves the canonical <code>File</code> object denoting the file that
* backs this BLOB. * backs this BLOB.
* *
* @return the file that backs this BLOB. * @return the file that backs this BLOB.
*/ */
 End of changes. 5 change blocks. 
3 lines changed or deleted 6 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)