Package com.azure.compute.batch.models
Class FileResponseHeaderProperties
java.lang.Object
com.azure.compute.batch.models.FileResponseHeaderProperties
Class representing the properties of a file on a Compute Node or Task in Azure Batch.
The properties are extracted from the HTTP response headers received from a Batch service request.
-
Constructor Summary
ConstructorsConstructorDescriptionFileResponseHeaderProperties
(com.azure.core.http.HttpHeaders headers) Constructs a FileResponseHeaderProperties object from HTTP response headers. -
Method Summary
Modifier and TypeMethodDescriptionlong
Retrieves the length of the file.Retrieves the file mode attribute in octal format.Retrieves the URL of the file.Retrieves the creation time of the file.boolean
Determines whether the file object represents a directory.
-
Constructor Details
-
FileResponseHeaderProperties
public FileResponseHeaderProperties(com.azure.core.http.HttpHeaders headers) Constructs a FileResponseHeaderProperties object from HTTP response headers.- Parameters:
headers
- The HttpHeaders object containing the headers from which to extract file properties.
-
-
Method Details
-
getOcpCreationTime
Retrieves the creation time of the file.- Returns:
- The creation time of the file as an OffsetDateTime object, or null if the header is not present.
-
isOcpBatchFileIsDirectory
public boolean isOcpBatchFileIsDirectory()Determines whether the file object represents a directory.- Returns:
- True if the file object represents a directory, false otherwise.
-
getOcpBatchFileUrl
Retrieves the URL of the file.- Returns:
- The URL of the file as a string.
-
getOcpBatchFileMode
Retrieves the file mode attribute in octal format.- Returns:
- The file mode attribute of the file as a string in octal format.
-
getContentLength
public long getContentLength()Retrieves the length of the file.- Returns:
- The length of the file as a long. If the header is not present or not parseable, returns 0.
-