Skip to content
Snippets Groups Projects
Commit 07d8d9df authored by Andreas Romeyke's avatar Andreas Romeyke
Browse files

- storeEntity() enhanced to use larger buffersize if srcPath is not a file

parent 6d7487aa
No related branches found
No related tags found
No related merge requests found
Pipeline #3378 passed
...@@ -73,6 +73,7 @@ import java.util.Map; ...@@ -73,6 +73,7 @@ import java.util.Map;
public class SLUBStoragePlugin extends AbstractStorageHandler { public class SLUBStoragePlugin extends AbstractStorageHandler {
private static final ExLogger log = ExLogger.getExLogger(SLUBStoragePlugin.class); private static final ExLogger log = ExLogger.getExLogger(SLUBStoragePlugin.class);
private static final String DIR_ROOT = "DIR_ROOT"; /** {@inheritDoc} */ private static final String DIR_ROOT = "DIR_ROOT"; /** {@inheritDoc} */
private static final int default_buffer = 32*1024;
public SLUBStoragePlugin() { public SLUBStoragePlugin() {
log.info("SLUBStoragePlugin instantiated"); log.info("SLUBStoragePlugin instantiated");
...@@ -305,7 +306,7 @@ public class SLUBStoragePlugin extends AbstractStorageHandler { ...@@ -305,7 +306,7 @@ public class SLUBStoragePlugin extends AbstractStorageHandler {
} }
try (OutputStream output = java.nio.file.Files.newOutputStream( Paths.get( destFilePath))) try (OutputStream output = java.nio.file.Files.newOutputStream( Paths.get( destFilePath)))
{ {
IOUtil.copy(is, output); IOUtil.copy(is, output, default_buffer);
log.debug("SLUBStoragePlugin.storeEntity() try copy was successfull"); log.debug("SLUBStoragePlugin.storeEntity() try copy was successfull");
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment