public final class TransferResource extends java.lang.Object
| Constructor | Description |
|---|---|
TransferResource(java.lang.String repositoryUrl,
java.lang.String resourceName,
java.io.File file,
RequestTrace trace) |
Deprecated.
|
TransferResource(java.lang.String repositoryId,
java.lang.String repositoryUrl,
java.lang.String resourceName,
java.io.File file,
RequestTrace trace) |
Creates a new transfer resource with the specified properties.
|
| Modifier and Type | Method | Description |
|---|---|---|
long |
getContentLength() |
The size of the resource in bytes.
|
java.io.File |
getFile() |
Gets the local file being uploaded or downloaded.
|
java.lang.String |
getRepositoryId() |
The ID of the repository, e.g., "central".
|
java.lang.String |
getRepositoryUrl() |
The base URL of the repository, e.g.
|
java.lang.String |
getResourceName() |
The path of the resource relative to the repository's base URL, e.g.
|
long |
getResumeOffset() |
Gets the byte offset within the resource from which the download starts.
|
RequestTrace |
getTrace() |
Gets the trace information that describes the higher level request/operation during which this resource is
transferred.
|
long |
getTransferStartTime() |
Gets the timestamp when the transfer of this resource was started.
|
TransferResource |
setContentLength(long contentLength) |
Sets the size of the resource in bytes.
|
TransferResource |
setResumeOffset(long resumeOffset) |
Sets the byte offset within the resource at which the download starts.
|
java.lang.String |
toString() |
@Deprecated public TransferResource(java.lang.String repositoryUrl, java.lang.String resourceName, java.io.File file, RequestTrace trace)
TransferResource(java.lang.String, java.lang.String,
java.lang.String, java.io.File, org.eclipse.aether.RequestTrace)repositoryUrl - The base URL of the repository, may be null or empty if unknown. If not empty, a
trailing slash will automatically be added if missing.resourceName - The relative path to the resource within the repository, may be null. A leading slash
(if any) will be automatically removed.file - The source/target file involved in the transfer, may be null.trace - The trace information, may be null.public TransferResource(java.lang.String repositoryId, java.lang.String repositoryUrl, java.lang.String resourceName, java.io.File file, RequestTrace trace)
repositoryId - The ID of the repository used to transfer the resource, may be null or empty if unknown.repositoryUrl - The base URL of the repository, may be null or empty if unknown. If not empty, a
trailing slash will automatically be added if missing.resourceName - The relative path to the resource within the repository, may be null. A leading slash
(if any) will be automatically removed.file - The source/target file involved in the transfer, may be null.trace - The trace information, may be null.public java.lang.String getRepositoryId()
null.public java.lang.String getRepositoryUrl()
null.public java.lang.String getResourceName()
null.public java.io.File getFile()
null if none.public long getContentLength()
started.public TransferResource setContentLength(long contentLength)
contentLength - The size of the resource in bytes or a negative value if unknown.null.public long getResumeOffset()
0 means the transfer starts at the first byte.public TransferResource setResumeOffset(long resumeOffset)
resumeOffset - The zero-based index of the first byte being transferred, must not be negative.null.public long getTransferStartTime()
public RequestTrace getTrace()
null if none.public java.lang.String toString()
toString in class java.lang.Object