类 ObsFSFile

java.lang.Object
com.obs.services.internal.service.InternalHeaderResponse

public class ObsFSFile extends ObsFSFolder
Files in a bucket that supports the file interface
  • 构造器详细资料

  • 方法详细资料

    • 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