am 8cbbcb1
: Merge branch \'readonly-p4-donut\' into donut
Merge commit '8cbbcb14c2d49c6d7eb9fb2d141ffd7f3d2889a2' * commit '8cbbcb14c2d49c6d7eb9fb2d141ffd7f3d2889a2': AI 148378: Allow store to create BinaryTempFileBody from a preexisting file
This commit is contained in:
commit
5bc1339921
@ -56,6 +56,15 @@ public class BinaryTempFileBody implements Body {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* An alternate way to put data into a BinaryTempFileBody is to simply supply an already-
|
||||
* created file. Note that this file will be deleted after it is read.
|
||||
* @param filePath The file containing the data to be stored on disk temporarily
|
||||
*/
|
||||
public void setFile(String filePath) {
|
||||
mFile = new File(filePath);
|
||||
}
|
||||
|
||||
public OutputStream getOutputStream() throws IOException {
|
||||
mFile = File.createTempFile("body", null, mTempDirectory);
|
||||
mFile.deleteOnExit();
|
||||
|
Loading…
Reference in New Issue
Block a user