Class ReadAsFutureBytes

java.lang.Object
com.google.cloud.storage.ReadProjectionConfig<Projection>
com.google.cloud.storage.ReadAsFutureBytes

@BetaApi @Immutable public final class ReadAsFutureBytes extends ReadProjectionConfig<Projection>
Read a range of bytes as an ApiFuture<byte[]>

Instances of this class are immutable and thread safe.

Since:
2.51.0 This new api is in preview and is subject to breaking changes.
See Also:
  • Method Details

    • getRange

      @BetaApi public RangeSpec getRange()
      The RangeSpec to be used for any read using this instance.

      Default: RangeSpec.all()

      Since:
      2.51.0 This new api is in preview and is subject to breaking changes.
    • withRangeSpec

      @BetaApi public ReadAsFutureBytes withRangeSpec(RangeSpec range)
      Return an instance with the RangeSpec set to the specified value.

      Default: RangeSpec.all()

      Parameters:
      range - The RangeSpec to be used for any read using the returned instance. Must be non-null.
      Since:
      2.51.0 This new api is in preview and is subject to breaking changes.
      See Also:
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object