Mercurial > hg > monetdb-java
comparison src/main/java/org/monetdb/jdbc/MonetConnection.java @ 510:13b48891ac54 onclient
add getStream to DownloadHandle
author | Joeri van Ruth <joeri.van.ruth@monetdbsolutions.com> |
---|---|
date | Thu, 19 Aug 2021 16:12:52 +0200 (2021-08-19) |
parents | 2ae90050720c |
children | bd860e850fe1 |
comparison
equal
deleted
inserted
replaced
509:455497783026 | 510:13b48891ac54 |
---|---|
3252 if (downloader == null) { | 3252 if (downloader == null) { |
3253 return "No file download handler has been registered with the JDBC driver"; | 3253 return "No file download handler has been registered with the JDBC driver"; |
3254 } | 3254 } |
3255 | 3255 |
3256 MonetDownloadHandle handle = new MonetDownloadHandle(server); | 3256 MonetDownloadHandle handle = new MonetDownloadHandle(server); |
3257 try { | 3257 downloader.handleDownload(handle, path, true); |
3258 downloader.handleDownload(handle, path, true); | 3258 if (!handle.hasBeenUsed()) { |
3259 if (!handle.hasBeenUsed()) { | 3259 String message = String.format("Call to %s.handleDownload for path '%s' sent neither data nor an error message", |
3260 String message = String.format("Call to %s.handleDownload for path '%s' sent neither data nor an error message", | 3260 downloader.getClass().getCanonicalName(), path); |
3261 downloader.getClass().getCanonicalName(), path); | 3261 throw new IOException(message); |
3262 throw new IOException(message); | 3262 } |
3263 } | 3263 handle.close(); |
3264 handle.close(); | |
3265 } finally { | |
3266 // | |
3267 } | |
3268 return handle.getError(); | 3264 return handle.getError(); |
3269 } | 3265 } |
3270 } | 3266 } |