-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #29 from rpmoore/master
Fixing a 307 retry bug
- Loading branch information
Showing
3 changed files
with
28 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
src/main/java/com/spectralogic/ds3client/Ds3InputStreamEntity.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package com.spectralogic.ds3client; | ||
|
||
|
||
import org.apache.commons.io.IOUtils; | ||
import org.apache.http.entity.ContentType; | ||
import org.apache.http.entity.InputStreamEntity; | ||
|
||
import java.io.IOException; | ||
import java.io.InputStream; | ||
import java.io.OutputStream; | ||
|
||
public class Ds3InputStreamEntity extends InputStreamEntity{ | ||
|
||
public Ds3InputStreamEntity(final InputStream inStream, final long length, final ContentType contentType) { | ||
super(inStream, length, contentType); | ||
} | ||
|
||
@Override | ||
public void writeTo(final OutputStream outStream) throws IOException { | ||
IOUtils.copy(this.getContent(), outStream); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters