private static class SynchronossPartHttpMessageReader.SynchronossFilePart extends SynchronossPartHttpMessageReader.SynchronossPart implements FilePart
Modifier and Type | Field and Description |
---|---|
private static java.nio.file.OpenOption[] |
FILE_CHANNEL_OPTIONS |
private java.lang.String |
filename |
Constructor and Description |
---|
SynchronossFilePart(HttpHeaders headers,
java.lang.String filename,
StreamStorage storage,
DataBufferFactory factory) |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
filename()
Return the original filename in the client's filesystem.
|
<any> |
transferTo(java.io.File destination)
Convenience method to copy the content of the file in this part to the
given destination file.
|
content, getStorage
getBufferFactory, headers, name
private static final java.nio.file.OpenOption[] FILE_CHANNEL_OPTIONS
private final java.lang.String filename
SynchronossFilePart(HttpHeaders headers, java.lang.String filename, StreamStorage storage, DataBufferFactory factory)
public java.lang.String filename()
FilePart
public <any> transferTo(java.io.File destination)
FilePart
transferTo
in interface FilePart
destination
- the target fileMono
with the result of the file transfer,
possibly IllegalStateException
if the part isn't a file