private void process(Exchange exchange) throws IOException {
final File file = exchange.getMessage().getBody(File.class);
try (InputStream inputStream = file.getInputStream()) {
LOG.debug("Read exchange: {}, with contents: {}", file.getFileInformation(), new String(inputStream.readAllBytes()));
}
}
public void configure() {
fromF("smb:%s/%s?username=%s&password=%s&path=/", service.address(), service.shareName(), service.userName(), service.password())
.process(this::process)
.to("mock:result");
}
private void process(Exchange exchange) throws IOException {
final File file = exchange.getMessage().getBody(File.class);
try (InputStream inputStream = file.getInputStream()) {
LOG.debug("Read exchange: {}, with contents: {}", file.getFileInformation(), new String(inputStream.readAllBytes()));
}
}
public void configure() {
fromF("smb:%s/%s?username=%s&password=%s&path=/", service.address(), service.shareName(), service.userName(), service.password())
.process(this::process)
.to("mock:result");
}
Copy to Clipboard
Copied!
Toggle word wrap
Toggle overflow