Skip to content

Commit e9f293f

Browse files
committed
Removed duplicated method
1 parent 0fea1de commit e9f293f

1 file changed

Lines changed: 0 additions & 23 deletions

File tree

dspace-api/src/main/java/org/dspace/storage/bitstore/S3BitStoreService.java

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -321,29 +321,6 @@ public File getFile(Bitstream bitstream) throws IOException {
321321
}
322322
}
323323

324-
@Override
325-
public File getFile(Bitstream bitstream) throws IOException {
326-
String key = getFullKey(bitstream.getInternalId());
327-
// Strip -R from bitstream key if it's registered
328-
if (isRegisteredBitstream(key)) {
329-
key = key.substring(REGISTERED_FLAG.length());
330-
}
331-
try {
332-
File tempFile = File.createTempFile("s3-disk-copy-" + UUID.randomUUID(), "temp");
333-
tempFile.deleteOnExit();
334-
335-
GetObjectRequest getObjectRequest = new GetObjectRequest(bucketName, key);
336-
337-
Download download = tm.download(getObjectRequest, tempFile);
338-
download.waitForCompletion();
339-
340-
return tempFile;
341-
} catch (AmazonClientException | InterruptedException e) {
342-
log.error("getFile(" + key + ")", e);
343-
throw new IOException(e);
344-
}
345-
}
346-
347324
/**
348325
* Store a stream of bits.
349326
*

0 commit comments

Comments
 (0)