mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
ALF-4865 - transfer service: transfer empty content property
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@22682 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -307,22 +307,22 @@ public class HttpClientTransmitterImpl implements TransferTransmitter
|
||||
|
||||
int responseStatus = httpClient.executeMethod(hostConfig, postSnapshotRequest, httpState);
|
||||
checkResponseStatus("sendManifest", responseStatus, postSnapshotRequest);
|
||||
|
||||
|
||||
InputStream is = postSnapshotRequest.getResponseBodyAsStream();
|
||||
InputStreamReader reader = new InputStreamReader(is);
|
||||
|
||||
BufferedReader br = new BufferedReader(reader);
|
||||
BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(result));
|
||||
|
||||
String s = br.readLine();
|
||||
while(s != null)
|
||||
final ReadableByteChannel inputChannel = Channels.newChannel(is);
|
||||
final WritableByteChannel outputChannel = Channels.newChannel(result);
|
||||
try
|
||||
{
|
||||
bw.write(s);
|
||||
s = br.readLine();
|
||||
// copy the channels
|
||||
channelCopy(inputChannel, outputChannel);
|
||||
}
|
||||
bw.close();
|
||||
|
||||
finally
|
||||
{
|
||||
inputChannel.close();
|
||||
outputChannel.close();
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
catch (RuntimeException e)
|
||||
|
Reference in New Issue
Block a user