com.obs.services.model.fs

## 类 ObsFSFile

- java.lang.Object
- - com.obs.services.internal.InternalHeaderResponse
  - - com.obs.services.model.HeaderResponse
    - - com.obs.services.model.PutObjectResult
      - - com.obs.services.model.fs.ObsFSFolder
        - - com.obs.services.model.fs.ObsFSFile

-     public class ObsFSFile
      extends ObsFSFolder

  Files in a bucket that supports the file interface

- - ### 字段概要

    - ### 从类继承的字段 com.obs.services.model.fs.ObsFSFolder

      `innerClient`

    - ### 从类继承的字段 com.obs.services.internal.InternalHeaderResponse

      `responseHeaders, statusCode`

  - ### 构造器概要

    构造器
    构造器和说明
    `ObsFSFile(String bucketName, String objectKey, String etag, String versionId, StorageClassEnum storageClass, String objectUrl)`

  - ### 方法概要

    所有方法 实例方法 具体方法
    限定符和类型 | 方法和说明
    --- | ---
    `ObsFSFile` | `append(File file)` Append data to a file.
    `ObsFSFile` | `append(InputStream input)` Append data to a file.
    `ObsFSAttribute` | `attribute()` Obtains file properties.
    `DropFileResult` | `drop()` Delete a file.
    `ReadFileResult` | `read()` Obtain the file content.
    `ReadFileResult` | `read(long rangeStart, long rangeEnd)` Obtain the file content.
    `RenameResult` | `rename(String newName)` Rename a file.
    `TruncateFileResult` | `truncate(long newLength)` Truncate a file.
    `ObsFSFile` | `write(File file)` Write data to a file.
    `ObsFSFile` | `write(File file, long position)` Write data to a file.
    `ObsFSFile` | `write(InputStream input)` Write data to a file.
    `ObsFSFile` | `write(InputStream input, long position)` Write data to a file.

    - ### 从类继承的方法 com.obs.services.model.fs.ObsFSFolder

      `checkInternalClient, dropFolder, setInnerClient`

    - ### 从类继承的方法 com.obs.services.model.PutObjectResult

      `getBucketName, getEtag, getObjectKey, getObjectStorageClass, getObjectUrl, getVersionId, toString`

    - ### 从类继承的方法 com.obs.services.model.HeaderResponse

      `getRequestId, getResponseHeaders, getStatusCode`

    - ### 从类继承的方法 com.obs.services.internal.InternalHeaderResponse

      `setResponseHeaders, setStatusCode`

    - ### 从类继承的方法 java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### 构造器详细资料

    - #### ObsFSFile

          public ObsFSFile(String bucketName,
                           String objectKey,
                           String etag,
                           String versionId,
                           StorageClassEnum storageClass,
                           String objectUrl)

  - ### 方法详细资料

    - #### attribute

          public ObsFSAttribute attribute()
                                   throws ObsException

      Obtains file properties.
      覆盖:
        `attribute` 在类中 `ObsFSFolder`
      返回:
        File properties
      抛出:
        `ObsException` - OBS SDK self-defined exception, thrown when the interface fails to be called or access to OBS fails

    - #### read

          public ReadFileResult read()
                              throws ObsException

      Obtain the file content.
      返回:
        Response to the request for obtaining file content
      抛出:
        `ObsException` - OBS SDK self-defined exception, thrown when the interface fails to be called or access to OBS fails

    - #### read

          public ReadFileResult read(long rangeStart,
                                     long rangeEnd)
                              throws ObsException

      Obtain the file content.
      参数:
        `rangeStart` - Start position for reading file content
        `rangeEnd` - End position for reading file content
      返回:
        ObsException OBS SDK self-defined exception, thrown when the interface fails to be called or access to OBS fails
      抛出:
        `ObsException`

    - #### write

          public ObsFSFile write(File file,
                                 long position)
                          throws ObsException

      Write data to a file.
      参数:
        `file` - Local path to the file
        `position` - Start position for writing data to a file
      返回:
        Files in the bucket that supports the file interface
      抛出:
        `ObsException` - OBS SDK self-defined exception, thrown when the interface fails to be called or access to OBS fails

    - #### write

          public ObsFSFile write(File file)
                          throws ObsException

      Write data to a file.
      参数:
        `file` - Local path to the file
      返回:
        Files in the bucket that supports the file interface
      抛出:
        `ObsException` - OBS SDK self-defined exception, thrown when the interface fails to be called or access to OBS fails

    - #### write

          public ObsFSFile write(InputStream input,
                                 long position)
                          throws ObsException

      Write data to a file.
      参数:
        `input` - Data stream to be uploaded
        `position` - Start position for writing data to a file
      返回:
        Files in the bucket that supports the file interface
      抛出:
        `ObsException` - OBS SDK self-defined exception, thrown when the interface fails to be called or access to OBS fails

    - #### append

          public ObsFSFile append(File file)
                           throws ObsException

      Append data to a file.
      参数:
        `file` - Local path to the file
      返回:
        Files in the bucket that supports the file interface
      抛出:
        `ObsException` - OBS SDK self-defined exception, thrown when the interface fails to be called or access to OBS fails

    - #### append

          public ObsFSFile append(InputStream input)
                           throws ObsException

      Append data to a file.
      参数:
        `input` - Data stream to be uploaded
      返回:
        Files in the bucket that supports the file interface
      抛出:
        `ObsException` - OBS SDK self-defined exception, thrown when the interface fails to be called or access to OBS fails

    - #### write

          public ObsFSFile write(InputStream input)
                          throws ObsException

      Write data to a file.
      参数:
        `input` - Data stream to be uploaded
      返回:
        Files in the bucket that supports the file interface
      抛出:
        `ObsException` - OBS SDK self-defined exception, thrown when the interface fails to be called or access to OBS fails

    - #### rename

          public RenameResult rename(String newName)
                              throws ObsException

      Rename a file.
      覆盖:
        `rename` 在类中 `ObsFSFolder`
      参数:
        `newName` - New file name
      返回:
        Response to the request for renaming a file
      抛出:
        `ObsException` - OBS SDK self-defined exception, thrown when the interface fails to be called or access to OBS fails

    - #### truncate

          public TruncateFileResult truncate(long newLength)
                                      throws ObsException

      Truncate a file.
      参数:
        `newLength` - File size after the truncation
      返回:
        Response to the request for truncating a file
      抛出:
        `ObsException` - OBS SDK self-defined exception, thrown when the interface fails to be called or access to OBS fails

    - #### drop

          public DropFileResult drop()
                              throws ObsException

      Delete a file.
      返回:
        Response to the request for deleting a file
      抛出:
        `ObsException` - OBS SDK self-defined exception, thrown when the interface fails to be called or access to OBS fails

Copyright © 2021. All rights reserved.