mirror of
https://github.com/DSpace/DSpace.git
synced 2025-10-07 01:54:22 +00:00
[DS-182] Speed up SWORD deposits
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3711 9c30dcfa-912a-0410-8fc2-9e0234be79fd
This commit is contained in:
@@ -214,18 +214,23 @@ public class DepositServlet extends HttpServlet {
|
||||
// Write the file to the temp directory
|
||||
filename = tempDirectory + "SWORD-"
|
||||
+ request.getRemoteAddr() + "-" + counter.addAndGet(1);
|
||||
InputStream inputStream = request.getInputStream();
|
||||
OutputStream outputStream = new FileOutputStream(filename);
|
||||
try {
|
||||
int data;
|
||||
while ((data = inputStream.read()) != -1) {
|
||||
outputStream.write(data);
|
||||
}
|
||||
} finally {
|
||||
inputStream.close();
|
||||
outputStream.close();
|
||||
}
|
||||
|
||||
InputStream inputstream = request.getInputStream();
|
||||
OutputStream outputstream = new FileOutputStream(new File(filename));
|
||||
try
|
||||
{
|
||||
byte[] buf = new byte[1024];
|
||||
int len;
|
||||
while ((len = inputstream.read(buf)) > 0)
|
||||
{
|
||||
outputstream.write(buf, 0, len);
|
||||
}
|
||||
}
|
||||
finally
|
||||
{
|
||||
inputstream.close();
|
||||
outputstream.close();
|
||||
}
|
||||
|
||||
// Check the size is OK
|
||||
File file = new File(filename);
|
||||
long fLength = file.length() / 1024;
|
||||
|
@@ -38,7 +38,8 @@
|
||||
- [2696133] New export option (migrate) and fix for Jira [DS-59]
|
||||
- [DS-113] Export item buttons
|
||||
- Fix for Jira [DS-127] Item exporter does not export bitsteam descriptions
|
||||
|
||||
- [DS-182] Speed up SWORD deposits
|
||||
|
||||
(Stuart Lewis / Chris Yates / Flavio Botelho / Alex Barbieri / Reuben Pasquini / Paulo Matos)
|
||||
- [DS-16] [2057378] Hierarchical LDAP support
|
||||
|
||||
|
Reference in New Issue
Block a user