Class ReadRange (2.48.1)

public final class ReadRange extends GeneratedMessageV3 implements ReadRangeOrBuilder

Describes a range of bytes to read in a BidiReadObjectRanges request.

Protobuf type google.storage.v2.ReadRange

Implements

ReadRangeOrBuilder

Static Fields

READ_ID_FIELD_NUMBER

public static final int READ_ID_FIELD_NUMBER
Field Value
Type Description
int

READ_LENGTH_FIELD_NUMBER

public static final int READ_LENGTH_FIELD_NUMBER
Field Value
Type Description
int

READ_OFFSET_FIELD_NUMBER

public static final int READ_OFFSET_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

public static ReadRange getDefaultInstance()
Returns
Type Description
ReadRange

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

newBuilder()

public static ReadRange.Builder newBuilder()
Returns
Type Description
ReadRange.Builder

newBuilder(ReadRange prototype)

public static ReadRange.Builder newBuilder(ReadRange prototype)
Parameter
Name Description
prototype ReadRange
Returns
Type Description
ReadRange.Builder

parseDelimitedFrom(InputStream input)

public static ReadRange parseDelimitedFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
ReadRange
Exceptions
Type Description
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static ReadRange parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
ReadRange
Exceptions
Type Description
IOException

parseFrom(byte[] data)

public static ReadRange parseFrom(byte[] data)
Parameter
Name Description
data byte[]
Returns
Type Description
ReadRange
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static ReadRange parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data byte[]
extensionRegistry ExtensionRegistryLite
Returns
Type Description
ReadRange
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data)

public static ReadRange parseFrom(ByteString data)
Parameter
Name Description
data ByteString
Returns
Type Description
ReadRange
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static ReadRange parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteString
extensionRegistry ExtensionRegistryLite
Returns
Type Description
ReadRange
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static ReadRange parseFrom(CodedInputStream input)
Parameter
Name Description
input CodedInputStream
Returns
Type Description
ReadRange
Exceptions
Type Description
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static ReadRange parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
ReadRange
Exceptions
Type Description
IOException

parseFrom(InputStream input)

public static ReadRange parseFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
ReadRange
Exceptions
Type Description
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static ReadRange parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
ReadRange
Exceptions
Type Description
IOException

parseFrom(ByteBuffer data)

public static ReadRange parseFrom(ByteBuffer data)
Parameter
Name Description
data ByteBuffer
Returns
Type Description
ReadRange
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static ReadRange parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteBuffer
extensionRegistry ExtensionRegistryLite
Returns
Type Description
ReadRange
Exceptions
Type Description
InvalidProtocolBufferException

parser()

public static Parser<ReadRange> parser()
Returns
Type Description
Parser<ReadRange>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
Name Description
obj Object
Returns
Type Description
boolean
Overrides

getDefaultInstanceForType()

public ReadRange getDefaultInstanceForType()
Returns
Type Description
ReadRange

getParserForType()

public Parser<ReadRange> getParserForType()
Returns
Type Description
Parser<ReadRange>
Overrides

getReadId()

public long getReadId()

Required. Read identifier provided by the client. When the client issues more than one outstanding ReadRange on the same stream, responses can be mapped back to their corresponding requests using this value. Clients must ensure that all outstanding requests have different read_id values. The server may close the stream with an error if this condition is not met.

int64 read_id = 3 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
long

The readId.

getReadLength()

public long getReadLength()

Optional. The maximum number of data bytes the server is allowed to return across all response messages with the same read_id. A read_length of zero indicates to read until the resource end, and a negative read_length will cause an error. If the stream returns fewer bytes than allowed by the read_length and no error occurred, the stream includes all data from the read_offset to the resource end.

int64 read_length = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
long

The readLength.

getReadOffset()

public long getReadOffset()

Required. The offset for the first byte to return in the read, relative to the start of the object.

A negative read_offset value will be interpreted as the number of bytes back from the end of the object to be returned. For example, if an object's length is 15 bytes, a ReadObjectRequest with read_offset = -5 and read_length = 3 would return bytes 10 through 12 of the object. Requesting a negative offset with magnitude larger than the size of the object will return the entire object. A read_offset larger than the size of the object will result in an OutOfRange error.

int64 read_offset = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
long

The readOffset.

getSerializedSize()

public int getSerializedSize()
Returns
Type Description
int
Overrides

hashCode()

public int hashCode()
Returns
Type Description
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

newBuilderForType()

public ReadRange.Builder newBuilderForType()
Returns
Type Description
ReadRange.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected ReadRange.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
Name Description
parent BuilderParent
Returns
Type Description
ReadRange.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
Name Description
unused UnusedPrivateParameter
Returns
Type Description
Object
Overrides

toBuilder()

public ReadRange.Builder toBuilder()
Returns
Type Description
ReadRange.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
Name Description
output CodedOutputStream
Overrides
Exceptions
Type Description
IOException