@Test public void testGetBlobAsBytes() throws SQLException { lobHandler.getBlobAsBytes(rs, 1); verify(rs).getBytes(1); }
private Object getBlobAsObject(ResultSet rs, String columnName) throws SQLException { byte[] bytes = this.lobHandler.getBlobAsBytes(rs, columnName); return this.conversionService.convert(bytes, TypeDescriptor.valueOf(byte[].class), TypeDescriptor.valueOf(Object.class)); }
@Override public Message<?> mapRow(ResultSet rs, int rowNum) throws SQLException { byte[] blobAsBytes = this.lobHandler.getBlobAsBytes(rs, "MESSAGE_BYTES"); if (blobAsBytes == null) { return null; } else { return (Message<?>) this.deserializer.convert(blobAsBytes); } }
@Override public Message<?> mapRow(ResultSet rs, int rowNum) throws SQLException { byte[] messageBytes = JdbcMessageStore.this.lobHandler.getBlobAsBytes(rs, "MESSAGE_BYTES"); if (messageBytes == null) { return null; } else { return (Message<?>) JdbcMessageStore.this.deserializer.convert(messageBytes); } }
@Override protected Object nullSafeGetInternal( ResultSet rs, String[] names, Object owner, LobHandler lobHandler) throws SQLException { return lobHandler.getBlobAsBytes(rs, names[0]); }
public byte[] getBlobAsBytes(ResultSet rs, int columnIndex, int jdbcTypeCode, String jdbcTypeName) throws SQLException { return lobHandler.getBlobAsBytes(rs, columnIndex); }
protected Object getResultInternal(ResultSet rs, int index, LobHandler lobHandler) throws SQLException { return lobHandler.getBlobAsBytes(rs, index); }
ResultSet rs = st.executeQuery("SELECT * FROM test_bytea where id=" + 1); if (rs != null) { LobHandler lobHandler = new DefaultLobHandler(); byte[] myFile = lobHandler.getBlobAsBytes(rs, "type_file")); //....
@Override public Message<?> mapRow(ResultSet rs, int rowNum) throws SQLException { byte[] messageBytes = JdbcMessageStore.this.lobHandler.getBlobAsBytes(rs, "MESSAGE_BYTES"); if (messageBytes == null) { return null; } else { return (Message<?>) JdbcMessageStore.this.deserializer.convert(messageBytes); } }
@Override public Message<?> mapRow(ResultSet rs, int rowNum) throws SQLException { byte[] blobAsBytes = this.lobHandler.getBlobAsBytes(rs, "MESSAGE_BYTES"); if (blobAsBytes == null) { return null; } else { return (Message<?>) this.deserializer.convert(blobAsBytes); } }
public byte[] getBlobAsBytes(ResultSet rs, int columnIndex, int jdbcTypeCode, String jdbcTypeName) throws SQLException { if (PostgreSqlDatabasePlatform.isBlobStoredByReference(jdbcTypeName)) { return wrappedLobHandler.getBlobAsBytes(rs, columnIndex); } else { return getDefaultHandler().getBlobAsBytes(rs, columnIndex); } } }
@Override protected Object nullSafeGetInternal( ResultSet rs, String[] names, Object owner, LobHandler lobHandler) throws SQLException, UnsupportedEncodingException { byte[] bytes = lobHandler.getBlobAsBytes(rs, names[0]); if (bytes != null) { String encoding = getCharacterEncoding(); return (encoding != null ? new String(bytes, encoding) : new String(bytes)); } else { return null; } }
LobHandler lobHandler = new DefaultLobHandler(); List<FrontendData> frontEndDataList = jdbcTemplate.query(getResponseQuery(sessionId), new RowMapper() { @Override public Object mapRow(ResultSet rs, int rowNum) throws SQLException { // TODO Auto-generated method stub FrontendData frontEndData = new FrontendData(); String operationName = rs.getString("OPERATION_NAME"); frontEndData.setApiName(operationName); byte[] requestData = lobHandler.getBlobAsBytes(rs,"RESPONSE_MESSAGE"); frontEndData.setResponse(new String(requestData)); return frontEndData; }});
@Override public void processRow(ResultSet rs) throws SQLException { // InputStream in = lobHandler.getBlobAsBinaryStream(rs, "xcas"); // Work with sqlite jdbc driver InputStream in = new ByteArrayInputStream(lobHandler.getBlobAsBytes(rs, "xcas")); try { nextCas.reset(); BasePhase.deserializeCAS(nextCas.getCas(), in); processedCas = true; } catch (Exception e) { throw new SQLException(e); } }