Class FileResponseHeaderProperties

java.lang.Object
com.azure.compute.batch.models.FileResponseHeaderProperties

public class FileResponseHeaderProperties extends Object
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 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

      public OffsetDateTime 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

      public String getOcpBatchFileUrl()
      Retrieves the URL of the file.
      Returns:
      The URL of the file as a string.
    • getOcpBatchFileMode

      public 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.