共用方式為


ShareFileRange Class

  • java.lang.Object
    • com.azure.storage.file.share.models.ShareFileRange

public final class ShareFileRange

The range of a file in the storage file service.

Constructor Summary

Constructor Description
ShareFileRange(Range range)

Creates an instance of the range of a file from the passed Range.

ShareFileRange(long start)

Create an instance of the range of a file.

ShareFileRange(long start, Long end)

Create an instance of the range of a file.

Method Summary

Modifier and Type Method and Description
Long getEnd()

Gets the end of bytes to be written.

long getStart()

Gets the start of bytes to be written.

String toHeaderValue()

Gets toString() if count isn't null or offset isn't 0, otherwise null.

String toString()

Gets the string format of the ShareFileRange written into request.

Methods inherited from java.lang.Object

Constructor Details

ShareFileRange

public ShareFileRange(Range range)

Creates an instance of the range of a file from the passed Range.

Parameters:

range - Range object containing start and end of the file.

ShareFileRange

public ShareFileRange(long start)

Create an instance of the range of a file. Specify the start the range and the end defaults to the length of the file.

Parameters:

start - Specifies the start of bytes to be written.

ShareFileRange

public ShareFileRange(long start, Long end)

Create an instance of the range of a file. Both the start and end of the range must be specified.

Parameters:

start - Specifies the start of bytes to be written.
end - Specifies the end of bytes to be written

Method Details

getEnd

public Long getEnd()

Gets the end of bytes to be written.

Returns:

The end of bytes to be written.

getStart

public long getStart()

Gets the start of bytes to be written.

Returns:

The start of bytes to be written.

toHeaderValue

public String toHeaderValue()

Gets toString() if count isn't null or offset isn't 0, otherwise null.

Returns:

toString() if count isn't null or offset isn't 0, otherwise null.

toString

public String toString()

Gets the string format of the ShareFileRange written into request.

Overrides:

ShareFileRange.toString()

Returns:

The string format of the ShareFileRange written into request.

Applies to