| | |
| | | elmLogger.flashLogging(); |
| | | } |
| | | |
| | | protected static byte[] getBytesFromBLOB(BLOB blob) throws SQLException |
| | | protected byte[] getBytesFromBLOB(BLOB blob) throws SQLException |
| | | { |
| | | byte[] raw = null; |
| | | |
| | |
| | | buffer.put(chunk); |
| | | } |
| | | |
| | | is.close(); |
| | | |
| | | assert buffer != null; |
| | | buffer.position(0); |
| | | raw = buffer.array(); |
| | |
| | | { |
| | | e.printStackTrace(); // To change body of catch statement use File | Settings | File Templates. |
| | | Assert.shouldNeverReachHere(); |
| | | } finally |
| | | { |
| | | try { is.close(); } catch (IOException e) { logger.warn("InputStream cannot close", e); }; |
| | | } |
| | | |
| | | return raw; |
| | |
| | | BLOB blob = (BLOB) rsSrc.getBlob(1); |
| | | |
| | | raw = getBytesFromBLOB(blob); |
| | | blob.close(); |
| | | // blob.close(); |
| | | } else |
| | | { |
| | | raw = rsSrc.getBytes(1); |